API keys

API keys give programs access to your account or to one workspace, with read, write or admin permission. Keys are shown once at creation.

The ApiKey object

Properties

  • Name
    object
    Type
    'api_key'
    Description

    The object type.

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

  • Name
    name
    Type
    string
    Description

    Display name.

  • Name
    prefix
    Type
    string
    Description

    First characters of the key, for display

  • Name
    permission
    Type
    'read' | 'write' | 'admin'
    Description

     

  • Name
    workspaceId
    Type
    string or null
    Description

    null = account-wide key

  • Name
    livemode
    Type
    boolean
    Description

    true for live data, false for data created with a test key.

  • Name
    createdAt
    Type
    string
    Description

    When it was created (ISO 8601).

  • Name
    lastUsedAt
    Type
    string or null
    Description

     

  • Name
    expiresAt
    Type
    string or null
    Description

     

  • Name
    revokedAt
    Type
    string or null
    Description

     


GET/v1/api-keys

List API keys of the account (admin)

Query parameters

  • Name
    limit
    Type
    integer
    Description

    1–100, default 20

  • Name
    starting_after
    Type
    string
    Description

    ID of the last item of the previous page

Request

GET
/v1/api-keys
curl https://core.leadveyor.com/v1/api-keys \
  -H "Authorization: Bearer {api_key}"

Response 200

{
  "object": "list",
  "data": [
    {
      "object": "api_key",
      "id": "key_5Tg8Wm2PqXc7Ln0Rv4Bz1Hjk",
      "name": "name",
      "prefix": "lv_live_ab12",
      "permission": "read",
      "workspaceId": null,
      "livemode": false,
      "createdAt": "2026-11-02T09:30:00.000Z",
      "lastUsedAt": null,
      "expiresAt": null,
      "revokedAt": null
    }
  ],
  "has_more": false,
  "next_cursor": null
}

POST/v1/api-keys

Create an API key (admin). The secret is returned only once.

Required attributes

  • Name
    name
    Type
    string
    Description

    Display name.

  • Name
    permission
    Type
    'read' | 'write' | 'admin'
    Description

     

Optional attributes

  • Name
    workspaceId
    Type
    string
    Description

    Restrict the key to one workspace. Omit for an account-wide key.

  • Name
    livemode
    Type
    boolean
    Description

    false creates a test key (lv_test_…). Default true.

  • Name
    expiresAt
    Type
    string
    Description

    ISO date; omit for no expiry

Request

POST
/v1/api-keys
curl -X POST https://core.leadveyor.com/v1/api-keys \
  -H "Authorization: Bearer {api_key}" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "n8n production",
    "permission": "read",
    "workspaceId": "work_9Kx2Lq7Vt4Wz8Nb3Pc6Rd1Hm",
    "livemode": false
  }'

Response 201

{
  "object": "api_key",
  "id": "key_5Tg8Wm2PqXc7Ln0Rv4Bz1Hjk",
  "name": "name",
  "prefix": "lv_live_ab12",
  "permission": "read",
  "workspaceId": null,
  "livemode": false,
  "createdAt": "2026-11-02T09:30:00.000Z",
  "lastUsedAt": null,
  "expiresAt": null,
  "revokedAt": null,
  "secret": "secret"
}

POST/v1/api-keys/{id}/revoke

Revoke an API key (admin). Idempotent.

Path parameters

  • Name
    id
    Type
    string
    Description

    Unique identifier, prefixed by the object type.

Request

POST
/v1/api-keys/{id}/revoke
curl -X POST https://core.leadveyor.com/v1/api-keys/key_5Tg8Wm2PqXc7Ln0Rv4Bz1Hjk/revoke \
  -H "Authorization: Bearer {api_key}"

Response 200

{
  "object": "api_key",
  "id": "key_5Tg8Wm2PqXc7Ln0Rv4Bz1Hjk",
  "name": "name",
  "prefix": "lv_live_ab12",
  "permission": "read",
  "workspaceId": null,
  "livemode": false,
  "createdAt": "2026-11-02T09:30:00.000Z",
  "lastUsedAt": null,
  "expiresAt": null,
  "revokedAt": null
}

Was this page helpful?