---
title: "Add a customer · Customers · COUNT Partner API"
description: "Creates a new customer in the workspace. POST /partners/customers"
canonical: "https://developers.getcount.com/reference/customers/add-customer"
source: "https://developers.getcount.com/reference/customers/add-customer"
---
[Customers](https://developers.getcount.com/reference/customers) / Add a customer

# Add a customer

POST `/partners/customers`

Creates a new customer in the workspace.

Only customer (the name) is required. Addresses, contacts, and taxes can be created inline.

HMAC signature + Bearer access token

[Try this request](https://developers.getcount.com/tools/try-it?method=POST&path=%2Fpartners%2Fcustomers&body=%7B%0A++%22customer%22%3A+%22Acme+Corporation%22%2C%0A++%22email%22%3A+%22contact%40acme.com%22%2C%0A++%22mainPhone%22%3A+%22%2B1234567890%22%2C%0A++%22website%22%3A+%22https%3A%2F%2Facme.com%22%2C%0A++%22status%22%3A+%22active%22%2C%0A++%22paymentTerm%22%3A+%22net30%22%2C%0A++%22billingAddress%22%3A+%7B%0A++++%22street%22%3A+%22123+Main+St%22%2C%0A++++%22city%22%3A+%22San+Francisco%22%2C%0A++++%22state%22%3A+%22CA%22%2C%0A++++%22zipCode%22%3A+%2294102%22%2C%0A++++%22country%22%3A+%22USA%22%0A++%7D%2C%0A++%22contacts%22%3A+%5B%0A++++%7B%0A++++++%22firstName%22%3A+%22John%22%2C%0A++++++%22lastName%22%3A+%22Doe%22%2C%0A++++++%22email%22%3A+%22john%40acme.com%22%2C%0A++++++%22isPrimary%22%3A+true%0A++++%7D%0A++%5D%0A%7D)

[Invoices API](https://developers.getcount.com/reference/invoices) [Projects API](https://developers.getcount.com/reference/projects) [Recurring Invoice Templates API](https://developers.getcount.com/reference/recurring-invoice-templates)

#### Request body

`customer` string required

Customer or business name. The only required field.

`email` string

Primary contact email. Optional; does not need to be unique.

`mainPhone` string

Primary phone number. International format recommended.

`website` string

Website URL. Stored with an https:// prefix if the protocol is omitted.

`notes` string

Free-text notes. HTML is sanitized.

`status` enum

Customer status. Defaults to active.

One of: `active`, `inactive`

`paymentTerm` string

Default payment term for invoices (for example net30).

`taxNumber` string

Tax registration number.

`salesRepId` integer

Id of the workspace person to assign as sales representative.

`taxAutoCalculate` boolean

Auto-calculate tax from the address. Defaults to false.

`taxExcluded` boolean

Treat amounts as tax-exclusive. Defaults to false.

`taxes` array

Array of tax ids to apply when taxAutoCalculate is false.

`billingAddress` object

Billing address for the customer.

`street` string

Street address.

`city` string

City or locality.

`state` string

State, province, or region.

`zipCode` string

Postal or ZIP code.

`country` string

Country name or ISO code.

`shippingAddress` object

Shipping address. Same shape as billingAddress.

`contacts` array

Contact people for this customer. The first contact sets the derived contactName.

`firstName` string required

Contact's first name.

`lastName` string required

Contact's last name.

`email` string

Contact's email address.

`phone` string

Contact's phone number.

`isPrimary` boolean

Marks the primary contact.

#### Responses

`201` Customer created successfully.

`400` Bad request — validation failed.

`401` Missing or invalid HMAC signature, expired timestamp, or invalid Bearer token. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-401)

`403` The credential does not have access to this workspace or resource. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-403)

`429` Rate limit exceeded (100 requests per minute per clientId). Retry after the Retry-After header. [Troubleshoot](https://developers.getcount.com/getting-started/errors#error-429)

[Previous GET Get a customer](https://developers.getcount.com/reference/customers/get-customer) [Next PUT Update a customer](https://developers.getcount.com/reference/customers/update-customer)

POST `https://api.getcount.com/partners/customers`

Request

```javascript
import crypto from 'node:crypto';

const BASE_URL = 'https://api.getcount.com';
const CLIENT_ID = process.env.COUNT_CLIENT_ID;
const CLIENT_SECRET = process.env.COUNT_CLIENT_SECRET;
const ACCESS_TOKEN = process.env.COUNT_ACCESS_TOKEN;

const method = 'POST';
const signingPath = '/customers';
const timestamp = Math.floor(Date.now() / 1000).toString();
const body = {
  "customer": "Acme Corporation",
  "email": "contact@acme.com",
  "mainPhone": "+1234567890",
  "website": "https://acme.com",
  "status": "active",
  "paymentTerm": "net30",
  "billingAddress": {
    "street": "123 Main St",
    "city": "San Francisco",
    "state": "CA",
    "zipCode": "94102",
    "country": "USA"
  },
  "contacts": [
    {
      "firstName": "John",
      "lastName": "Doe",
      "email": "john@acme.com",
      "isPrimary": true
    }
  ]
};
const bodyString = JSON.stringify(body);

const bodyHash = crypto.createHash('sha256').update(bodyString).digest('hex');
const baseString = `${method}:${signingPath}:${timestamp}:${bodyHash}`;
const signature = crypto.createHmac('sha256', CLIENT_SECRET).update(baseString).digest('hex');

const response = await fetch(`${BASE_URL}/partners/customers`, {
  method,
  headers: {
    'x-client-id': CLIENT_ID,
    'x-timestamp': timestamp,
    'x-signature': signature,
    'Content-Type': 'application/json',
    Authorization: `Bearer ${ACCESS_TOKEN}`,
  },
  body: bodyString,
});

console.log(await response.json());
```

Response · 201

```json
{
  "status": "success",
  "message": "success on creating customer",
  "data": {
    "customer": {
      "id": "dfa3219e-6af8-4c53-997a-037534f63a35",
      "customer": "Acme Corporation",
      "email": "contact@acme.com",
      "mainPhone": "+1234567890",
      "website": "https://acme.com",
      "status": "active",
      "notes": "Preferred customer. Net-30 terms.",
      "paymentTerm": "net30",
      "taxNumber": null,
      "taxAutoCalculate": false,
      "taxExcluded": false,
      "contactName": "John Doe",
      "billingAddress": {
        "id": "0b2c1f5e-7a9d-4f2b-9c1e-2a4b6d8e0f12",
        "street": "123 Main St",
        "city": "San Francisco",
        "state": "CA",
        "zipCode": "94102",
        "country": "USA"
      },
      "shippingAddress": null,
      "contacts": [
        {
          "id": "a5da3577-bf85-4e3a-aa73-df85ca69bc67",
          "firstName": "John",
          "lastName": "Doe",
          "email": "john@acme.com",
          "phone": "+1234567890",
          "isPrimary": true
        }
      ],
      "taxes": [],
      "salesRep": null,
      "createdAt": "2026-01-15T10:30:00.000Z",
      "updatedAt": "2026-01-28T14:22:30.000Z"
    }
  }
}
```
