Prerequisites
Ensure the following before testing:- Valid App ID
- Valid API Key (
x-api-keyheader) with:- API Scope/Key = FULL permission
Create API Key
Provides an endpoint to create a new API key with an existing scope.Specifications
| Field | Value |
|---|---|
| Method | POST |
| Endpoint | /apikeys/create |
| Content-type | application/json |
| Authorization Header | x-api-key: <API-KEY> |
Request Body
| Field | Type | Description | Required |
|---|---|---|---|
scope_name | string | Name of the existing scope | Yes |
api_key_name | string | Name of the API key to be created | Yes |
Sample Request
Success Response
Status:201 Created
Important Notes
- API key is returned only once. Store it securely.
scope_namemust already exist.api_key_namemust be unique within the scope.
Revoke API Key
Deletes an existing API key permanently.Specifications
| Field | Value |
|---|---|
| Method | DELETE |
| Endpoint | /apikeys/{keyId} |
| Content-type | application/json |
| Authorization Header | x-api-key: <API-KEY> |
Path Parameter
| Field | Description |
|---|---|
keyId | API Key ID to be deleted. Example: ak-a74c3b6b-cb71-48da-bee8-963c95de7abc |
Success Response
Status:200 OK
Important Notes
- This is a hard delete — revoked keys cannot be restored.
- Any ongoing requests using this key will fail immediately.
Get Scope Details
Fetches scope details and permissions. Returns details for valid keys and fails if the key is invalid or not linked.Specifications
| Field | Value |
|---|---|
| Method | GET |
| Endpoint | /apps/{appId}/scopes/{scopeId} |
| Content-type | application/json |
| Authorization Header | x-api-key: <API-KEY> |
Sample cURL
Sample Response
Update Scope Permission
Updates permissions for a given scope. The API key used to invoke this API must belong to the scope that is being updated.Specifications
| Field | Value |
|---|---|
| Method | PUT |
| Endpoint | /apps/{appId}/scopes/{scopeId} |
| Content-type | application/json |
| Authorization Header | x-api-key: <API-KEY> |
Request Body
| Field | Description |
|---|---|
permissions | List of permissions to be updated for this scope. Refer to the Get Scope Details sample for the list of permissions. |
Sample cURL
Error Codes
| Status Code | Description |
|---|---|
401 | Missing or invalid API key |
403 | The API key does not have the required permissions |
404 | Scope or API key not found |
409 | Duplicate API key name |
429 | API key limit reached |