customers.create
Add a customer to a shop, with kind, company, email, phone, billing address, lead source, tags and notes in one call.
| Who | Agents can call this |
| REST | POST /v1/customers |
| MCP tool | customers_create |
| Writes | yes, send an Idempotency-Key |
| Area | Customers |
When to use it
A new customer. Ask the name, and the email if they want quotes and invoices sent by email.
What to tell the owner
I added the customer.
Input
| Field | Type | Required |
|---|---|---|
shop_id | string | yes |
name | string | yes |
kind | string (one of person, company) | no |
company_name | string | no |
email | string | no |
phone | string | no |
billing_address | object | no |
billing_address.line1 | string | no |
billing_address.line2 | string | no |
billing_address.locality | string | no |
billing_address.region | string | no |
billing_address.postal_code | string | no |
billing_address.country | string | no |
lead_source | string | no |
tags | array | no |
notes | string | no |
Example
POST https://doingwork.work/v1/customers
content-type: application/json
Idempotency-Key: 3f1c...
{
"shop_id": "00000000-0000-4000-8000-000000000000",
"name": "Ruiz Plumbing"
}Output
JSON. The response shape isn't published yet; read the fields you need and ignore the rest. Errors are {code, message, status}.
Errors
| Code | Status | What to do |
|---|---|---|
invalid_input | 400 | A field is missing, the wrong type, or unknown. The message names the field. Fix the input; don't retry as is. |
forbidden | 403 | This worker's role can't do this, or it needs a person's own sign-in rather than an agent token. Tell the person who can. |
invalid_input, invalid_token, rate_limited | Can happen on any call. See errors. |