Skip to main content

Authenticate with API keys

Authenticate Platform API requests with an X-Api-Key header, or a Console session on session-or-api-key routes, and store the secret when you create it.

Overview

An API key authenticates a script, backend service, or other direct integration with the Platform API. Each key belongs to one user and one organisation, carries a read or read-write scope, and can carry an expiry. Create one key per integration with only the access that integration needs.

Send the key in the X-Api-Key header. The platform does not accept API keys as bearer tokens or query parameters.

curl -sS "$DALP_API_URL/api/v2/tokens" \
  -H "X-Api-Key: $DALP_API_KEY"

Routes marked x-dalp-auth: session-or-api-key in the OpenAPI specification also accept a valid Console session cookie. When a request sends X-Api-Key, the platform authenticates with the key alone: an invalid key fails even if a valid session cookie is present.

Some routes accept only a signed-in session. An API key on such a route receives DALP-0036 (HTTP 403). Private file routes under /dalp/private/* return 401 to any request that sends X-Api-Key, even when it also carries a valid session cookie, as Files describes. Use a Console session for those calls.

Create a key

Create a key in the Console on API keys (API keys), run dalp login for the browser device-code flow, or call POST /api/auth/api-key/create from a signed-in session. Install and set up the command-line tool covers dalp login, which creates a 90-day read-write key for the chosen organisation, or a read key with dalp login --read-only.

The /api/auth/* routes are unversioned, and the key they create authenticates against the versioned /api/v2 Platform API. A request authenticated with an API key cannot create another key, so a backend service gets its keys from the Console, dalp login, or an operator session.

curl -sS -X POST "$DALP_API_URL/api/auth/api-key/create" \
  -H "Cookie: $DALP_SESSION_COOKIE" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "treasury-sync",
    "expiresIn": 7776000,
    "metadata": {
      "organizationId": "org_019c4d2e1f007a11",
      "scope": "read-write"
    },
    "walletVerification": {
      "verificationType": "PINCODE",
      "secretVerificationCode": "482913"
    }
  }'

The create response returns 200 with the full key secret once. Store it immediately, because later reads return metadata only. The example shows part of the response.

{
  "id": "key_019c4d2e8a107c34",
  "name": "treasury-sync",
  "prefix": "sm_dalp_",
  "start": "sm_dalp_7kQ2mN",
  "key": "sm_dalp_7kQ2mN9vP4xR8tL2wJ6yH3cB5fD1gS0aE9uK4zM7qW3nB8",
  "enabled": true,
  "expiresAt": "2027-02-17T09:15:00.000Z",
  "metadata": {
    "organizationId": "org_019c4d2e1f007a11",
    "scope": "read-write"
  },
  "referenceId": "usr_019c4d2e2b9f7d51",
  "rateLimitEnabled": false,
  "rateLimitMax": 10000,
  "rateLimitTimeWindow": 60000,
  "requestCount": 0,
  "lastRequest": null,
  "createdAt": "2026-11-19T09:15:00.000Z",
  "updatedAt": "2026-11-19T09:15:00.000Z"
}

Request fields

Field
Required
Rules
name
Yes
1 to 32 characters after trimming leading and trailing spaces. Missing or blank values return 400 NAME_REQUIRED before checking walletVerification.
metadata
Yes
Object with organizationId (an organisation you belong to, listed by GET /api/auth/organization/list) and optional scope (read or read-write, defaulting to read-write). Invalid metadata returns 400 API_KEY_METADATA_INVALID before checking walletVerification.
expiresIn
No
Lifetime in seconds, up to 365 days (31536000). Omit it for a key with no expiry. Larger values return 400 EXPIRES_IN_IS_TOO_LARGE.
walletVerification
Yes
Wallet step-up proof: { "secretVerificationCode": "<code>", "verificationType": "PINCODE" }. Types are PINCODE, OTP, OIDC_MFA, or SECRET_CODES.

Wallet step-up and server-only fields

An account with an authenticator must send its authenticator code. Sending a PIN or recovery code instead returns 400 WALLET_STEP_UP_STRONGER_FACTOR_REQUIRED. A missing proof returns 400 WALLET_STEP_UP_REQUIRED, and an account with no wallet factor returns 401 WALLET_STEP_UP_UNAVAILABLE.

The account password is never accepted as wallet verification. During the cooling-off period after a wallet security change, creation returns 403 WALLET_STEP_UP_HELD with heldUntil. When the deployment sets enforce2fa, an account without two-factor sign-in receives 403 LOGIN_TWO_FACTOR_REQUIRED unless it signs in only through an identity provider. Every new key emails the account holder.

The platform sets rate-limit, request-budget, permission, and prefix fields itself. Sending rateLimitEnabled, rateLimitMax, rateLimitTimeWindow, remaining, refillAmount, refillInterval, permissions, or prefix returns 400 SERVER_ONLY_PROPERTY.

Key format

A key is 54 characters: sm_dalp_, a random 6-character label, and a random 40-character secret using ASCII letters and digits. The platform stores a digest of the full key plus the first 14 characters (start, the prefix and label) in clear text. GET /api/auth/api-key/list and GET /api/auth/api-key/get return start so you can identify a key without exposing its secret.

Scope: read or read-write

Every key carries a scope of read or read-write, and every Platform API route declares whether it reads or writes. A read key can call read routes only. Calling a write route with a read key returns DALP-0036 (SESSION_POLICY_DENIED, HTTP 403) before the handler runs, regardless of HTTP method.

DALP-0036 is not retryable with the same key. Issue a read-write key or update the key's scope as Manage keys describes. A key stays bounded by its creator's organisation roles: raising a key's scope never grants a wider organisation role.

API keys and delegated authority

An API key identifies the caller. Delegated Authority lets an entitled caller act in another participant's context. Send X-Participant to act for that participant when the key's holder has the required authority. The key never grants that authority by itself.

Without X-Participant, an API-key request uses the acting participant selected for its holder in the key's organisation. After you switch the acting participant, requests with the same key pick up the new selection within 30 seconds.

Manage keys

Operation
Route
Notes
List
GET /api/auth/api-key/list
Returns metadata for your keys. Secret values are never returned.
Read one
GET /api/auth/api-key/get
Returns metadata for one key id: expiry, enabled, rate-limit fields, request count, and last request time.
Update
POST /api/auth/api-key/update
Changes name, metadata (organizationId and scope), expiresIn, or enabled. Read the returned record to confirm.
Delete
POST /api/auth/api-key/delete
Permanently deletes the key. It stops authenticating within 30 seconds.

Create and update require a signed-in session. List and read one also accept an API key.

An update that only renames a key or sets enabled to false needs no walletVerification, even during a cooling-off period. Enabling a key or changing its scope, organizationId, or expiry requires walletVerification, enforces the same errors as create, and emails the account holder.

An update without metadata keeps the key's organisation and scope. An update can set a new expiry up to 365 days ahead, or null to remove the expiry. Extend a key before it expires: the platform deletes expired key records as keys are listed, read, created, updated, or deleted.

Delete accepts a signed-in session (for any key the user owns) or an API key naming itself as keyId. An API key that tries to delete another key receives 403 API_KEY_DELETES_ONLY_ITSELF. No user can delete another user's key.

Disabling a key is reversible: the record stays and enabling it restores the same secret without redeploying your integration. Deleting is permanent and is the right action once a secret leaks.

The server handling a change drops its cached identity immediately, and every other server refreshes within 30 seconds. A disabled or deleted key fails with DALP-14386 no later than 30 seconds after the change.

Read a key's record before assuming an integration lost its secret. The API returns DALP-14386 whether a key is expired, disabled, unknown, unorganised, has an unknown scope, or belongs to a former member. Check enabled, metadata, and presence in GET /api/auth/api-key/list to tell them apart.

Store and rotate a key

Store the secret in a secrets manager or environment variable, never in source control or a shared document. Rotate a key by creating a replacement, updating your integration to send the new key, and deleting the old key once traffic moves over. The platform never rolls a key's secret in place.

What stops a key

A key is a credential of its own, separate from a browser sign-in. Each Platform API server caches a key's resolved identity for up to 30 seconds (35 seconds for a membership change that leaves the key active, such as a role update).

Event
Effect on the user's keys
The key's expiry passes
The key stops authenticating at that instant.
The holder turns the key off or deletes it
The key stops authenticating within 30 seconds.
A password changes (self-service, email reset, or admin-set)
Every key in every organisation is disabled (enabled: false) before the new password is saved. The holder can re-enable them. If the key store is unreachable, the platform returns retryable 503 and keeps the old password.
The holder leaves or is removed from the organisation
Every key in that organisation is deleted permanently within 30 seconds. Keys with no organisation are not stopped.
An identity manager selects Revoke all sessions, Reset sign-in code, or Reset transaction PIN
Every key in that organisation is deleted permanently within 30 seconds. Keys with no organisation are not stopped. These actions live on the user's Security tab (Users).
An identity manager recovers the holder's identity
Every key the holder has, including keys with no organisation, is deleted permanently within 30 seconds of the recovery signing the holder out. The recovery also starts a cooling-off period: creating a key returns 403 WALLET_STEP_UP_HELD until it ends. Before creating a key, the holder sets up a wallet factor again, and that restarts the period.
A platform administrator archives the organisation
Within 30 seconds, /api/v2 calls requiring an organisation return 403 ACTIVE_ORGANIZATION_REQUIRED (DALP-0034), and /api/auth organisation reads return 403 ORGANIZATION_ARCHIVED. Restoring the organisation restores the key within 30 seconds.
A wallet security change starts a cooling-off period
The key keeps authenticating, but calls needing wallet verification return 403 WALLET_VERIFICATION_HELD until the period ends.
A platform administrator bans the holder
Within 30 seconds, /api/v2 returns 401 and /api/auth returns 401 KEY_DISABLED. Lifting or expiring the ban restores the key within 30 seconds.
A platform administrator closes the holder's account
Stops authenticating within 30 seconds with the same 401 responses as a ban. A closed account never reopens.
A platform administrator revokes the holder's keys
Every key in every organisation is deleted permanently within 30 seconds. Uses Revoke all API keys on Platform users (POST /api/auth/admin/revoke-user-api-keys).
A platform administrator ends the holder's sessions
No effect. Keys keep authenticating.

A write submitted with an API key for maker-checker approval runs as the key's holder once approved. If the key is revoked, disabled, expired, or read-only by then, or its holder is banned or no longer in the organisation, the approved write does not run.

API keys on /api/auth routes

An API key is accepted on these nine /api/auth routes only:

  • GET /api/auth/get-session
  • GET /api/auth/organization/list
  • GET /api/auth/organization/get-full-organization
  • GET /api/auth/organization/list-members
  • POST /api/auth/organization/has-permission
  • GET /api/auth/api-key/list
  • GET /api/auth/api-key/get
  • POST /api/auth/api-key/delete (for the presenting key only)
  • GET /api/auth/passkey/list-user-passkeys

On these routes, a key reads only its own organisation. GET /api/auth/organization/list returns that one organisation, and GET /api/auth/api-key/list returns only your keys for that organisation. A signed-in session lists all of your organisations and keys.

An API key on any other /api/auth route returns 403 API_KEY_NOT_SUPPORTED_ON_ROUTE, including POST /api/auth/sign-out and routes that require no sign-in. The v2 API reference documents eight of these nine routes and omits GET /api/auth/organization/list-members because GET /api/v2/users lists the same members.

On get-full-organization, list-members, and has-permission, passing a different organizationId (or organizationSlug on the two GET routes) returns 403 YOU_ARE_NOT_ALLOWED_TO_ACCESS_THIS_ORGANIZATION, even if the holder belongs to it. Omitting the organisation reads the key's organisation.

Error codes

Platform API (/api/v2) errors

Code
HTTP
What the platform observed
What to do
DALP-14386 AUTHENTICATION_REQUIRED
401
Missing X-Api-Key, or a key that is unknown, deleted, disabled, expired, without an organisation, or held by a former member.
Do not retry with the same key. Check the key record with a session, then enable it or issue a new key.
DALP-0036 SESSION_POLICY_DENIED
403
A read key called a write route, or an API key called a session-only route.
Do not retry. Use a read-write key, or call the route with a Console session.
DALP-0034 ACTIVE_ORGANIZATION_REQUIRED
403
A platform administrator archived the key's organisation and the route needs an organisation.
Ask a platform administrator to restore the organisation. The same key works again after restore.
DALP-12136 auth.apikey.THROTTLED
429
The key filled its request window.
Stop sending with the key and retry after lastRequest plus rateLimitTimeWindow.
DALP-17440 WALLET_VERIFICATION_HELD
403
The holder is in a cooling-off period after a wallet security change and the route needs wallet verification.
Wait until data.heldUntil (or data.retryAfterSeconds), then retry.
DALP-0009 SESSION_RESOLUTION_FAILED
503
The key store did not respond, so the platform could not resolve the caller.
Retry with backoff. The key is not at fault.
DALP-14124 AUTH_STORE_ROW_INVALID
500
A stored user, membership, or key row has an unexpected shape.
Do not retry. Contact support with the X-Request-Id response header.

Key management (/api/auth) errors

These codes come from the auth layer and carry no DALP-#### id, so match on the code string. Platform API errors carry DALP-#### ids listed on the DALP error index.

Code
HTTP
When it happens
What to do
INVALID_API_KEY
401
Key sent to an allowed /api/auth route is unknown or deleted.
List your keys from a signed-in session and issue a new key if it is gone.
KEY_DISABLED
401
Key is disabled, or its holder is banned or closed.
Re-enable the key from a signed-in session. A banned holder's key resumes when the ban ends.
KEY_EXPIRED
401
Expiry has passed. The platform deletes the record, so the next call returns INVALID_API_KEY.
Issue a new key. Expired keys cannot be extended.
API_KEY_NOT_SUPPORTED_ON_ROUTE
403
Key called an /api/auth route outside the nine allowed routes.
Call that route with a signed-in Console session.
ORGANIZATION_ARCHIVED
403
Key's organisation is archived during an /api/auth organisation read.
Ask a platform administrator to restore the organisation.
API_KEY_DELETES_ONLY_ITSELF
403
Key attempted to delete a different keyId.
Delete the other key from a signed-in session.
API_KEY_NEEDS_CONSOLE_SIGN_IN
403
Console uses identity-provider-only sign-in, and create used an Investor portal session.
Sign in to the Console and create the key there.
API_KEY_METADATA_INVALID
400
Missing or malformed metadata, non-member organizationId, or unknown scope.
Send metadata with a member organizationId and read or read-write scope.
NAME_REQUIRED
400
Create omitted name or sent only spaces.
Send a non-blank name.
INVALID_NAME_LENGTH
400
Name exceeds 32 characters, or update sent only spaces.
Send 1 to 32 characters.
EXPIRES_IN_IS_TOO_LARGE
400
expiresIn exceeds 365 days.
Send a shorter duration or omit expiresIn.
SERVER_ONLY_PROPERTY
400
Request set a server-managed rate-limit, budget, permission, or prefix field.
Remove the server-only field.
WALLET_STEP_UP_REQUIRED
400
Create or power-raising update omitted walletVerification.
Send the wallet verification proof.
WALLET_STEP_UP_STRONGER_FACTOR_REQUIRED
400
Account holds an authenticator, but proof was a PIN or recovery code.
Send the authenticator code named in required.
WALLET_VERIFICATION_INVALID_CODE
400
Wallet code was wrong. remainingAttempts shows remaining tries.
Send the correct code.
WALLET_CREDENTIAL_LOCKED
429
Too many consecutive wrong wallet codes.
Wait retryAfterSeconds seconds, then send the correct code.
WALLET_STEP_UP_UNAVAILABLE
401
Account has no wallet factor configured.
Set up a PIN on the Console Security page, then retry.
WALLET_STEP_UP_HELD
403
Holder is in a cooling-off period after a wallet security change.
Wait until heldUntil, then retry.
LOGIN_TWO_FACTOR_REQUIRED
403
enforce2fa is active and the account lacks two-factor sign-in (and is not identity-provider-only).
Set up two-factor sign-in on the Console Security page, then retry.

Organisation scope

Every key stores its organizationId in metadata. You can create or move a key only for an organisation you belong to. Naming any other organisation returns 400 API_KEY_METADATA_INVALID. The platform reads the organisation from the key automatically, so callers do not repeat an organisation id on every request.

Legacy keys

Keys created before the platform enforced organisation metadata, scope checks, or key labels have narrower compatibility behaviour:

Legacy key type
Behaviour on /api/v2Behaviour on allowed /api/auth routes
Console visibility and migration
No organizationId in metadata (or metadata: null)
Fails with 401 DALP-14386.
Reads any member organisation named in the request (get-full-organization returns null, list-members and has-permission return 400 NO_ACTIVE_ORGANIZATION when omitted). Can only delete itself. Keeps working after leaving an organisation.
Hidden on API keys. Shown with a dash under Organisation on Platform users. Create a new organisation-scoped key, migrate traffic, then delete the old key via POST /api/auth/api-key/delete.
Valid organizationId with unknown scope
Fails with 401 DALP-14386.
Scoped to its organizationId like a standard key.
Listed as Read on API keys, and with a dash on Platform users. Update scope to read or read-write via POST /api/auth/api-key/update.
Pre-label 16-letter secret
Keeps authenticating normally.
Keeps authenticating normally.
Identified by the sm_dalp_ prefix alone.

Rate limit

Keys created through the Console, dalp login, or POST /api/auth/api-key/create are not rate limited. Each record stores a 60-second window of 10,000 requests with rateLimitEnabled set to false. No API call turns the limit on, so bound an integration using scope and expiresIn instead.

Only keys with rateLimitEnabled: true are counted. Read GET /api/auth/api-key/get for rateLimitEnabled, rateLimitMax, rateLimitTimeWindow (milliseconds), lastRequest, and requestCount. Budgets belong to each key individually and reset only after a full quiet window with no accepted requests. Requests refused because the key is unknown, disabled, expired, banned or throttled are not counted. A request the key authenticates is counted even when the platform then refuses it, such as a read key on a write route.

When a rate-limited key fills its window, the platform returns HTTP 429 with no Retry-After header:

{
  "code": "auth.apikey.THROTTLED",
  "status": 429,
  "message": "This API key filled its request window",
  "data": {
    "id": "DALP-12136",
    "why": "This key used its full request allowance for the current window, so the platform did not authenticate the request.",
    "fix": "Wait for the key's request window to reopen, then send the request again.",
    "retryable": true,
    "category": "permission"
  }
}

retryable is true, but not at once: an immediate retry hits the same refusal. Stop sending until lastRequest plus rateLimitTimeWindow has passed, then retry.

API servers count requests in memory and flush counts in batches, so multi-server deployments can admit up to 50 extra requests per additional server before reconciling. A single server enforces the limit exactly. lastRequest trails the actual request by up to about one second.

Next steps

  • Pagination covers listing resources once you can authenticate.
  • Errors covers the full error envelope and how to branch your integration on it.
  • Install and set up the command-line tool covers dalp login, which creates a read-write key, or a read key with --read-only, through a browser device-code flow.

Was this page helpful?