v1

latestOpenAPI 3.0.32026-07-22194221292.5 KB
service_accounts

Create service account API key

Creates a new long-lived API key for a service account. The full key value is only returned once at creation. API keys can have optional expiration dates.

post/service_accounts/{clientId}/api_keys

Request body

expires_instring

Expiration period for the API key. Supports formats like '30d' (30 days), '24h' (24 hours), '1w' (1 week). If not set, the API key never expires.

namestring

Name for the API key

Response

successful operation

createdAtstring

The date and time when the resource was created

updatedAtstring

The date and time when the resource was updated

createdBystring

The user or service account who created the resource

updatedBystring

The user or service account who updated the resource

apiKeystring

Api key

expires_instring

Duration until expiration. Supports formats like '30d' (30 days), '24h' (24 hours), '1w' (1 week). If not set, the API key never expires.

idstring

Api key id, to retrieve it from the API

namestring

Name for the API key

substring

User subject identifier

sub_typestring

Subject type (user or service_account)

Example response

{
  "expires_in": "30d",
  "id": "ak_abc123def456",
  "name": "CI/CD Pipeline Key",
  "sub_type": "user"
}