API Keys

API Key Management

Get current user's API keys

Retrieves a list of API keys associated with the authenticated user. Each API key is returned without the full key value for security reasons. This is a read-only GET operation. The output is a JSON array of API key objects.

Create a new account API key

Creates a new API key for the authenticated user. Requires a key name and scope in the request body. This is a POST operation that returns the created API key object in JSON format.

post{hostname}/api_keys
Body:
{
"key_name": "Backend API Key # Type: string",
"key_scope": "READ,CREATE,UPDATE,DELETE,MANAGE # Type: array",
"organization_id": "432 # Type: integer"
}

API Request Parameters

NameTypeRequired FieldDescription
key_namestringTrueThis is the name of the API_KEY, which helps the user(developer) identify the key
key_scopearrayTrueThis determines the range of action this API key is allowed to execute. Here are the key_scope options. "READ": This gives the access to execute reads with API requests "CREATE": This gives the access to create resources with API requests "UPDATE": This gives the access to execute updates with API requests "DELETE": This gives the access to execute deletes with API requests "MANAGE": This gives the access to manage accounts through API requests. ["READ", "CREATE", "UPDATE", "DELETE", "MANAGE"]
organization_idintegerTrueThe numeric ID of the of the account

Get an API key

Retrieves metadata for a specific API key by its ID. This call does not return the full key value. This is a GET operation. The JSON response representing the API key.

API Request Parameters

NameTypeRequired FieldDescription
key_idintegerTrueThe ID of the API key. Type: integer (int64). Must be included in the URL path. Required.

Delete an API key

Deletes an API key identified by its ID. This is a DELETE operation. If successful, returns status 200 or 204 (No Content).

API Request Parameters

NameTypeRequired FieldDescription
key_idintegerTrueThe ID of the API key. Type: integer (int64). Must be included in the URL path. Required.