API Keys
Verify a key for a given workspace
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
Bearer authentication header of the form Bearer <token>
, where <token>
is your auth token.
Body
application/json
Response
200
application/json
The verification result
The response is of type object
.
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
}
]
}
Assistant
Responses are generated using AI and may contain mistakes.