curl --request POST \
--url https://api.usedatabrain.com/api/v2/service-token \
--header 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{"token":"550e8400-e29b-41d4-a716-446655440000"}'
{
"key": "550e8400-e29b-41d4-a716-446655440000"
}
curl --request POST \
--url https://api.usedatabrain.com/api/v2/service-token \
--header 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{"token":"550e8400-e29b-41d4-a716-446655440000"}'
{
"key": "550e8400-e29b-41d4-a716-446655440000"
}
Create or save a service token for your self-hosted Databrain instance. Available only on self-hosted deployments.
curl --request POST \
--url https://api.usedatabrain.com/api/v2/service-token \
--header 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{"token":"550e8400-e29b-41d4-a716-446655440000"}'
{
"key": "550e8400-e29b-41d4-a716-446655440000"
}
curl --request POST \
--url https://api.usedatabrain.com/api/v2/service-token \
--header 'Authorization: Bearer YOUR_ADMIN_ACCESS_TOKEN' \
--header 'Content-Type: application/json' \
--data '{"token":"550e8400-e29b-41d4-a716-446655440000"}'
{
"key": "550e8400-e29b-41d4-a716-446655440000"
}
Authorization header. Obtain one by calling Create Admin JWT first.
Authorization: Bearer <access_token>
application/json when sending a JSON body.Content-Type: application/json
uuidv4) and send it here.error.code and error.message and an appropriate HTTP status (400 or 500).
| Status Code | Description |
|---|---|
200 | OK – Service token created or updated; response contains key |
400 | Bad Request – Invalid or missing token (must be a valid UUID) |
500 | Internal Server Error – Server error or self-hosted-only error |
| Code | Message | HTTP Status |
|---|---|---|
INVALID_REQUEST_BODY | Joi validation message (e.g. "token" is required, "token" must be a valid GUID) | 400 |
SELFHOSTED_APP_ERROR | This feature is only available for self-hosted instances | 500 |
ACCOUNT_NOT_FOUND | ACCOUNT_NOT_FOUND | 500 |
INTERNAL_SERVER_ERROR | INTERNAL_SERVER_ERROR | 500 |