Skip to main content
POST
/
api
/
customers
/
create
curl --location 'https://api.example.com/api/customers/create' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --data-raw '{
    "name": "Acme Corporation",
    "legal_name": "Acme Corp Ltd.",
    "tax_id": "ABC123456789",
    "contact_origin": "WEB_FORM"
  }'
{
  "success": true,
  "customer": {
    "customer_id": 123,
    "name": "Acme Corporation",
    "legal_name": "Acme Corp Ltd.",
    "tax_id": "ABC123456789",
    "contact_origin": "WEB_FORM",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}
Create a new customer with basic information. This endpoint requires authentication.

Authentication

This endpoint requires a valid authentication token passed in the Authorization header.

Request Body

name
string
required
The name of the customer. This field is required and cannot be empty.
The legal name of the customer or company
tax_id
string
Tax identification number for the customer
contact_origin
string
default:"WEB_FORM"
Origin of the customer contact. Defaults to “WEB_FORM” if not provided.

Validation Rules

  • name: Required, must be a non-empty string
  • legal_name: Optional, trimmed if provided
  • tax_id: Optional, trimmed if provided
  • contact_origin: Optional, defaults to “WEB_FORM”

Response

success
boolean
Indicates whether the customer was created successfully
customer
object
The newly created customer object
curl --location 'https://api.example.com/api/customers/create' \
  --header 'Content-Type: application/json' \
  --header 'Authorization: Bearer YOUR_TOKEN' \
  --data-raw '{
    "name": "Acme Corporation",
    "legal_name": "Acme Corp Ltd.",
    "tax_id": "ABC123456789",
    "contact_origin": "WEB_FORM"
  }'
{
  "success": true,
  "customer": {
    "customer_id": 123,
    "name": "Acme Corporation",
    "legal_name": "Acme Corp Ltd.",
    "tax_id": "ABC123456789",
    "contact_origin": "WEB_FORM",
    "created_at": "2024-01-15T10:30:00Z",
    "updated_at": "2024-01-15T10:30:00Z"
  }
}

Build docs developers (and LLMs) love