• Pricing
  • Blog
Log inBook a demo
Batch create customers POSTGrant customer credit POSTCreate customer POSTGet customer GETList customer credits GETList customers GETRevoke remaining customer credit POSTUpdate customer PATCH
System status
DocumentationKnowledge BaseBuild with AIAPI ReferenceWebhooks

Batch create customers

Create up to 100 customers in a single request.

POST
/customers/batch

Create up to 100 customers in a single request.

Authorization

ApiKeyAuth
x-api-key<token>

In: header

Header Parameters

Idempotency-Key?string

Unique key used to safely retry this write for 24 hours without applying it twice.

Length1 <= length <= 200

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://example.com/customers/batch" \  -H "Content-Type: application/json" \  -d '{    "customers": [      {        "email": "user@example.com"      }    ]  }'
{  "successful": [    {      "id": "string",      "externalId": "string",      "email": "string"    }  ],  "failed": [    {      "index": -9007199254740991,      "error": "string",      "data": {        "id": "string",        "externalId": "string",        "email": "string",        "fullName": "string",        "taxDocument": "string",        "timezone": "string",        "metadata": {          "property1": null,          "property2": null        },        "address": {          "line1": "string",          "line2": "string",          "city": "string",          "state": "string",          "postalCode": "string",          "country": "string",          "region": "string"        }      }    }  ],  "object": "customer_batch",  "livemode": true}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}
{  "error": {    "type": "string",    "code": "string",    "message": "string",    "param": "string",    "details": null,    "doc_url": "string"  }}

Update credit pack PATCH

Update a credit pack's name, description, credits, price, or active status.

Grant customer credit POST

Grant monetary credit in one currency. Credit is applied FIFO before tax to eligible recurring invoices.

customers*array<>
Items1 <= items <= 100