Skip to main content
PATCH
/
api
/
v3
/
keys
/
{id}
Update API key
curl --request PATCH \
  --url https://api.lighton.ai/api/v3/keys/{id} \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "scopes": [
    {
      "workspace_id": 2
    }
  ]
}
'
{
  "id": "<string>",
  "name": "<string>",
  "prefix": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "expires_at": "2023-11-07T05:31:56Z",
  "scopes": [
    {
      "workspace_id": 123,
      "workspace_name": "<string>",
      "workspace_upload_method": "<string>",
      "workspace_datasource_type": "<string>",
      "role": "<string>"
    }
  ]
}

Documentation Index

Fetch the complete documentation index at: https://developers.lighton.ai/llms.txt

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

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Path Parameters

id
string
required

Body

Reject any request fields not declared on the serializer.

name
string
Maximum string length: 250
scopes
object[]

Replace the key's full scope set. Pass an empty list to unscope the key. Each entry's role is re-validated against your current role on the workspace.

Response

The updated API key.

id
string
required
name
string
required
prefix
string
required
created_at
string<date-time>
required
expires_at
string<date-time> | null
required
scopes
object[]
required
read-only