Skip to main content
POST
/
api
/
v2
/
external
/
orgs
/
{slug}
/
api-keys
Create Org Api Key
curl --request POST \
  --url https://api.lyceum.technology/api/v2/external/orgs/{slug}/api-keys \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}
'
{
  "id": "<string>",
  "org_id": "<string>",
  "name": "<string>",
  "prefix": "<string>",
  "plaintext_key": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z"
}

Authorizations

Authorization
string
header
required

Pass an API key (prefixed lk_) or a JWT access token as a bearer token. Generate API keys in the dashboard at https://dashboard.lyceum.technology/api-keys.

Path Parameters

slug
string
required

Body

application/json
name
string
required
Required string length: 1 - 255
expires_at
string<date-time> | null

Response

Successful Response

Response for POST create — contains the plaintext key, shown once.

id
string
required
org_id
string
required
name
string
required
prefix
string
required
plaintext_key
string
required

The API key. Store it now — it will never be shown again.

created_at
string<date-time>
required
expires_at
string<date-time> | null