API Keys

Create a new API key for the authenticated user.

The full key value is returned only once in the creation response and cannot be retrieved again afterwards.

expires_at is required:

  • A future datetime expires the key at that time.
  • null creates a key that never expires.

Workspace scoping (optional): include scopes — a list of {workspace_id, permission} entries — to restrict the key to those workspaces. Each entry's permission is one of viewer, editor, or owner, and cannot exceed the role you currently hold on that workspace. Different scopes on the same key can carry different permissions.

post/api/v3/keys

Request

  • Base URL
    https://api.lighton.ai
  • URL
    https://api.lighton.ai/api/v3/keys
  • Auth
    HTTP bearer

Request body

namestring required
expires_atstring date-time nullable required

Expiration datetime for the API key. Set to a future datetime to expire the key at that time, or null to create a key that never expires.

Response

API key created. The key field contains the full key value — save it now, it will not be shown again.

idstring required
namestring required
prefixstring required
created_atstring date-time required
expires_atstring date-time nullable required
keystring required

Changes

    • info

      added the non-success response with the status

    • info

      added the non-success response with the status