Create a new API key (secret or public) for an environment
POST /keys
POST
/keys
Authorizations
Section titled “Authorizations ”Request Body required
Section titled “Request Body required ”Request body for POST /keys endpoint Creates a new API key for an environment
object
keyType
required
Type of key to create - secret for server-to-server, public for client-side
string
environmentId
Optional environment ID to scope the key to a specific environment
string
name
required
Human-readable name/description for the key
string
Responses
Section titled “ Responses ”Successful response
Response body for POST /keys endpoint Returns the newly created API key (only time the full key is returned)
object
id
required
Unique identifier for the key (jti)
string
key
required
The full API key string - ONLY returned on creation, never shown again
string
keyType
required
Type of API key that was created
string
environmentId
Environment ID if the key is scoped to a specific environment
string
name
required
Human-readable name/description for the key
string
createdAt
required
ISO 8601 timestamp when the key was created
string
Bad Request
Unauthorized
Internal Server Error