Skip to main content
PUT
/
user
/
api-key-collections
Set API key collection scoping
curl --request PUT \
  --url https://api.videodb.io/user/api-key-collections \
  --header 'Content-Type: application/json' \
  --header 'x-access-token: <api-key>' \
  --data '
{
  "api_key": "sk-xxx",
  "collection_ids": [
    "default",
    "c-12345"
  ]
}
'
{
  "success": true,
  "message": "Operation successful"
}
Restrict an API key to only access specific collections. This is useful for creating scoped keys for third-party integrations or limiting access in multi-tenant setups.
  • This is a Pro-only feature
  • Pass an empty collection_ids array to remove all collection restrictions
  • The scoped key will only be able to access the specified collections

Authorizations

x-access-token
string
header
required

API key for authentication (sk-xxx format)

Body

application/json
api_key
string
required
Example:

"sk-xxx"

collection_ids
string[]
required
Example:
["default", "c-12345"]

Response

API key collections updated

success
boolean
Example:

true

message
string
Example:

"Operation successful"