Create API Key
POST/organizations/:organizationId/api-keys
Generate a new API key for external API access. The full key secret is ONLY returned in this response - store it securely! API access is only available for Professional and Enterprise plans.
Request
Path Parameters
organizationId stringrequired
Organization ID
- application/json
Body
required
name stringrequired
User-friendly name for the API key
permissions string[]
Optional array of permission scopes
Responses
- 200
- 401
- 403
- 422
- application/json
- Schema
- Example (from schema)
- Example
Schema
data objectrequired
Response data
id stringrequired
name stringrequired
keyPrefix stringrequired
secret stringrequired
status stringrequired
permissions string[]
createdAt numberrequired
{
"data": {
"id": "string",
"name": "string",
"keyPrefix": "string",
"secret": "string",
"status": "string",
"permissions": [
"string"
],
"createdAt": 0
}
}
{}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The request has not permission.
message stringrequired
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Unauthenticated",
"message": "Authentication is required and has failed or has not yet been provided."
}
The request has not permission.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The request has not permission.
message stringrequired
The request has not permission message.
{
"error": "string",
"message": "string"
}
{
"error": "Forbidden",
"message": "Access to the requested resource is forbidden."
}
The input data has invalid.
- application/json
- Schema
- Example (from schema)
- Example
Schema
error stringrequired
The input data has invalid.
message stringrequired
The input data has invalid message.
{
"error": "string",
"message": "string"
}
{
"error": "ValidationError",
"message": "Input data validation failed."
}
Loading...
Was this page helpful?