API Keys

Generate API key

Changed on

Generates a new API key. Omit projectId and projectSlug for an organization-wide key, or pass either to bind the key to one project. The token is only returned once — store it securely.

post/v1/api-keys

Request

  • Base URL
    https://api.latitude.so
  • Auth
    HTTP bearer

Request body

namestring required

Human-readable name for the API key. Used to distinguish keys in the UI.

projectIdstring

Bind the key to this project. Omit projectId and projectSlug to mint an organization-wide key. One project per key.

projectSlugstring

Bind the key to the project with this slug. Must agree with projectId when both are set.

Response

API key generated

idstring required

Stable API-key identifier.

organizationIdstring required

Organization that owns this API key.

scope'organization' | 'project' required

organization keys can call every route. project keys are bound to projectId.

projectIdstring nullable required

Project this key is bound to. null for an organization-wide key.

projectSlugstring nullable required

Slug of the bound project, when the project still exists. null for organization-wide keys.

namestring required

Human-readable name.

tokenstring required

The full API key token. Returned by create / get / update — store it securely; treat it as a password.

lastUsedAtstring nullable required

ISO-8601 timestamp of the most recent successful authentication. null until first use.

deletedAtstring nullable required

ISO-8601 timestamp at which the key was revoked. null while the key is active.

createdAtstring required

ISO-8601 timestamp of creation.

updatedAtstring required

ISO-8601 timestamp of the last metadata update (rename, revoke, last-used touch).

Changes

    • info

      added the new optional request property

    • info

      added the new optional request property

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • info

      added the required property to the response with the status

    • breaking

      removed the required property from the response with the status