POST
/
api
/
v1
/
api-key
/
verify
curl --request POST \
  --url https://prod.oneloop.ai/api/v1/api-key/verify \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "key": "<string>",
  "requestedScopes": [
    {
      "id": "<string>",
      "representation": "<string>",
      "create": true,
      "read": true,
      "update": true,
      "del": true
    }
  ],
  "route": "<string>",
  "billing": {
    "usage": "0",
    "usageName": "<string>"
  },
  "rateLimitConfig": {
    "id": "<string>",
    "limit": 1
  }
}'
{
  "apiKeyId": "<string>",
  "expiresAt": 1,
  "requestedScopes": [
    {
      "id": "<string>",
      "representation": "<string>",
      "create": true,
      "read": true,
      "update": true,
      "del": true
    }
  ],
  "status": "VALID",
  "rateLimit": {
    "remaining": 123,
    "resetAt": 123
  },
  "metadata": {},
  "billing": {
    "id": "<string>",
    "totalCredits": "<string>",
    "usedCredits": "<string>",
    "allowOverages": true,
    "spendCap": "<string>",
    "createdAt": "<string>",
    "updatedAt": "<string>"
  },
  "externalMeterId": "<string>",
  "customerId": "<string>",
  "scopes": [
    {
      "id": "<string>",
      "representation": "<string>",
      "create": true,
      "read": true,
      "update": true,
      "del": true
    }
  ]
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
key
string
required
requestedScopes
object[]
required
route
string
billing
object
rateLimitConfig
object

Response

200
application/json
The verification result
apiKeyId
string
required
expiresAt
integer | null
required
Required range: x > 0
requestedScopes
object[]
required
status
enum<string>
required
Available options:
VALID,
EXPIRED,
DISABLED,
DELETED,
RATE_LIMITED,
USAGE_LIMITED,
INVALID_SCOPES,
INVALID
billing
object | null
required
externalMeterId
string | null
required
customerId
string | null
required
scopes
object[]
required
rateLimit
object
metadata
object