Custom channels
Bring messages from anywhere into the Inbox, and send your replies back.
A custom channel connects the Inbox to something Puddle doesn't support itself: an SMS gateway, a marketplace's messages, your own app. Your server posts customers' messages to Puddle, and your team's replies come back to your server as webhooks.
Set it up
- In Settings → Inbox, under Custom channels, name the channel (e.g. "SMS") and click Add channel. Note its id.
- In Settings → Developers, create a secret API key with the
inbox:writescope (andinbox:readto fetch replies). - Add a webhook endpoint for
inbox.message.created.
Send a customer's message to the Inbox
curl -X POST https://api.puddle.co.za/v1/inbox/channels/CHANNEL_ID/messages \
-H "Authorization: Bearer psk_..." \
-H "Content-Type: application/json" \
-d '{
"from": { "kind": "PHONE", "value": "+27821234567", "name": "Thandi" },
"text": "Hi, is the blue mug back in stock?",
"externalMessageId": "sms-48213"
}'| Field | What it is |
|---|---|
from.kind | EXTERNAL (your own user id), EMAIL or PHONE |
from.value | The id, email address or phone number. Messages from the same value thread into the same conversation |
from.name, from.email | Optional details shown in the Inbox |
text | The message, up to 10,000 characters |
externalMessageId | Your id for the message. Sending it again does nothing, so retries are safe |
externalThreadId | Optional: your id for the conversation, if your system has threads |
The response has the conversationId and messageId, and duplicate: true when the message was already stored.
People who reach you through a custom channel are contacts like everyone else, but what your server says about them isn't treated as verified, so they aren't joined to other contacts automatically.
Send replies back
When your team replies, Puddle sends inbox.message.created to your webhook with "channelType": "CUSTOM", "direction": "OUTBOUND" and "kind": "MESSAGE". Ignore everything else (internal notes have "kind": "NOTE", and customers' own messages are INBOUND).
The webhook carries ids, not the text. Fetch the conversation's latest messages and take the one with the webhook's messageId:
curl "https://api.puddle.co.za/v1/inbox/conversations/CONVERSATION_ID/messages?limit=10" \
-H "Authorization: Bearer psk_..."If you have more than one custom channel, GET /inbox/conversations/{id} tells you which one (channel.id), so you send the reply the right way.

