Inbox
Read inbox conversations, reply to customers on the conversation's own channel, add internal notes, and assign or resolve conversations.
The Inbox API gives an integration the same conversations your team sees in the FieldCamp Inbox: SMS, WhatsApp, email, calls, Messenger, Instagram, web chat, leads, and any custom channel you have connected.
| You want to | Route | Scope |
|---|---|---|
| List or read conversations | GET /api/v1/inbox/conversations, GET .../{id} | inbox:read |
| Read a conversation's messages | GET .../{id}/messages | inbox:read |
| Reply to the customer | POST .../{id}/messages | inbox:write |
| Assign, snooze, label or resolve | PATCH .../{id} | inbox:write |
| Add an internal note | POST .../{id}/notes | inbox_notes:write |
| See internal notes in the message list | — | inbox_notes:read |
A key sees what its creator sees
The key reaches the same conversations as the person who created it. If that person's role is later limited to conversations assigned to them, the key is limited the same way. Two things a key never returns: a conversation in the trash, and any conversation in a mailbox marked private — including a private mailbox that belongs to the key's own creator.
List conversations
curl "https://api.fieldcamp.ai/api/v1/inbox/conversations?status=open&channel=whatsapp" \
-H "Authorization: Bearer $FIELDCAMP_API_KEY"Conversations are returned newest first.
| Filter | Values |
|---|---|
status | open, pending, snoozed, resolved. Comma-separate to pass several. |
channel | sms, whatsapp, email, voice, messenger, instagram, web_chat, booking_chat, lead. |
channel_id | One specific channel. Use this for a custom channel: its conversations have channel.kind other, which channel cannot select. |
assignee | A team member ID, or unassigned. |
label | One label. |
tab | focus, signal or noise, as in the Inbox. |
client_id | Conversations linked to one client. |
updated_since | ISO-8601 timestamp. |
q | The person's name, or the conversation number. At least 2 characters. |
Paging: limit (1–100, default 30) and cursor set to meta.next.cursor
from the previous response. meta.next is null on the last page.
The conversation
{id} in a path is the conversation ID or its number (the #1234 shown in
the Inbox).
| Field | Description |
|---|---|
id, number | The conversation ID and the number shown in the Inbox. |
status | open, pending, snoozed or resolved. |
priority | low, normal, high or urgent. |
labels | List of label names. |
is_noise | true when the conversation is filed under Noise. |
channel | id, type, kind, name, and replies_as — the channel a reply goes out on. |
contact | name, identifier (their phone number, email or channel user ID) and client_id when linked to a client. |
assignee | type (user, bot or null), user_id, bot_id, team_id, name. |
counts.unread | Unread messages. |
needs_attention, waiting_since | Whether the customer is waiting, and since when. |
snoozed_until, resolved_at | Set when snoozed or resolved. |
last_message_at, last_activity_at, created_at, updated_at | ISO-8601 timestamps. |
GET /api/v1/inbox/conversations/{id} adds:
| Field | Description |
|---|---|
counts.messages | Total messages in the thread. |
participants | Team members on the conversation: user_id, name, role. |
client | The linked client: id, name, email, phone. |
linked | client_id, job_ids and request_ids linked to the conversation. |
reply | How a reply will be sent: channel, and for WhatsApp window (open, expires_at, last_inbound_at) and template_required. |
Read messages
GET /api/v1/inbox/conversations/{id}/messages returns the thread, newest
first. Paging: limit (1–100, default 50) and cursor.
| Field | Description |
|---|---|
id, conversation_id | Message and conversation IDs. |
type | message, or note for an internal note. |
direction | inbound or outbound. |
content_type, content | The kind of content and the content itself. |
attachments | filename, mime_type, size, download_url. |
sender | type, id, name. type is api for a message sent through the API. |
sent_via | The API key that sent it, or null. |
channel | id, type, kind. |
status, error_code | Delivery status, and the error code when delivery failed. |
email | For email: subject, from, to, to_addresses, cc, bcc. null on other channels. |
scheduled_for, created_at, updated_at | ISO-8601 timestamps. |
Internal notes are included only when the key also holds inbox_notes:read.
Add include_notes=false to leave them out. meta.notes_included says which
you got.
Reply to the customer
POST /api/v1/inbox/conversations/{id}/messages sends a reply on the
conversation's own channel. The channel cannot be chosen.
curl -X POST https://api.fieldcamp.ai/api/v1/inbox/conversations/$CONVERSATION_ID/messages \
-H "Authorization: Bearer $FIELDCAMP_API_KEY" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: reply-7781" \
-d '{ "content": "Your technician is on the way." }'| Field | Description |
|---|---|
content | The text, up to 10,000 characters. Required unless you send template. |
template | WhatsApp only: { name, language, variables }. language defaults to en. Send either content or template, not both. |
subject, cc, bcc | Email only, all optional. subject is up to 500 characters. Without a subject the reply is threaded under the original one. |
from | Email only: the address to send from. |
Channel rules:
| Channel | Rule |
|---|---|
Free text only within 24 hours of the customer's last message. After that the reply returns 409 WHATSAPP_WINDOW_CLOSED and an approved template must be sent. | |
| Call or lead conversation | The reply goes out as an SMS from the account's texting number and stays in the same thread. |
subject, cc, bcc and from are optional. |
The response has status 201 and returns the stored message with its
delivery status. Later delivery changes arrive as the
inbox.message.delivery_updated webhook event.
Refusals:
| Status | Code | When |
|---|---|---|
422 | VALIDATION_ERROR | Missing content, unknown field, both content and template, or template on a non-WhatsApp conversation. |
409 | WHATSAPP_WINDOW_CLOSED | The 24-hour window is closed. |
409 | CHANNEL_UNAVAILABLE | The conversation's channel is no longer connected. |
409 | MESSENGER_WINDOW_CLOSED, INSTAGRAM_WINDOW_CLOSED | The 24-hour messaging window on that channel is closed. |
409 | NO_CONTACT_PHONE | The contact has no phone number to text. |
409 | SMS_NOT_CONFIGURED | The account has no texting number set up. |
409 | CHANNEL_NOT_REPLYABLE | This kind of channel cannot send replies. |
409 | MAILBOX_PAUSED, MAILBOX_DISCONNECTED, MAILBOX_PRIVATE_SENDER | Email: the mailbox cannot send right now, or is private to another person. |
409 | SEND_AS_REJECTED, SEND_AS_UNAVAILABLE | Email: the from address is not one the mailbox may send as. |
409 | CARRIER_REJECTED | The carrier refused the message. |
502 | SEND_FAILED | The reply could not be handed to the channel; it may not have been sent. |
Send an Idempotency-Key
The same key returns the first response and sends nothing new, so a retry cannot message the customer twice. See Idempotency.
Assign, snooze, label or resolve
PATCH /api/v1/inbox/conversations/{id} takes any of these fields. Send at
least one.
| Field | Description |
|---|---|
status | open, pending, resolved or snoozed. snoozed needs a future snoozed_until. |
snoozed_until | ISO-8601 timestamp. |
assignee_id | A team member ID. null unassigns. |
priority | low, normal, high or urgent. |
labels | Replaces the whole list. Up to 50 labels of up to 80 characters each. |
is_noise | true or false. |
Setting status to resolved does what the Resolve button does: the
conversation is unassigned, and the customer's next message reopens it.
Add an internal note
POST /api/v1/inbox/conversations/{id}/notes with { "content": "..." }
adds a note for the team. A note is never sent to the customer. content is
required, up to 10,000 characters. Idempotency-Key is supported.
Webhook events
| Event | Sent when |
|---|---|
inbox.conversation.created | A new conversation starts. |
inbox.conversation.updated | Status, assignee or other details change. changes says what. |
inbox.message.received | A customer message arrives. |
inbox.message.sent | A reply is sent. |
inbox.message.delivery_updated | The delivery status of a reply changes. |
inbox.note.created | An internal note is added. Delivered only to keys that hold inbox_notes:read. |
Subscribe through Webhooks.
Endpoints
/api/v1/inbox/conversationsPublic API key: Authorization: Bearer fc_live_… (or X-Api-Key). fc_test_… keys work only on sandbox accounts. Scoped keys work on /api/v1 only.
In: header
Query Parameters
open | pending | snoozed | resolved; comma-separated for several.
sms | whatsapp | email | voice | messenger | instagram | web_chat | booking_chat | lead, or a channel type (twilio_sms, whatsapp_meta, …).
A team member id, or unassigned (no person and no AI).
focus = open, not noise, waiting on a reply or flagged, and unowned or owned by the key's person. signal = everything not noise. noise = newsletters / automated mail.
Conversations linked to this client.
Who the conversation is with (client name, company, email, phone / address on the channel) or the conversation number. At least 2 characters.
meta.next.cursor of the previous page, unchanged.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/inbox/conversations"{ "success": true, "data": [ { "id": "string", "number": 0, "status": "open", "priority": "low", "labels": [ "string" ], "is_noise": true, "noise": { "source": "string", "reason": "string" }, "channel": { "id": "string", "type": "string", "kind": "sms", "name": "string", "replies_as": "string" }, "contact": { "name": "string", "identifier": "string", "client_id": "string" }, "assignee": { "type": "user", "user_id": "string", "bot_id": "string", "team_id": "string", "name": "string" }, "counts": { "unread": 0, "messages": 0 }, "needs_attention": true, "waiting_since": "2019-08-24T14:15:22Z", "snoozed_until": "2019-08-24T14:15:22Z", "resolved_at": "2019-08-24T14:15:22Z", "last_message_at": "2019-08-24T14:15:22Z", "last_activity_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "meta": { "page": 0, "limit": 0, "total": 0, "next": { "cursor": "string", "limit": 0 } }}/api/v1/inbox/conversations/{id}Public API key: Authorization: Bearer fc_live_… (or X-Api-Key). fc_test_… keys work only on sandbox accounts. Scoped keys work on /api/v1 only.
In: header
Path Parameters
Conversation id, or its number (the #1234 the app shows).
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/inbox/conversations/string"{ "success": true, "data": { "id": "string", "number": 0, "status": "open", "priority": "low", "labels": [ "string" ], "is_noise": true, "noise": { "source": "string", "reason": "string" }, "channel": { "id": "string", "type": "string", "kind": "sms", "name": "string", "replies_as": "string" }, "contact": { "name": "string", "identifier": "string", "client_id": "string" }, "assignee": { "type": "user", "user_id": "string", "bot_id": "string", "team_id": "string", "name": "string" }, "counts": { "unread": 0, "messages": 0 }, "needs_attention": true, "waiting_since": "2019-08-24T14:15:22Z", "snoozed_until": "2019-08-24T14:15:22Z", "resolved_at": "2019-08-24T14:15:22Z", "last_message_at": "2019-08-24T14:15:22Z", "last_activity_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "participants": [ { "user_id": "string", "name": "string", "role": "string" } ], "client": { "id": "string", "name": "string", "email": "string", "phone": "string" }, "linked": { "client_id": "string", "job_ids": [ "string" ], "request_ids": [ "string" ] }, "reply": { "channel": "string", "window": { "open": true, "expires_at": "2019-08-24T14:15:22Z", "last_inbound_at": "2019-08-24T14:15:22Z" }, "template_required": true } }}/api/v1/inbox/conversations/{id}Public API key: Authorization: Bearer fc_live_… (or X-Api-Key). fc_test_… keys work only on sandbox accounts. Scoped keys work on /api/v1 only.
In: header
Path Parameters
Conversation id, or its number (the #1234 the app shows).
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X PATCH "https://example.com/api/v1/inbox/conversations/string" \ -H "Content-Type: application/json" \ -d '{}'{ "success": true, "data": { "id": "string", "number": 0, "status": "open", "priority": "low", "labels": [ "string" ], "is_noise": true, "noise": { "source": "string", "reason": "string" }, "channel": { "id": "string", "type": "string", "kind": "sms", "name": "string", "replies_as": "string" }, "contact": { "name": "string", "identifier": "string", "client_id": "string" }, "assignee": { "type": "user", "user_id": "string", "bot_id": "string", "team_id": "string", "name": "string" }, "counts": { "unread": 0, "messages": 0 }, "needs_attention": true, "waiting_since": "2019-08-24T14:15:22Z", "snoozed_until": "2019-08-24T14:15:22Z", "resolved_at": "2019-08-24T14:15:22Z", "last_message_at": "2019-08-24T14:15:22Z", "last_activity_at": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z", "participants": [ { "user_id": "string", "name": "string", "role": "string" } ], "client": { "id": "string", "name": "string", "email": "string", "phone": "string" }, "linked": { "client_id": "string", "job_ids": [ "string" ], "request_ids": [ "string" ] }, "reply": { "channel": "string", "window": { "open": true, "expires_at": "2019-08-24T14:15:22Z", "last_inbound_at": "2019-08-24T14:15:22Z" }, "template_required": true } }, "meta": { "changed": [ "string" ] }}/api/v1/inbox/conversations/{id}/messagesPublic API key: Authorization: Bearer fc_live_… (or X-Api-Key). fc_test_… keys work only on sandbox accounts. Scoped keys work on /api/v1 only.
In: header
Path Parameters
Conversation id, or its number (the #1234 the app shows).
Query Parameters
meta.next.cursor of the previous page, unchanged.
false leaves notes out for a key that may read them.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/inbox/conversations/string/messages"{ "success": true, "data": [ { "id": "string", "conversation_id": "string", "type": "message", "direction": "inbound", "content_type": "string", "content": "string", "attachments": [ { "filename": "string", "mime_type": "string", "size": 0 } ], "sender": { "type": "contact", "id": "string", "name": "string" }, "sent_via": { "type": "api_key", "api_key_id": "string", "name": "string" }, "channel": { "id": "string", "type": "string", "kind": "string" }, "status": "string", "error_code": "string", "in_reply_to_id": "string", "email": { "subject": "string", "from": "string", "to": "string", "to_addresses": [ "string" ], "cc": [ "string" ], "bcc": [ "string" ] }, "scheduled_for": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" } ], "meta": { "limit": 0, "total": 0, "next": { "cursor": "string", "limit": 0 }, "notes_included": true }}/api/v1/inbox/conversations/{id}/messagesPublic API key: Authorization: Bearer fc_live_… (or X-Api-Key). fc_test_… keys work only on sandbox accounts. Scoped keys work on /api/v1 only.
In: header
Path Parameters
Conversation id, or its number (the #1234 the app shows).
Header Parameters
Makes a retry safe: the same key and body return the first response (Idempotent-Replayed: true) and nothing is sent again. Kept 24 h. 5xx responses are not remembered.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/inbox/conversations/string/messages" \ -H "Content-Type: application/json" \ -d '{ "content": "We can be there at 3pm today." }'{ "success": true, "data": { "id": "string", "conversation_id": "string", "type": "message", "direction": "inbound", "content_type": "string", "content": "string", "attachments": [ { "filename": "string", "mime_type": "string", "size": 0 } ], "sender": { "type": "contact", "id": "string", "name": "string" }, "sent_via": { "type": "api_key", "api_key_id": "string", "name": "string" }, "channel": { "id": "string", "type": "string", "kind": "string" }, "status": "string", "error_code": "string", "in_reply_to_id": "string", "email": { "subject": "string", "from": "string", "to": "string", "to_addresses": [ "string" ], "cc": [ "string" ], "bcc": [ "string" ] }, "scheduled_for": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }}/api/v1/inbox/conversations/{id}/notesPublic API key: Authorization: Bearer fc_live_… (or X-Api-Key). fc_test_… keys work only on sandbox accounts. Scoped keys work on /api/v1 only.
In: header
Path Parameters
Conversation id, or its number (the #1234 the app shows).
Header Parameters
Makes a retry safe: the same key and body return the first response (Idempotent-Replayed: true) and nothing is sent again. Kept 24 h. 5xx responses are not remembered.
Request Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/inbox/conversations/string/notes" \ -H "Content-Type: application/json" \ -d '{ "content": "string" }'{ "success": true, "data": { "id": "string", "conversation_id": "string", "type": "message", "direction": "inbound", "content_type": "string", "content": "string", "attachments": [ { "filename": "string", "mime_type": "string", "size": 0 } ], "sender": { "type": "contact", "id": "string", "name": "string" }, "sent_via": { "type": "api_key", "api_key_id": "string", "name": "string" }, "channel": { "id": "string", "type": "string", "kind": "string" }, "status": "string", "error_code": "string", "in_reply_to_id": "string", "email": { "subject": "string", "from": "string", "to": "string", "to_addresses": [ "string" ], "cc": [ "string" ], "bcc": [ "string" ] }, "scheduled_for": "2019-08-24T14:15:22Z", "created_at": "2019-08-24T14:15:22Z", "updated_at": "2019-08-24T14:15:22Z" }}