Skip to content

API Keys

SDK Reference · Resource

API Keys

Create and revoke API keys for server-to-server integrations.

method

list()

List API keys

Returns API keys created by the authenticated account. Secret key values are returned only where the underlying account policy permits it.

Signature

Promiseclient.apiKeys.list(options: APIKeysListOptions = {}): Promise<APIKeysListResponse>

Parameters

NameTypeRequirementDescription
limitnumberOptionalNumber of results to return per page.
offsetnumberOptionalThe initial index from which to return the results.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.apiKeys.list();

Returns

PaginatedAPIKeyListList

The operation completed successfully.

typePaginatedAPIKeyListList4fields
count
number
Required
—
next
string
Optional
—
previous
string
Optional
—
results
APIKeyList[]
Required
—
typeAPIKeyList7fields
id
string
Optional
—
title
string
Required
Descriptive label that identifies the purpose or owner of this API key. Mobile App Dashboard Integration CI Pipeline
prefix
string
Required
—
key
string
Optional
The API key value used for authentication. Leave blank to have it generated automatically on save. Store this value securely.
allowed_ips
string[]
Required
—
created
string
Required
—
updated
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.apiKeys.listWithResponse(options): Promise<ApiResponse<APIKeysListResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

create()

Create an API key

Creates an API key for server-to-server access. allowed_ips can restrict the key to trusted IPv4 or IPv6 addresses.

Signature

Promiseclient.apiKeys.create(options: APIKeysCreateOptions = {}): Promise<APIKeysCreateResponse>

Parameters

NameTypeRequirementDescription
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.
bodyAPIKeyCreateRequestOptional—

Example

const result = await client.apiKeys.create({
body: {}
});

Returns

APIKeyCreate

The resource or action result was created successfully.

typeAPIKeyCreate5fields
id
string
Optional
—
title
string
Required
—
key
string
Required
—
allowed_ips
string[]
Optional
—
created
string
Required
—

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.apiKeys.createWithResponse(options): Promise<ApiResponse<APIKeysCreateResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.

method

delete()

Revoke an API key

Permanently revokes an API key owned by the authenticated account. Requests using the revoked key fail immediately.

Signature

Promiseclient.apiKeys.delete(options: APIKeysDeleteOptions): Promise<APIKeysDeleteResponse>

Parameters

NameTypeRequirementDescription
idstringRequiredA unique value identifying this API Key.
idempotencyKeystringOptionalStable key for one logical mutation. Successful responses are replayable for 24 hours; reusing a key with a different request fails.
acceptLanguagestringOptionalPreferred language for human-readable API errors. Supported languages: en, ru, uk, de, it, fr, es, zh-hans, ja. Regional language tags and quality weights are accepted; unsupported or omitted values use English.

Example

const result = await client.apiKeys.delete({
id: "550e8400-e29b-41d4-a716-446655440000"
});

Returns

void

No response body

Throws

ApiError

Normalized API, transport, and response processing failure.

  • kind: "validation"The request arguments or business rules are invalid.
  • kind: "authentication"Authentication credentials are missing, expired, or invalid.
  • kind: "permission"The authenticated account cannot perform this operation.
  • kind: "not_found"The requested resource does not exist.
  • kind: "conflict"The operation conflicts with the current resource or idempotency state.
  • kind: "network"The request could not reach ProxyRequest.
  • kind: "unexpected"The response could not be decoded or did not match the SDK contract.
Advanced variants
  • client.apiKeys.deleteWithResponse(options): Promise<ApiResponse<APIKeysDeleteResponse>>

    Returns response status, headers, ETag and idempotency metadata with the decoded data.