Skip to main content
POST
Create a new API key

Authorizations

Authorization
string
header
required

StatusStack authenticates requests with API keys, created via the dashboard with granular permissions (read, write, delete, admin, *).

API keys support version compatibility:

  • v1 keys: Can only access v1 endpoints
  • v2 keys: Can access both v1 and v2 endpoints

Available permissions:

  • read: View resources (GET requests)
  • write: Create and update resources (POST, PUT requests)
  • delete: Delete resources (DELETE requests)
  • admin: Administrative access to all resources
  • *: Wildcard permission (all actions allowed)

Body

application/json
name
string
required

Descriptive name for the API key

version
enum<string>
default:v1
Available options:
v1,
v2
permissions
enum<string>[]
Available options:
read,
write,
delete,
admin,
*
expires_in_days
integer

Number of days until the key expires (optional)

Required range: x >= 1
team_id
string<uuid> | null

Restrict key to specific team

organization_id
string<uuid> | null

Restrict key to specific organization

Response

API key created successfully

apiToken
string

The plain text API key (only shown once)

expires_at
string<date-time> | null
permissions
string[]
version
string