Skip to content
Not publicly available.This reference describes Ambula API v1 before launch. Endpoints, limits and fields can still change.

Conversations

A conversation is one phone call and everything that came with it: the summary and agreements Ambula extracted, the caller, and the messages, photos, videos and locations the caller sent on WhatsApp. Its id is the call’s id.

Conversation webhooks carry only ids and the names of changed fields, so caller details stay out of your logs. Fetch the conversation for its current state.

List conversations

GET/v1/conversations

Requires the scope conversations:read.

Available from phase 1

Calls and their WhatsApp threads (gesprekken, meldingen), newest first.

Query parameters

statusstring

ringing, active or ended.

created_afterISO 8601

Only records created after this time.

created_beforeISO 8601

Only records created before this time.

updated_afterISO 8601

Only records changed after this time. For a sync, pass your last sync time minus 60 seconds and deduplicate by id.

limitinteger

Page size, 1 to 100. Default 25.

cursorstring

The next_cursor of the previous page.

Get a conversation

GET/v1/conversations/{id}

Requires the scope conversations:read.

Available from phase 1

One conversation: its summary, agreements, callback, caller, location and counts of what the caller sent.

List a conversation's messages

GET/v1/conversations/{id}/messages

Requires the scope conversations:read.

Available from phase 1

The WhatsApp messages in the conversation, oldest first: what the caller sent and the replies.

Query parameters

limitinteger

Page size, 1 to 100. Default 25.

cursorstring

The next_cursor of the previous page.

List a conversation's images or videos

GET/v1/conversations/{id}/images

Requires the scope conversations:read.

Available from phase 1

Photos the caller sent. /videos works the same way. Each url is a signed link valid for 15 minutes; fetch the list again for a new one.

Query parameters

limitinteger

Page size, 1 to 100. Default 25.

cursorstring

The next_cursor of the previous page.

List a conversation's locations

GET/v1/conversations/{id}/locations

Requires the scope conversations:read.

Available from phase 1

Locations the caller shared on WhatsApp, and the one geocoded from the call.

Get the call recording

GET/v1/conversations/{id}/recording

Requires the scope recordings:read.

Available from phase 2

A short-lived link to the call recording. Each request issues a new one.

Update a conversation

PATCH/v1/conversations/{id}

Requires the scope conversations:write.

Available from phase 2

Change what a dispatcher can change: the title and summary shown, notes, the location hint, archiving, and the callback's status. Send If-Match with the ETag from your last read.

Body

titlestring

Shown instead of the generated title.

notesstring[]

Dispatcher notes.

location_hintstring

Where on the address the animal is, for example "achter het hek".

archivedboolean

Archive or restore the conversation.

callback_statusstring

done or dismissed.

Reply on WhatsApp

POST/v1/conversations/{id}/messages

Requires the scope messages:send.

Available from phase 4

Send the caller a WhatsApp message. Only within 24 hours of the caller's last message, and only when the company allows replies.

Side effect. Sends a WhatsApp message to the caller.

Body

textstringrequired

The message, up to 4,096 characters.

Create a conversation

POST/v1/conversations

Requires the scope conversations:write.

Available from phase 4

Register a melding from your own intake, such as a form on your website. It has no call, so no recording or transcript.

Body

callerobjectrequired

phone and, optionally, name.

descriptionstringrequired

What was reported.

locationobject

address, latitude and longitude.