Skip to Content
API and MCPResources

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 toRouteScope
List or read conversationsGET /api/v1/inbox/conversations, GET .../{id}inbox:read
Read a conversation's messagesGET .../{id}/messagesinbox:read
Reply to the customerPOST .../{id}/messagesinbox:write
Assign, snooze, label or resolvePATCH .../{id}inbox:write
Add an internal notePOST .../{id}/notesinbox_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.

FilterValues
statusopen, pending, snoozed, resolved. Comma-separate to pass several.
channelsms, whatsapp, email, voice, messenger, instagram, web_chat, booking_chat, lead.
channel_idOne specific channel. Use this for a custom channel: its conversations have channel.kind other, which channel cannot select.
assigneeA team member ID, or unassigned.
labelOne label.
tabfocus, signal or noise, as in the Inbox.
client_idConversations linked to one client.
updated_sinceISO-8601 timestamp.
qThe 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).

FieldDescription
id, numberThe conversation ID and the number shown in the Inbox.
statusopen, pending, snoozed or resolved.
prioritylow, normal, high or urgent.
labelsList of label names.
is_noisetrue when the conversation is filed under Noise.
channelid, type, kind, name, and replies_as — the channel a reply goes out on.
contactname, identifier (their phone number, email or channel user ID) and client_id when linked to a client.
assigneetype (user, bot or null), user_id, bot_id, team_id, name.
counts.unreadUnread messages.
needs_attention, waiting_sinceWhether the customer is waiting, and since when.
snoozed_until, resolved_atSet when snoozed or resolved.
last_message_at, last_activity_at, created_at, updated_atISO-8601 timestamps.

GET /api/v1/inbox/conversations/{id} adds:

FieldDescription
counts.messagesTotal messages in the thread.
participantsTeam members on the conversation: user_id, name, role.
clientThe linked client: id, name, email, phone.
linkedclient_id, job_ids and request_ids linked to the conversation.
replyHow 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.

FieldDescription
id, conversation_idMessage and conversation IDs.
typemessage, or note for an internal note.
directioninbound or outbound.
content_type, contentThe kind of content and the content itself.
attachmentsfilename, mime_type, size, download_url.
sendertype, id, name. type is api for a message sent through the API.
sent_viaThe API key that sent it, or null.
channelid, type, kind.
status, error_codeDelivery status, and the error code when delivery failed.
emailFor email: subject, from, to, to_addresses, cc, bcc. null on other channels.
scheduled_for, created_at, updated_atISO-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." }'
FieldDescription
contentThe text, up to 10,000 characters. Required unless you send template.
templateWhatsApp only: { name, language, variables }. language defaults to en. Send either content or template, not both.
subject, cc, bccEmail only, all optional. subject is up to 500 characters. Without a subject the reply is threaded under the original one.
fromEmail only: the address to send from.

Channel rules:

ChannelRule
WhatsAppFree 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 conversationThe reply goes out as an SMS from the account's texting number and stays in the same thread.
Emailsubject, 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:

StatusCodeWhen
422VALIDATION_ERRORMissing content, unknown field, both content and template, or template on a non-WhatsApp conversation.
409WHATSAPP_WINDOW_CLOSEDThe 24-hour window is closed.
409CHANNEL_UNAVAILABLEThe conversation's channel is no longer connected.
409MESSENGER_WINDOW_CLOSED, INSTAGRAM_WINDOW_CLOSEDThe 24-hour messaging window on that channel is closed.
409NO_CONTACT_PHONEThe contact has no phone number to text.
409SMS_NOT_CONFIGUREDThe account has no texting number set up.
409CHANNEL_NOT_REPLYABLEThis kind of channel cannot send replies.
409MAILBOX_PAUSED, MAILBOX_DISCONNECTED, MAILBOX_PRIVATE_SENDEREmail: the mailbox cannot send right now, or is private to another person.
409SEND_AS_REJECTED, SEND_AS_UNAVAILABLEEmail: the from address is not one the mailbox may send as.
409CARRIER_REJECTEDThe carrier refused the message.
502SEND_FAILEDThe 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.

FieldDescription
statusopen, pending, resolved or snoozed. snoozed needs a future snoozed_until.
snoozed_untilISO-8601 timestamp.
assignee_idA team member ID. null unassigns.
prioritylow, normal, high or urgent.
labelsReplaces the whole list. Up to 50 labels of up to 80 characters each.
is_noisetrue 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

EventSent when
inbox.conversation.createdA new conversation starts.
inbox.conversation.updatedStatus, assignee or other details change. changes says what.
inbox.message.receivedA customer message arrives.
inbox.message.sentA reply is sent.
inbox.message.delivery_updatedThe delivery status of a reply changes.
inbox.note.createdAn internal note is added. Delivered only to keys that hold inbox_notes:read.

Subscribe through Webhooks.

Endpoints

GET/api/v1/inbox/conversations

Authorization

AuthorizationBearer <token>

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

Query Parameters

status?string

open | pending | snoozed | resolved; comma-separated for several.

channel?string

sms | whatsapp | email | voice | messenger | instagram | web_chat | booking_chat | lead, or a channel type (twilio_sms, whatsapp_meta, …).

channel_id?string
assignee?string

A team member id, or unassigned (no person and no AI).

label?string
tab?string

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.

client_id?string

Conversations linked to this client.

updated_since?string
q?string

Who the conversation is with (client name, company, email, phone / address on the channel) or the conversation number. At least 2 characters.

limit?integer
cursor?string

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    }  }}
GET/api/v1/inbox/conversations/{id}

Authorization

AuthorizationBearer <token>

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

id*string

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    }  }}
PATCH/api/v1/inbox/conversations/{id}

Authorization

AuthorizationBearer <token>

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

id*string

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"    ]  }}
GET/api/v1/inbox/conversations/{id}/messages

Authorization

AuthorizationBearer <token>

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

id*string

Conversation id, or its number (the #1234 the app shows).

Query Parameters

limit?integer
cursor?string

meta.next.cursor of the previous page, unchanged.

include_notes?boolean

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  }}
POST/api/v1/inbox/conversations/{id}/messages

Authorization

AuthorizationBearer <token>

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

id*string

Conversation id, or its number (the #1234 the app shows).

Header Parameters

Idempotency-Key?string

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"  }}
POST/api/v1/inbox/conversations/{id}/notes

Authorization

AuthorizationBearer <token>

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

id*string

Conversation id, or its number (the #1234 the app shows).

Header Parameters

Idempotency-Key?string

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"  }}

On this page