Create API key
Issues a new API key for the organization. Body: { name: string (1-255 chars, required), permissions?: string[] (default []), v1Only?: boolean (default false) }. The plaintext key value is returned ONCE in this 201 response and is never retrievable again. Authorization: organization administrators only. Returns 400 on an invalid body.
Authentication
AuthorizationBearer
Bearer authentication of the form Bearer <token>, where token is your auth token.
Request
This endpoint expects an object.
name
permissions
The permission slugs the key carries.
v1Only
When true, the key may only call the public /v1 API; every other route answers 403 api_key_v1_only.
Response
The created API key, including its one-time plaintext value.
id
name
permissions
v1Only
Restricted to the public /v1 API — all other routes answer 403.
lastUsedAt
createdAt
createdBy
Who created the key, or null when that is not known.
value
The plaintext key. Returned ONCE, at creation, and never retrievable again.