Skip to Content

API Tokens

List API tokens

See the API tokens of a data app, by name and last 4 characters.

GET
/api/v2/data-app/api-tokens
curl "https://api.usedatabrain.com/api/v2/data-app/api-tokens?dataAppName=Customer%20portal" \  --header "Authorization: Bearer $DATABRAIN_SERVICE_TOKEN"

Auth

A service token. See Authentication.

Authorization

ServiceToken
headerAuthorizationBearer <token>

A service token. A data app API token is refused.

Query

dataAppNamestringrequired

The data app.

true returns 10 tokens per page.

pageNumberinteger

Page, from 1

Tokens are listed oldest first.

Response

{  "data": [    {      "key": null,      "keyId": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",      "keyLast4": "5a6b",      "name": "Production backend",      "description": "API key for data app Customer portal",      "createdAt": "2026-11-18T09:00:00.000Z"    }  ]}
FieldDescription
keyIdThe public id of the token. It is not a credential
keyLast4The last 4 characters of the token
keyDeprecated. null for every token made since tokens are stored as a hash. The full token only for an older token
name, description, createdAtThe token's label, description and creation time

key will be removed. Use keyId and keyLast4. Every successful response has a Deprecation header and a Sunset header; the Sunset header gives the removal date. Until then the list can return the full value of an older token, so keep the response out of logs.

The list does not say whether a token is expired.

Errors

Statuserror.codeWhy
400INVALID_REQUEST_BODYdataAppName is missing
400DATA_APP_NOT_FOUNDNo data app has this name
403AUTHENTICATION_ERRORYou used a data app API token

For errors that every endpoint returns, see Authentication.

Example Request
curl -X GET 'https://api.usedatabrain.com/api/v2/data-app/api-tokens?dataAppName=string'
Example Response
{  "data": [    {      "key": null,      "keyId": "c1d2e3f4-a5b6-4c7d-8e9f-0a1b2c3d4e5f",      "keyLast4": "5a6b",      "name": "Production backend",      "description": "API key for data app Customer portal",      "createdAt": "2026-11-18T09:00:00.000Z"    }  ]}