POST
/
service_accounts
/
{clientId}
/
api_keys
curl --request POST \
  --url https://api.blaxel.ai/v0/service_accounts/{clientId}/api_keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "expires_in": "<string>",
  "name": "<string>"
}'
{
  "createdAt": "<string>",
  "updatedAt": "<string>",
  "createdBy": "<string>",
  "updatedBy": "<string>",
  "apiKey": "<string>",
  "expires_in": "<string>",
  "id": "<string>",
  "name": "<string>",
  "sub": "<string>",
  "sub_type": "<string>"
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

clientId
string
required

Client ID

Body

application/json
expires_in
string

Expiration period for the API key

name
string

Name for the API key

Response

200 - application/json
successful operation

Long-lived API key for accessing Blaxel

createdAt
string

The date and time when the resource was created

updatedAt
string

The date and time when the resource was updated

createdBy
string

The user or service account who created the resource

updatedBy
string

The user or service account who updated the resource

apiKey
string

Api key

expires_in
string

Duration until expiration (in seconds)

id
string

Api key id, to retrieve it from the API

name
string

Name for the API key

sub
string

User subject identifier

sub_type
string

Subject type