Create an API key
Create a new API key within the authenticated organization.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Label for the API key (1-255 characters). API keys are not addressable by name.
1 - 255"staging"
Number of days until expiry, up to 3650. Use null for never.
1 <= x <= 365030
Unique project identifier
"proj_abc123"
Response
API key created successfully
API key returned immediately after creation. Includes the plaintext key once.
When the API key was created
When the API key was deleted (soft-deleted). Null for keys that have not been deleted.
When the API key expires
Unique API key identifier
"ckv9w8q2f000001l5r3j7k9m4"
Masked version of the API key
"sk_1234...abcd"
Label for the API key. API keys are not addressable by name; use the ID or key identifier for stable references.
"production"
Project identifier for project-scoped API keys. Null means org-wide.
"proj_abc123"
Project name for project-scoped API keys. Null means the key is org-wide or the project name is unavailable.
"Production"
Plaintext API key. Only returned once when the key is created.
"sk_1234abcd"