API reference
Create a confirmation
Creates a confirmation from an order and schedules its plan. The first step goes out on the schedule set by cadence.
/v1/confirmationsSend the order as you'd hand it to a carrier: who the customer is, what's coming, when, and where. AnyoneIn validates everything at once, then returns the new confirmation with its plan.
Request body
Only a handful of fields are required: customer.name, a way to reach the customer on each channel you use, order.date and at least one item. Unknown fields are ignored. The body can be up to 40 KB.
externalIdstringoptionalYour reference for this job, up to 80 characters. Returned on every response and webhook so you can match it back. It isn't checked for uniqueness.
cadencestringoptionalstandardfor real customers: email three days out, text two days out, call the day before, in sensible hours.demoruns the steps about 90 seconds apart, for testing. The current release defaults todemo, so always send it. See cadence.webhookUrlstringoptionalAn
httpsURL that receivesconfirmation.updatedevents for this confirmation. See Webhooks.smsViastringoptionalsms(the default) orwhatsapp. WhatsApp to customers who haven't messaged you first needs approved templates in production.
customer
customer.namestringrequiredFull name, up to 80 characters.
customer.firststringoptionalWhat the agent calls them, up to 40 characters. Defaults to the first word of
name.customer.phonestringrequired for texts and callsA mobile number in any common format. Numbers without a country code are treated as UK. Stored in E.164.
customer.emailstringrequired for emailA valid email address. Stored in lower case.
order
order.datestringrequiredThe delivery or collection date,
YYYY-MM-DD. It can be today, but not in the past or more than 120 days away.order.itemsarrayrequiredOne to 20 items. Each has a
name(up to 80 characters), an optionalqty(1 to 99, default 1) and an optionalsku(up to 40 characters). Items without a name are dropped.order.typestringoptionaldelivery(the default) orcollection. Collections ask for someone to hand the item over and for it to be ready to go.order.windowobjectoptional{ "from": "08:00", "to": "12:00" }, 24-hour UK time, withfrombeforeto. If it's missing or invalid, messages say "during the day".order.refstringoptionalThe order number the customer knows, up to 40 characters. Shown in the email.
order.addressobjectoptionalline1(up to 120 characters),city(60) andpostcode(10, stored in capitals). Shown in the email. On a call the agent only reads the first line, and only if asked.order.requiresSignaturebooleanoptionalDefaults to
true: someone aged 18 or over must be in, and the item can't be left in a safe place or with a neighbour. Sendfalseto make a signature preferred rather than required.order.notesstringoptionalUp to 500 characters for the agent, such as "Third-floor flat, no lift". Used to answer questions; not sent to the customer as written.
order.rescheduleOptionsarrayoptionalUp to four other slots the agent can offer, each
{ "date": "YYYY-MM-DD", "window": { "from", "to" } }. Dates follow the same rules asorder.date. If the customer picks one, the confirmation endsrescheduledandorder.dateandorder.windoware updated.
channels
channels.emailbooleanoptionalDefault
true.channels.smsbooleanoptionalDefault
true. A text, or WhatsApp withsmsVia: "whatsapp".channels.callbooleanoptionalDefault
true. A natural AI phone call that says it's automated, checks it's speaking to the right person, and leaves a voicemail if a machine answers.
At least one channel must be on. Leave a channel out of the object and it stays on, so { "call": false } means email and text only.
brand
Every message goes out in your name, never ours.
brand.namestringoptionalYour trading name, up to 60 characters. The agent introduces itself as your automated assistant. Always send it.
brand.colors.primarystringoptionalA hex colour such as
#1F3A5F, used for the buttons in the email and on the customer page.brand.supportEmailstringoptionalShown in the email footer, up to 120 characters.
brand.tonestringoptionalHow the agent should sound, up to 160 characters, such as "warm, clear and brief".
What happens next
The response is 201 Created with the confirmation: status: "scheduled", outcome: null and one steps entry per channel with its dueAt.
From there, the plan runs on its own. The first step goes out, the status moves to in_progress, and any reply pauses the plan while the agent reads it. When there's a clear answer, or everyone has been tried and nobody answered, the confirmation closes and your webhookUrl gets a confirmation.updated event.
Validation errors
If anything is wrong, nothing is created. You get a 422 listing every problem at once, in errors, and the same messages joined together in error.
| Message | Cause |
|---|---|
Turn on at least one channel. | Every channel in channels is false |
customer.name is required. | Missing or empty name |
customer.phone must be a valid mobile number for texts and calls. | Texts or calls are on and the number is missing or invalid |
customer.email must be a valid email address. | Email is on and the address is missing or invalid |
order.date must be a date like 2026-10-14. | Not a YYYY-MM-DD date |
order.date is in the past. | Before today, UK time |
order.date is more than 120 days away. | Too far ahead |
order.rescheduleOptions[0].date … | The same three date rules, for each offered slot |
order.items needs at least one item with a name. | No items, or none with a name |
webhookUrl must be an https URL. | Not a valid URL, or not https |
Other errors, such as 400 for a body that isn't JSON or 429 when you've created too many in an hour, are listed in Errors and Rate limits.
Roadmap
Idempotency keys, so a retried request can't create a second confirmation, are coming. Until then, see Idempotency for how to retry safely.
Base URL https://api.anyonein.co.uk/v1 is a placeholder until the production domain is confirmed. Found a mistake? Tell us.