Create a new API key (secret or public) for an environment
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
Type of key to create - secret for server-to-server, public for client-side
Optional environment ID to scope the key to a specific environment
Human-readable name/description for the key
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
Unique identifier for the key (jti)
The full API key string - ONLY returned on creation, never shown again
Type of API key that was created
Environment ID if the key is scoped to a specific environment
Human-readable name/description for the key
ISO 8601 timestamp when the key was created
Bad Request - validation errors, invalid input
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Provider that caused the error (e.g. telnyx, ses).
Provider-specific error code.
Unauthorized
Payment Required - usage limits exceeded
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Provider that caused the error (e.g. telnyx, ses).
Provider-specific error code.
Internal Server Error
Bad Gateway - provider error
Standard error response for API errors.
object
Unique tracking ID for the request.
Structured error details for API error responses.
object
Machine-readable error code.
Human-readable error message.
Actionable hint for fixing the error.
Provider that caused the error (e.g. telnyx, ses).
Provider-specific error code.