Create a customer

Changed on

Create a customer to invoice. See Customers.

post/v2/customers

Request

  • Base URL
    https://api.slash.com
  • URL
    https://api.slash.com/v2/customers
  • Auth
    API key in header X-API-Key

Headers

X-Idempotency-Keystring required

Unique caller-generated key for one create request. Once an authenticated, schema-valid request reaches the operation, the key is permanently consumed for that operation and legal entity whether the operation succeeds or fails. Reusing it in that scope returns 409 and never replays a response, unlike API v1, which replays the original response for a matching key.

Request body

namestring required

The name invoices are addressed to.

emailstring email required

Where invoices and reminders are sent.

phonestring

Response

The created customer.

idstring required

Customer id with the le_cus_ prefix.

namestring required

The name invoices are addressed to.

emailstring required

Where invoices and reminders are sent.

phonestring
status'active' | 'archived' required

archived marks a customer you no longer bill. Archived customers can still be invoiced and are listed unless you filter by status.

createdAtstring date-time required

Example response

{
  "id": "le_cus_2rj4l7hmrrrcv",
  "name": "Acme Robotics",
  "email": "ap@acme.example",
  "phone": "+14155550123"
}

Changes