Skip to main content
POST
/
api
/
api-keys
Error
A valid request URL is required to generate request examples
{
  "apiKey": {
    "_id": "<string>",
    "name": "<string>",
    "keyPrefix": "<string>",
    "keyHint": "<string>",
    "scopes": [
      "<string>"
    ],
    "environment": "live",
    "status": "active",
    "createdAt": "2023-11-07T05:31:56Z",
    "accountId": "<string>",
    "expiresAt": "2023-11-07T05:31:56Z",
    "lastUsedAt": "2023-11-07T05:31:56Z"
  },
  "fullKey": "nl_live_a1b2c3d4e5f6..."
}

Authorizations

Authorization
string
header
required

Bearer token using an API key (format nl_live_* or nl_test_*)

Body

application/json
name
string
required

Human-readable name for the key

Example:

"Production CRM sync"

scopes
string[]
required

RBAC permissions to grant to this key. Must be a subset of the creator's own permissions.

Example:
[
  "leads:view",
  "leads:import",
  "conversations:view"
]
environment
enum<string>
required

Key environment (affects key prefix nl_live_ or nl_test_)

Available options:
live,
test
expiresAt
string<date-time>

Optional expiration date (must be in the future)

Response

API key created

apiKey
object
required
fullKey
string
required

The complete API key. This is shown only once and cannot be retrieved later. Store it securely.

Example:

"nl_live_a1b2c3d4e5f6..."