Live

Custom channel: your own transport

Running your own app, chat or messaging bridge? The custom channel lets your agent talk through it. You push the messages people send in, and DMWire posts your agent's replies to a URL you choose.

Set your webhook

Ask your agent to set the custom channel webhook, or call set_custom_channel_webhook with a public https URL on your side:

bash
curl -X PUT https://api.dmwire.ai/v1/channels/custom \
  -H "X-API-Key: $DMWIRE_API_KEY" -H "Content-Type: application/json" \
  -d '{"webhook_url":"https://example.com/dmwire/outgoing?token=<your secret>"}'

Private network addresses and DMWire's own hosts are refused. get_custom_channel_status shows the URL, and disconnect_custom_channel removes it, after which replies stop.

Push incoming messages

Each time someone writes to you on your side, send it in with push_custom_channel_message:

bash
curl -X POST https://api.dmwire.ai/v1/channels/custom/inbound \
  -H "X-API-Key: $DMWIRE_API_KEY" -H "Content-Type: application/json" \
  -d '{"customData":{"fromId":"user-4821","body":"Do you have a table for two tonight?","firstName":"Maria"}}'
Field in customDataMeaning
bodyThe message text (required)
fromIdThe sender's id on your side. It becomes the contact's external id
messageSidYour id for the message
toIdYour receiving id, if you have several
channelA label for where the message came from on your side (for example support-chat). The contact keeps it, and your webhook gets it back as channel
mediaUrl, mediaContentTypeA public https attachment and its type
firstName, lastName, emailOptional details for the contact

The contact is created on its first message. The message then reaches your agent like any other (wait_for_messages or a message.received webhook).

Replies

Your agent replies with send_message and to.external_id set to the sender's fromId (or to.contact_id). Each call is one message, so a reply in two or three short messages is two or three calls, and your webhook gets one POST for each. DMWire then POSTs JSON to your webhook:

FieldMeaning
messageIdThe message id, the same one get_message takes
contactIdThe contact's id
toIdThe contact's external id: the fromId you pushed
channelThe label for this message: to.custom_channel when the send set one, else the contact's label, else empty
bodyThe text to deliver
mediaUrl, mediaContentType, mediaFileNameAn attachment, when there is one
isVoiceNotetrue when the attachment should be shown as a voice note

Set the channel label on a send

A message to someone who never wrote in has no label yet, so channel would arrive empty. Add to.custom_channel to the send to tell your webhook where it belongs:

bash
curl -X POST https://api.dmwire.ai/v1/messages \
  -H "X-API-Key: $DMWIRE_API_KEY" -H "Content-Type: application/json" \
  -d '{"to":{"external_id":"user-4821","custom_channel":"support-chat"},"text":"Your table for two is booked for 19:30."}'

curl -X POST https://api.dmwire.ai/v1/messages \
  -H "X-API-Key: $DMWIRE_API_KEY" -H "Content-Type: application/json" \
  -d '{"to":{"external_id":"user-4821"},"text":"Anything we should know, like an allergy?"}'

The second message needs no label: the contact took support-chat on the first one.

CaseWhat happens
New contactThe contact is created with this label, and the message carries it
Contact without a labelThe contact takes this label from now on
Contact that already has a labelThe contact keeps its own label; this one is used for this message only

The label is plain text of up to 64 characters. It works on the custom channel only: on any other channel the send answers 400 with invalid_custom_channel.

Other fields may appear; ignore what you do not use. The request is not signed, so put a secret in the URL, as in the example above, and check it on your side. Answer with any 2xx status once you have taken the message. A message your webhook does not accept is marked failed.

Limits on the custom channel

LimitValue
Messages you send per day (free limits)50
New contacts per day (free limits)10
Messages to one person who has not replied3, then DMWire waits for their reply

Last checked against the live service on 2026-10-23.