Skip to main content

What it does

Creates a new API key for an application. The response contains the key value itself — this is the only time it is ever returned. Later reads expose the key’s metadata (name, expiry, status) but never the secret again.
The key value is shown once. Store it in your secret manager the moment you receive it. If it is lost, the only remedy is to create a new key.

Endpoint

Headers

string
required
Secret key in Bearer sk_... format. See Secret Key authentication.
string
required
Always application/json.

Path parameters

string
required
Application ID the key is issued for. Must belong to the organization (otherwise 404).

Request Body

string
required
A label for the key. Use something that identifies where the key is deployed (prod-backend, ci-pipeline) — it is how you will recognise the key later, since the value itself is not visible.
string
ISO-8601 timestamp at which the key stops working. Must be in the future.
Set an expiry even for long-lived keys, and rotate before it lands: create the new key, deploy it, then let the old one expire. That way a rotation never needs a window where no valid key exists.

Response

boolean
true when the key was created.
object
The created key.

Examples

Copy data.key now — the next read of this key will not include it.

Errors

object
Error details with code, group, and description; isSuccess is false.

Next steps

Authentication

How keys are presented on requests.

Update Webhook

Point the app’s events at your server.