Skip to main content

Power Tokens

The Power Token API lets you create scoped access tokens tied to a specific user, org, project, and space. Tokens carry a key_type permission flag to control read, write, or delete access. All endpoints require an additional X-Server-Key header alongside the standard context headers.


Create Token

Issues a new power token for a given user with defined roles and access permissions.

Request Body

Send a single object (not wrapped in an array).

FieldTypeRequiredDescription
user_idstringYesID of the user this token is issued for
rolesstringYesComma-separated roles assigned to the token (e.g., user, admin)
key_typestringYesPermission level: r-- = read, -w- = write, --d = delete, rw- = read+write, rwd = full access
namestringYesUnique name identifier for the token
descriptionstringNoHuman-readable description of the token's purpose
note

The X-Server-Key header is required for all Power Token endpoints in addition to the standard context headers.

Response

200 OK:

{
"org_id": "01KN9N1RREKT10YN0TVFM5J32H",
"power_token": "min_qqMU••••••••••••••••••••••••••••••••••••I4I",
"project_id": "01KN9N48WEKE1DP09DNYFXHMRR",
"space_id": "01KN9N66AV68PSND8WF547DRS3"
}
warning

Store the returned power_token securely. It is not recoverable after creation.


List Tokens

Returns a paginated list of all power tokens for the authenticated org, project, and space.

Query Parameters

ParameterTypeRequiredDescription
psintegerNoPage size — number of results per page. Default 10
pgintegerNoPage number (zero-based). Default 0
formatstringNoResponse format: json, xml, yml. Default json

Response

200 OK:

[
{
"name": "prime-post-read-token",
"description": "read only token issued for prime posts app",
"power_token": "min_qqMU••••••••••••••••••••••••••••••••••••I4I",
"key_type": "r--",
"user_id": "01KN6SB2AAW3ZN85FW0W0TH6JW",
"user_roles": "user, admin",
"org_id": "01KN9N1RREKT10YN0TVFM5J32H",
"project_id": "01KN9N48WEKE1DP09DNYFXHMRR",
"space_id": "01KN9N66AV68PSND8WF547DRS3",
"created_at": "2026-04-06T08:53:57Z"
}
]

Delete Token

Permanently deletes a power token by its value. Pass the token as a query parameter.

Query Parameters

ParameterTypeRequiredDescription
tokenstringYesThe full power token value to delete (e.g., min_...)

Response

200 OK:

{
"code": 200,
"status": "OK",
"message": "token deleted successfully"
}

Required Headers

HeaderDescription
X-Org-IdOrganisation identifier
X-Project-IdProject identifier
X-Space-IdSpace identifier
X-User-IdAuthenticated user's identifier
X-User-RolesComma-separated roles, e.g. users, admin
X-Server-KeyServer-level key required for all Power Token endpoints

Key Type Reference

ValuePermissions
r--Read only
-w-Write only
--dDelete only
rw-Read + Write
rwdFull access (Read + Write + Delete)

Common Errors

CodeCause
400Missing or invalid request body fields
401Missing X-User-Id or X-Server-Key header
403Unauthorized role or invalid server key
404Token not found — check the token query parameter
208A token with the same name already exists for this user