curl -X POST https://sandbox.layerfi.com/v1/businesses/${business_id}/customers \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: application/json" \ -d '{ "external_id": "customer-1", "individual_name": "John Doe", "company_name": "Acme, Inc.", "email": "john@hotmail.com", "mobile_phone": "555-555-5555", "office_phone": "555-555-5555", "address_string": "123 Main St, Phoenix, AZ 85001", "notes": "This is a note" }'
Copy
Ask AI
{ "data": { "type": "CustomerData", "id": "4f7c1b16-e057-4ec0-8b20-50308ba5b9ea", "external_id": "customer-1", "individual_name": "John Doe", "company_name": "Acme, Inc.", "email": "john@hotmail.com", "mobile_phone": "555-555-5555", "office_phone": "555-555-5555", "address_string": "123 Main St, Phoenix, AZ 85001", "notes": "This is a note", "status": "ACTIVE", "transaction_tags": [] }}
Customers
Create a customer
Create a new customer within Layer.
POST
/
v1
/
businesses
/
{business_id}
/
customers
Copy
Ask AI
curl -X POST https://sandbox.layerfi.com/v1/businesses/${business_id}/customers \ -H "Authorization: Bearer <access_token>" \ -H "Content-Type: application/json" \ -d '{ "external_id": "customer-1", "individual_name": "John Doe", "company_name": "Acme, Inc.", "email": "john@hotmail.com", "mobile_phone": "555-555-5555", "office_phone": "555-555-5555", "address_string": "123 Main St, Phoenix, AZ 85001", "notes": "This is a note" }'
Copy
Ask AI
{ "data": { "type": "CustomerData", "id": "4f7c1b16-e057-4ec0-8b20-50308ba5b9ea", "external_id": "customer-1", "individual_name": "John Doe", "company_name": "Acme, Inc.", "email": "john@hotmail.com", "mobile_phone": "555-555-5555", "office_phone": "555-555-5555", "address_string": "123 Main St, Phoenix, AZ 85001", "notes": "This is a note", "status": "ACTIVE", "transaction_tags": [] }}
This endpoint is idempotent using the external_id field.
If a customer with the same external_id already exists, the existing customer will be updated and returned.