Skip to main content
POST
/
api
/
v2
/
external
/
auth
/
api-keys
Create Api Key
curl --request POST \
  --url https://api.lyceum.technology/api/v2/external/auth/api-keys/ \
  --header 'Content-Type: application/json' \
  --data '
{
  "key_name": "<string>",
  "expires_at": "2023-11-07T05:31:56Z"
}
'
{
  "api_key": "<string>",
  "id": "<string>",
  "key_name": "<string>",
  "key_prefix": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z"
}

Body

application/json
key_name
string
required

Human-readable name for the API key

Required string length: 1 - 255
expires_at
string<date-time> | null

When the API key expires (optional)

Response

Successful Response

Response when creating a new API key - includes the plaintext key

api_key
string
required

The full API key (only shown once)

id
string
required
key_name
string
required
key_prefix
string
required
created_at
string<date-time>
required
expires_at
string<date-time> | null
required