Skip to main content
POST
/
customers
Create a customer record
curl --request POST \
  --url https://api.platform.dakota.xyz/customers \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --header 'x-idempotency-key: <x-idempotency-key>' \
  --data '
{
  "name": "Acme Corporation",
  "customer_type": "business",
  "external_id": "external_customer_123"
}
'
{
  "id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
  "kyb_links": [
    {
      "provider_id": "trm_labs",
      "link_type": "persona",
      "url": "https://verify.provider.com/kyb/a1b2c3d4e5f6",
      "status": "pending",
      "created_at": 1234567890,
      "updated_at": 1234567890,
      "expires_at": 1234567890,
      "deleted_at": 1234567890
    }
  ],
  "application_id": "1NFHrqBHb3cTfLVkFSGmHZqdDPi",
  "application_url": "https://apply.dakota.com/applications/2WGC9cKv9P4K8eGzqY6qJ3Xz7Qm?token=kJ8xN3zQ9mL2pR5vY7wC1aF4dG6hK0sT8uW3nB5eM9",
  "application_expires_at": 1734567890000000000
}

Authorizations

x-api-key
string
header
required

Headers

x-idempotency-key
string<uuid>
required

Unique key to ensure request idempotency. If the same key is used within a certain time window, the original response will be returned instead of executing the request again.

X-Sandbox-Scenario
enum<string>

Sandbox-only. Applies a preset failure or behavior mode for the request, selecting a coherent combination of error step, status, and message. The full set of scenarios is also exposed dynamically via GET /sandbox/scenarios along with descriptions and per-rail applicability. Effective only on https://api.platform.sandbox.dakota.xyz. Ignored in production.

Available options:
happy_path,
delayed_settlement,
insufficient_funds,
compliance_block,
invalid_account,
provider_maintenance,
network_congestion,
kyb_manual_review,
kyb_rejected,
kyb_expired,
network_timeout,
intermittent_errors,
account_frozen,
document_expired,
invalid_swift
Example:

"insufficient_funds"

X-Sandbox-Error-Step
enum<string>

Sandbox-only. Names the pipeline step at which the injected error fires. Pair with X-Sandbox-Error-Status and (optionally) X-Sandbox-Error-Message to drive a deterministic failure mode at a known point in the request lifecycle. Values longer than 100 characters are ignored. Effective only on https://api.platform.sandbox.dakota.xyz. Ignored in production.

Available options:
transaction_processing,
compliance_check,
account_validation,
provider_call,
kyb_submission,
kyb_approval,
network_call
Maximum string length: 100
Example:

"provider_call"

X-Sandbox-Error-Status
integer

Sandbox-only. Sets the HTTP status code returned when the sandbox injects an error at the configured step (see X-Sandbox-Error-Step). Must be a valid HTTP status code in the range 100-599; values outside that range are ignored. Status codes >= 400 cause the request to short-circuit immediately with a structured error response. Effective only on https://api.platform.sandbox.dakota.xyz. Ignored in production.

Required range: 100 <= x <= 599
Example:

503

X-Sandbox-Error-Message
string

Sandbox-only. Sets the human-readable message field of the injected sandbox error response. Truncated values longer than 500 characters are ignored. Effective only on https://api.platform.sandbox.dakota.xyz. Ignored in production.

Maximum string length: 500
Example:

"Provider temporarily unavailable for maintenance."

X-Sandbox-Skip-Auto-Approval
boolean
default:false

Sandbox-only. When true, prevents the default 5-second KYB auto-approval that the sandbox applies to newly created customers. Use this header (typically with X-Sandbox-Scenario: kyb_manual_review or kyb_rejected) to keep an application in pending so integrators can exercise manual-review and rejection flows. Accepts true/false (also 1/0, yes/no); other values are treated as false. Effective only on https://api.platform.sandbox.dakota.xyz. Ignored in production.

Example:

true

Body

application/json

Request to create a customer and subsequently initiate a Know Your Business (KYB) verification process.

name
string
required

Name of the customer - either a person's name or company name. Must contain at least one non-whitespace character.

Required string length: 3 - 100
Pattern: .*\S.*
Example:

"Acme Corporation"

customer_type
enum<string>
required

Type of entity being created - either an individual person or a company/organization.

Available options:
individual,
business
Example:

"business"

external_id
string

Unique identifier for the customer in the client's system. This ID is used to track the customer in the client's database.

Example:

"external_customer_123"

sub_client_id
string

ID of an existing sub-client to associate this new customer with. The referenced customer must belong to the same client and must itself be a sub-client. Cannot be combined with is_sub_client.

Required string length: 27
Pattern: ^[0-9A-Za-z]{27}$
Example:

"1NFHrqBHb3cTfLVkFSGmHZqdDPi"

is_sub_client
boolean
default:false

When true, create this customer as a sub-client. A customer can only be designated a sub-client at creation time; a regular customer cannot be promoted to a sub-client afterwards. Cannot be combined with sub_client_id.

Response

Customer record successfully created

Response returned when a customer creation process is successfully initiated.

id
string
required

KSUID is a 27-character globally unique ID that combines a timestamp with a random component. Used for all entity identifiers in the Dakota platform.

Required string length: 27
Pattern: ^[0-9A-Za-z]{27}$
Example:

"1NFHrqBHb3cTfLVkFSGmHZqdDPi"

KYB Links for different providers used in the KYB process.

application_id
string
required

Unique identifier for the automatically created application record

Required string length: 27
Pattern: ^[0-9A-Za-z]{27}$
Example:

"1NFHrqBHb3cTfLVkFSGmHZqdDPi"

application_url
string<uri>
required

Public URL for completing the application via web form (includes embedded token)

Example:

"https://apply.dakota.com/applications/2WGC9cKv9P4K8eGzqY6qJ3Xz7Qm?token=kJ8xN3zQ9mL2pR5vY7wC1aF4dG6hK0sT8uW3nB5eM9"

application_expires_at
integer<int64>
required

Unix timestamp (nanoseconds) when the application token expires (30 days from creation)

Example:

1734567890000000000