API Keys

Create an API key

Changed on

Mint a new lilt_* API key under the caller's current organization. Requires the apiKey.write permission.

The plaintext secret is returned in the key field of the response and is shown exactly once — store it securely, as it cannot be retrieved again. The optional userId lets an admin create a key on behalf of another user who already has a grant in the current organization.

post/v2/api-keys

Request

  • Base URL
    https://api.lilt.com
  • URL
    https://api.lilt.com/v2/api-keys
  • Auth
    HTTP basic

Request body

namestring required

A human-readable label for the key (1–255 characters).

expiresAtstring date-time

Optional ISO-8601 expiry timestamp. Must be in the future. Omit for a non-expiring key.

userIdinteger

Optional. When provided by an admin, mints the key on behalf of this user. The target user must already have a grant in the current organization. Defaults to the authenticated caller.

Example request

{
  "name": "CI bot",
  "expiresAt": "2027-01-01T00:00:00Z",
  "userId": 42
}

Response

The created API key, including the plaintext secret (shown once only).

idstring required

The unique identifier for the API key.

namestring required

A human-readable label for the key.

prefixstring required

The first 8 characters of the key's random portion — the part that follows the lilt_ prefix. Safe to display.

keystring required

The full plaintext API key (lilt_ followed by 40 hex characters). Shown once only.

createdAtstring date-time required

ISO-8601 timestamp when the key was created.

expiresAtstring date-time nullable

ISO-8601 timestamp when the key expires, or null if it does not expire.

ownerEmailstring nullable

Email address of the user who owns the key. Returned when creating a key; omitted when rotating one.

ownerUserIdinteger nullable

Numeric identifier of the user who owns the key. Returned when creating a key; omitted when rotating one.

Example response

{
  "id": "uuid-1234",
  "name": "CI bot",
  "prefix": "aaaaaaaa",
  "key": "lilt_aaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "createdAt": "2026-04-29T00:00:00Z",
  "expiresAt": "2027-01-01T00:00:00Z",
  "ownerEmail": "developer@lilt.com",
  "ownerUserId": 42
}

Changes