API reference

The confirmation object

A confirmation is one delivery or collection that AnyoneIn is checking with the customer. It carries the order, the plan, every message in and out, and the outcome.

A confirmation is created from one order. It holds what you sent (normalised), the plan of steps it will work through, a timeline of events, and, once the customer has answered, an outcome.

Attributes

idstring

Unique identifier, cf_ followed by 16 hex characters.

createdAtstring

When it was created, ISO 8601 in UTC.

updatedAtstring

When anything on it last changed.

sourcestring

api for confirmations created through the API.

externalIdstring or null

Your own reference, as you sent it. Not required to be unique.

brandobject

The name, colors.primary, supportEmail and tone used in every message. See create.

customerobject

name, first (what the agent calls them), phone in E.164 and email in lower case.

orderobject

ref, type (delivery or collection), date, window, items, address, requiresSignature, notes and rescheduleOptions. After a customer picks another slot, date and window hold the new slot and previous holds the original.

channelsobject

Which of email, sms and call are switched on.

smsViastring

sms or whatsapp.

cadencestring

standard or demo. See cadence.

webhookUrlstring

Where confirmation.updated events are sent. Empty if you didn't set one.

statusstring

Where it is in its life. See statuses.

outcomeobject or null

The customer's answer, once there is one. See outcome.

stepsarray

The plan: one step per channel, in order. See steps.

eventsarray

Everything that happened, oldest first: messages out, replies in, what the agent understood. See events. Left out of list responses.

callobject or null

The latest phone call: state (queued, ringing, in_progress or completed), live, startedAt, answeredAt and endedAt.

callAttemptsinteger

How many calls have been placed. The standard cadence retries an unanswered call once.

giveUpAtstring

Present once every step has gone out: when it will be marked unreachable if nobody replies.

optedOutboolean

Present and true once the customer has asked to stop. Nothing more is sent to them.

webhookobject

The result of the last webhook delivery: { "status": 200, "at": "…" }, or { "error": "…", "at": "…" } if it couldn't be delivered.

emailThreadboolean

Whether an email thread exists that the customer can reply to.

Statuses

Every confirmation starts scheduled, moves to in_progress when the first step goes out or the customer replies, and closes in one of five states.

scheduledin_progress confirmedrescheduledaction_neededunreachablecancelled
StatusOpen?MeaningWhat ops usually does
scheduledYesCreated; nothing has gone out yetNothing
in_progressYesAt least one step has gone out, or the customer has repliedNothing
confirmedNoSomeone will be in. outcome.signerName is set if it's someone elseDispatch
rescheduledNoThe customer picked one of your rescheduleOptions. order.date and order.window hold the new slotMove the booking in your system
action_neededNoA clear answer that needs a person: a different day, cancel, wrong person, opted out, or wants a personRead outcome.summary and follow up
unreachableNoEvery step went out and nobody answeredCall the customer before dispatch
cancelledNoYou cancelled itNothing

A closed confirmation can still change: if the customer writes again after it closed ("actually, can we make it Thursday?"), the agent reads it and the status and outcome can update. You get another webhook when that happens.

Outcome

outcome is null until there's an answer. Then it looks like this:

intentstring

What the customer meant. See the table below.

summarystring

One plain sentence for your team, such as "Confirmed; partner Jo will sign." or "Can't do Tuesday, prefers any weekday after 3pm."

signerNamestring or null

For alternate_signer: who will be in instead.

preferredstring or null

For reschedule: what suits them, in their words.

newSlotobject or null

For pick_option: the date and window they picked.

channelstring or null

Where the answer came from: email, sms, call or web (the customer page). null for no_response.

atstring

When the outcome was decided.

intentStatusMeaning
confirmconfirmedThey, or someone 18 or over in the household, will be in
alternate_signerconfirmedSomeone else, named in signerName, will be in
pick_optionrescheduledThey chose one of your rescheduleOptions
rescheduleaction_neededThey can't do it and none of the offered slots work. preferred says what would
cancelaction_neededThey want to cancel the order
not_customeraction_neededWrong person or wrong number
opt_outaction_neededThey asked to stop (STOP, unsubscribe). optedOut is set
humanaction_neededThey want a person, are unhappy, or raised something the agent can't handle, such as damage or a refund
no_responseunreachableNobody answered any step

Along the way the agent may also record question (it answered a question and asked again) or unclear (it asked them to clarify). These appear on ai events, never as an outcome.

Steps

Each channel you switch on gets one step, in the order email, text, call. A step is a planned message or call.

idstring

st_ followed by 8 hex characters.

channelstring

email, sms or call. With smsVia: "whatsapp", the sms step goes by WhatsApp.

dueAtstring

When it's due to go out.

statestring

pending, sending, sent, delivered (a text the network confirmed), failed, cancelled (no longer needed), or for calls answered, no_answer or voicemail.

liveboolean

true if it went through a real provider, false in the sandbox.

sentAtstring

When it went out.

detailstring

Why it failed, if it did.

retryboolean

true on the extra call step added after an unanswered call.

When a step fails, the next one is brought forward to a few seconds later. When the customer replies, every pending step is held back (by eight hours on the standard cadence), so nobody gets a text while they're mid-conversation by email.

Events

events is the timeline, oldest first, capped at the latest 500.

idstring

ev_ followed by 10 hex characters.

atstring

When it happened.

kindstring

system (a note, such as "Calling Priya…"), out (a message or line we sent or said), in (what the customer wrote or said), ai (what the agent understood from it) or outcome.

channelstring

email, sms, call or web. Absent on some system events.

textstring

The message, the line of the call, or the note.

subjectstring

On outbound emails.

htmlstring

On outbound emails: the full HTML that was sent.

intentstring

On ai and outcome events.

tonestring

good, warn or bad, for display.

liveboolean

Whether it happened over a real channel.

viastring

On texts: sms or whatsapp.

Call transcripts are events too: each turn of the call is an out or in event with channel: "call".

Cadence

cadence decides when steps go out.

standarddemo
Email10am, three days beforeAbout two seconds after creation
Text10am, two days beforeAbout 90 seconds later
Call11am, the day beforeAbout 90 seconds after the text
Gap between stepsAt least 2 hoursAbout 90 seconds
Contact hoursEmail 7am–9pm, texts and calls 9am–8pm, UK timeNone
Unanswered callOne retry about 3 hours laterNo retry
Pause after a reply8 hours3 minutes
Marked unreachable6 hours after the last step2 minutes after the last step

On the standard cadence a step is never scheduled in the past: if the delivery is only a day or two away, the steps go out sooner, still two hours apart and inside contact hours.

Important

If you leave cadence out, the current release uses demo. Always send "cadence": "standard" for real customers.

Base URL https://api.anyonein.co.uk/v1 is a placeholder until the production domain is confirmed. Found a mistake? Tell us.