Skip to main content
POST
Create an API key for a service account

Authorizations

Authorization
string
header
required

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

Path Parameters

name
string
required
org
string
required

Body

application/json
description
string
required
Required string length: 1 - 256
expires_at
integer | null

Unix timestamp for key expiry. Must not be in the past. Omit or pass 0 for the maximum; every key expires at most 365 days from creation.

Required range: -9223372036854776000 <= x <= 4102444800

Response

Successful Response

id
string
required

The key's id.

description
string
required

The name given to the key.

created_at
number
required

Unix time the key was created.

expires_at
integer
required

Unix time the key expires. 0 means it never expires.

key
string
required

The key's secret. It is only returned once.

last_used_at
number | null

Unix time the key was last used. Absent if it never has been.

generated_at
number | null

Unix time the key's current secret was generated: when it was created, or when it was last rotated. Absent if the key was rotated before this time was recorded.

grace_period_expires_at
integer | null

Unix time the secret replaced by the last rotation stops working. Absent once it has stopped, or if the key was never rotated.