Custom channels
Connect your own messaging service, such as LINE or Viber, to the FieldCamp Inbox through a small bridge you run.
A custom channel is an Inbox channel whose carrier is your own service. Use it to bring a messaging app FieldCamp does not connect to directly — LINE, Viber, your own chat widget — into the same Inbox your team already works in.
You run a small service, called the bridge. It does two things:
- Customer writes on your carrier → the bridge posts the message to FieldCamp.
- Staff replies in the Inbox → FieldCamp calls the bridge, and the bridge sends the reply on your carrier.
| Step | Route | Scope |
|---|---|---|
| Create or manage a channel | /api/v1/channels, /api/v1/channels/{id} | inbox:read, inbox:write |
| Post a customer message | POST /api/v1/channels/{id}/messages | inbox:write |
| Upload a customer's file | POST /api/v1/channels/{id}/attachments | inbox:write |
| Report what happened to a reply | POST /api/v1/channels/{id}/messages/{messageId}/delivery | inbox:write |
| Catch up after an outage | GET /api/v1/channels/{id}/outbound | inbox:read |
| Link a carrier user to a client | /api/v1/channels/{id}/contacts/{externalUserId} | inbox:read, inbox:write |
Create a channel
curl -X POST https://api.fieldcamp.ai/api/v1/channels \
-H "Authorization: Bearer $FIELDCAMP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"name": "Viber",
"provider": "viber",
"callbackUrl": "https://bridge.example.com/fieldcamp"
}'| Field | Required | Description |
|---|---|---|
name | Yes | The channel name your team sees. Up to 200 characters. |
provider | No | A short lowercase label, for example viber. |
callbackUrl | No | Where FieldCamp sends staff replies. Must be https://. A channel can be created without it: incoming messages work, and replies are refused until it is set. |
isActive | No | false switches the channel off. |
line | No | Connects LINE directly. See LINE without a bridge. |
The response includes signingSecret. It is returned only here and by
rotate-secret, so store it. The bridge uses it to verify the calls
FieldCamp makes to callbackUrl.
Each channel also returns callbackStatus:
| Value | What it means |
|---|---|
not_configured | No callbackUrl is set, so staff cannot reply. |
active | Replies are being sent to the bridge. |
degraded | Several calls to the bridge have failed in a row. FieldCamp keeps trying. |
PATCH /api/v1/channels/{id} renames the channel, sets or clears
callbackUrl, or switches it on or off. DELETE switches the channel off;
its conversations and history are kept.
Post a customer message
curl -X POST https://api.fieldcamp.ai/api/v1/channels/$CHANNEL_ID/messages \
-H "Authorization: Bearer $FIELDCAMP_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"externalUserId": "U4af4980629",
"externalMessageId": "468789577898262530",
"text": "Can you come on Friday?",
"senderName": "Somchai"
}'| Field | Required | Description |
|---|---|---|
externalUserId | Yes | The customer's ID on your carrier. Up to 256 characters. |
externalMessageId | Yes | The message's ID on your carrier. Used to ignore duplicates. |
type | No | text (default), image, file, audio or video. |
text | Sometimes | Up to 10,000 characters. Required for text; a message needs text or at least one attachment. |
attachments | No | Up to 10. Each is the object returned by the attachments upload. |
timestamp | No | ISO-8601. When the customer sent it. |
senderName | No | The customer's display name. |
replyToExternalMessageId | No | The carrier ID of the message the customer quoted. |
The message appears in the Inbox as an incoming message in that customer's conversation. A new conversation is started when there is none.
The response returns message, conversation (id, displayId, status,
clientId) and clientId, with status 201.
Posting the same externalMessageId again stores nothing and returns the
first result with duplicate: true and status 200. A timed-out request can
be retried freely.
Files from the customer
FieldCamp does not download a URL you name, because a carrier's media link usually needs the carrier's token. Download the file in the bridge, then upload it:
curl -X POST https://api.fieldcamp.ai/api/v1/channels/$CHANNEL_ID/attachments \
-H "Authorization: Bearer $FIELDCAMP_API_KEY" \
-F "file=@photo.jpg"Put the returned object, unchanged, into the message's attachments array.
- One file per request, in a form field named
file, up to 25 MB. - HTML, SVG, XML and script files are refused with
415. - An empty file is refused.
Receive staff replies
When a team member replies, FieldCamp sends a signed POST to callbackUrl:
{
"id": "evt_01JD...",
"type": "channel.message.outbound",
"created_at": "2026-11-18T07:15:00.000Z",
"data": {
"workspaceId": "665f...",
"channelId": "665f...",
"provider": "viber",
"conversationId": "665f...",
"clientId": "665f...",
"messageId": "665f...",
"recipient": { "externalUserId": "U4af4980629" },
"message": {
"type": "text",
"text": "Yes, Friday at 10 works.",
"attachments": [],
"replyTo": null,
"sentAt": "2026-11-18T07:15:00.000Z",
"sender": { "id": "665f...", "name": "Dana", "type": "agent" }
}
}
}| Field | Description |
|---|---|
id | The same on every retry of one reply. Use it to ignore a repeat. |
data.messageId | Pass this in the delivery report. |
data.recipient.externalUserId | Who to send the reply to on your carrier. |
data.message.type | text, image, audio, video or file. |
data.message.attachments | url, filename, mimeType, size. The url can be fetched without credentials. |
data.message.replyTo | Set when staff quoted a message: messageId, externalMessageId, text. |
The request is signed the same way as every FieldCamp webhook. Verify it with
the channel's signingSecret; see
Verify the signature.
FieldCamp keeps retrying a reply for 24 hours until the bridge answers
2xx. After that the reply is shown to staff as Not delivered.
Report what happened
After your carrier accepts or refuses the reply, tell FieldCamp:
curl -X POST https://api.fieldcamp.ai/api/v1/channels/$CHANNEL_ID/messages/$MESSAGE_ID/delivery \
-H "Authorization: Bearer $FIELDCAMP_API_KEY" \
-H "Content-Type: application/json" \
-d '{ "status": "accepted", "externalMessageId": "468789999999" }'status | Extra fields | What staff see |
|---|---|---|
accepted | externalMessageId (optional): the carrier's ID for the sent message. | Sent. Never Delivered or Read. |
failed | reason (required, up to 500 characters) and code (optional). | Not delivered, with your reason as written. |
There are two ways to report:
- In the response to the webhook. Answer the webhook with
2xxand put the report ({ "status": "accepted", ... }or{ "status": "failed", ... }) in the response body. One round trip is enough when the bridge calls its carrier straight away. - Later, with the delivery route above. Use this when the carrier answers after the webhook has been acknowledged.
A 2xx with an empty or unrelated body means the bridge took the reply, and
it is shown to staff as Sent. The reply shows as Sending… only until
the bridge answers 2xx.
A later report replaces an earlier one, in both directions: a reply marked Sent can still be reported as failed, and a failed one as accepted.
Catch up after an outage
GET /api/v1/channels/{id}/outbound lists staff replies on the channel,
oldest first. Each row has eventId (the webhook's id), state, failure
and data — the same data as the webhook, so the bridge can run the list
through its normal handler.
| Parameter | Description |
|---|---|
state | pending, accepted or failed. pending returns every reply the bridge has not yet answered with 2xx. |
since | ISO-8601 timestamp. |
limit, cursor | limit 1–100, default 50. cursor is meta.next.cursor from the previous response. |
Link a carrier user to a client
PUT /api/v1/channels/{id}/contacts/{externalUserId} creates or updates the
carrier user in FieldCamp. URL-encode externalUserId.
| Field | Description |
|---|---|
name | The user's display name. |
clientId | A FieldCamp client ID links the user to that client. null unlinks. Leave it out to keep the current link. |
GET on the same path returns externalUserId, name, clientId, client
and the user's current conversation.
Rotate the signing secret
POST /api/v1/channels/{id}/rotate-secret returns a new signingSecret
once. The previous secret keeps signing alongside it for 24 hours, so the
bridge can switch over without a gap.
LINE without a bridge
For LINE, FieldCamp can talk to LINE itself, so no bridge is needed. Send the
LINE channel's own credentials instead of a callbackUrl:
{
"name": "LINE",
"line": {
"channelSecret": "<from LINE Developers console → Basic settings>",
"accessToken": "<from LINE Developers console → Messaging API>"
}
}The response returns webhookUrl. Set it as the webhook URL in the LINE
Developers console. You cannot set a callbackUrl on a LINE channel, and it
has no signing secret; in responses its callbackUrl shows that same
FieldCamp webhook URL. To change the LINE credentials, send a new line
object with PATCH.
Endpoints
curl -X GET "https://example.com/api/v1/channels"{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channelsRequest Body
application/json
TypeScript Definitions
Use the request body type in TypeScript.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/channels" \ -H "Content-Type: application/json" \ -d '{ "name": "LINE", "provider": "line", "callbackUrl": "https://bridge.example.com/fieldcamp/replies" }'{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}Path Parameters
Channel id
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0"{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}Path Parameters
Channel id
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
curl -X PATCH "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0" \ -H "Content-Type: application/json" \ -d '{ "callbackUrl": "https://bridge.example.com/fieldcamp/replies" }'{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}Path Parameters
Channel id
Response Body
application/json
application/json
application/json
application/json
curl -X DELETE "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0"{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}/messagesPath Parameters
Channel id
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
curl -X POST "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0/messages" \ -H "Content-Type: application/json" \ -d '{ "externalUserId": "U4af4980629", "externalMessageId": "468789577898262530", "type": "text", "text": "Do you treat termites?", "senderName": "Somchai P.", "timestamp": "2026-11-18T07:14:00Z" }'{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}/attachmentsPath Parameters
Channel id
Request Body
multipart/form-data
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
curl -X POST "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0/attachments" \ -F file="string"{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}/messages/{messageId}/deliveryPath Parameters
Channel id
FieldCamp message id of the reply
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
curl -X POST "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0/messages/665f1c2ab3e4d5f6a7b8c9d0/delivery" \ -H "Content-Type: application/json" \ -d '{ "status": "failed", "code": "user_blocked", "reason": "The customer has blocked this LINE account" }'{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}/outboundPath Parameters
Channel id
Query Parameters
pending: not reported on yet.
Only replies created at or after this time.
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0/outbound"{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}/contacts/{externalUserId}Path Parameters
Channel id
The user's id on your carrier (for LINE, the userId). URL-encode it.
Response Body
application/json
application/json
application/json
application/json
curl -X GET "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0/contacts/string"{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}/contacts/{externalUserId}Path Parameters
Channel id
The user's id on your carrier (for LINE, the userId). URL-encode it.
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
curl -X PUT "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0/contacts/string" \ -H "Content-Type: application/json" \ -d '{ "name": "Somchai P.", "clientId": "6ad87483461ccd73da576be2" }'{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}/api/v1/channels/{id}/rotate-secretPath Parameters
Channel id
Response Body
application/json
application/json
application/json
application/json
application/json
curl -X POST "https://example.com/api/v1/channels/665f1c2ab3e4d5f6a7b8c9d0/rotate-secret"{ "success": true, "code": "success.created", "message": "Client created successfully", "data": null}