Customers

Create customer

Create a new customer.

POST
/api/v2/customers

Creates a new customer for the authenticated organization. Supports both individual and corporate account types. Requires Bearer token authentication.

Authorization

bearerAuth
AuthorizationBearer <token>

Organization API key obtained on Settings > API Keys page in Compose UI.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST 'https://compose.finance/api/v2/customers' \  -H 'Authorization: Bearer YOUR_API_KEY' \  -H 'Content-Type: application/json' \  -d '{    "name": "JOHN DOE",    "accountType": "individual",    "email": "[email protected]"  }'# You can also create corporate customers:# -d '{ "name": "ACME CORP LTD", "accountType": "corporate", "email": "[email protected]" }'# With optional expectedMonthlyVolume:# -d '{ "name": "JOHN DOE", "accountType": "individual", "expectedMonthlyVolume": 25000 }'
{
  "customerId": "550e8400-e29b-41d4-a716-446655440002",
  "email": null,
  "name": "JANE CITIZEN",
  "accountType": "individual",
  "product": "aud_only",
  "expectedMonthlyVolume": null,
  "kycVerified": false
}

{
  "message": "Invalid request body.",
  "errors": [
    {
      "validation": "email",
      "code": "invalid_string",
      "message": "Please enter a valid email address",
      "path": [
        "email"
      ]
    }
  ]
}

{
  "error": "Unauthorized - Invalid or missing API key or session"
}

{
  "error": "Customers feature is not enabled for your organization"
}

{
  "error": "A customer with this email already exists"
}
{
  "message": "Invalid media type."
}
{
  "error": "Rate limit exceeded. Please try again later."
}

{
  "error": "Internal server error"
}