Theme switcher

Create Customer

Create a new customer record in COUNT. This endpoint supports creating a customer with full details including addresses and contacts in a single request.

Required Fields:

  • customer (name): 1-255 characters, non-empty
  • email: Valid email format, must be unique within your team

Email Uniqueness: Customer emails must be unique within a team. Always use the find-by-email endpoint first to check if a customer exists before creating to avoid 409 Conflict errors.

Contact Creation:

  • Contacts are created atomically with the customer
  • If contact validation fails, the entire customer creation fails
  • Only one contact should be marked as isPrimary: true

Address Flexibility: Addresses are optional and flexible:

  • Can omit addresses entirely
  • Can provide partial addresses
  • Can provide complete addresses

Status Default: If you don't specify status, it defaults to "active". Most integrations should use "active" for new customers.

UUID Generation: The uuid field is auto-generated by COUNT and returned in the response. Store this UUID for future operations.

Timestamps: createdAt and updatedAt are automatically set to the current time when the customer is created.

Use Cases:

  • Create customers from your CRM
  • Create customers automatically when orders are placed
  • Import customers from external systems
  • User registration flows

Header Parameters

x-client-idstring
x-signaturestring
Authorizationstring

Body Parameters

customerstring Required

Customer or business name (1-255 characters, non-empty)

Min length
1
Max length
255
emailstring Required

Primary contact email (must be unique within team)

Max length
255
mainPhonestring

Primary phone number (max 50 characters, international format recommended)

Max length
50
Nullable:
True
websitestring

Website URL (max 255 characters, should include protocol)

Max length
255
Nullable:
True
statusstring

Customer status (defaults to "active" if not specified)

Enum values:
activeinactive
billingAddressobject

Address structure for billing and shipping addresses

Nullable:
True

Show child attributes

shippingAddressobject

Address structure for billing and shipping addresses

Nullable:
True

Show child attributes

contactsarray

Contact persons (optional, array of contact objects)

Show child attributes

Response

201
Object
Customer created successfully

Response Attributes

statusstring
messagestring
dataobject

Show child attributes

400
Object
Bad Request - Validation failed

Response Attributes

statusstring Required

Always "error" for error responses

messagestring Required

Human-readable error description

codestring Required

Machine-readable error code for programmatic handling

detailsobject

Additional context about the error (varies by error type)

Show child attributes

errorsarray

Present for validation errors with multiple fields

Show child attributes

401
Object
Unauthorized - Authentication failed

Response Attributes

statusstring Required

Always "error" for error responses

messagestring Required

Human-readable error description

codestring Required

Machine-readable error code for programmatic handling

detailsobject

Additional context about the error (varies by error type)

Show child attributes

errorsarray

Present for validation errors with multiple fields

Show child attributes

409
Object
Conflict - Email already exists

Response Attributes

statusstring Required

Always "error" for error responses

messagestring Required

Human-readable error description

codestring Required

Machine-readable error code for programmatic handling

detailsobject

Additional context about the error (varies by error type)

Show child attributes

errorsarray

Present for validation errors with multiple fields

Show child attributes

429
Object
Too Many Requests - Rate limit exceeded

Response Attributes

statusstring Required

Always "error" for error responses

messagestring Required

Human-readable error description

codestring Required

Machine-readable error code for programmatic handling

detailsobject

Additional context about the error (varies by error type)

Show child attributes

errorsarray

Present for validation errors with multiple fields

Show child attributes

Was this section helpful?

What made this section unhelpful for you?

POST

/

Select
1

Response

Was this section helpful?

What made this section unhelpful for you?