Skip to main content
POST
/
organizations
/
api-keys
Create an organisation API key
curl --request POST \
  --url https://apix.spotzee.com/api/client/organizations/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "CI bot — provisioning"
}
'
{
  "id": 5,
  "organization_id": 123,
  "name": "CI bot — provisioning",
  "role": "member",
  "value": "ok_01HXY7Z9K8M5J2N4P6Q8R0S1T2",
  "created_at": "<string>",
  "updated_at": "<string>",
  "description": "<string>"
}

Documentation Index

Fetch the complete documentation index at: https://docs.spotzee.com/llms.txt

Use this file to discover all available pages before exploring further.

Authorizations

Authorization
string
header
required

Organisation-scoped admin API key (ok_…). Pass in the Authorization: Bearer <key> header. Used to manage projects and other organisation-level resources.

Body

application/json

Create a new organisation API key. Caller must have owner role on the organisation.

name
string
required

Label for the new key.

Minimum string length: 1
Example:

"CI bot — provisioning"

description
string | null
role
enum<string>

Defaults to admin. Cannot exceed the creator’s own role.

Available options:
member,
admin,
owner

Response

The newly created organisation API key, including its full value.

An organisation-scoped API key (ok_). Used to manage projects and other organisation-level resources.

id
integer
required

Numeric organisation API key identifier.

Example:

5

organization_id
integer
required
name
string
required

Human-readable label.

Example:

"CI bot — provisioning"

role
enum<string>
required

Role granted to the API key on the organisation. Cannot exceed the creator’s own role.

Available options:
member,
admin,
owner
value
string
required

The key value, prefixed with ok_. Returned in full only on creation; subsequent reads return a masked form.

Example:

"ok_01HXY7Z9K8M5J2N4P6Q8R0S1T2"

created_at
string | null
required
updated_at
string | null
required
description
string | null