For the complete documentation index, see llms.txt. This page is also available as Markdown.

Send a message

The channels list holds the channels to send on, in order. Each entry is self-contained: the channel, the sender profile it goes out from, the recipient and the content.

One entry sends on one channel and that is the whole request. Several entries are tried in order - the message goes out on the first, and moves to the next only if that one does not deliver within its failover_after. There is no failover flag; the number of entries is what decides it.

The request is all-or-nothing: if any entry is invalid or cannot be sent, the whole request is rejected and nothing goes out.

post
Authorizations
AuthorizationstringRequired

Your API key as Authorization: Bearer <key>. The Bearer prefix is case-sensitive.

Your key can additionally be restricted to the addresses you send from. Give us the list as individual addresses or CIDR blocks - 203.0.113.4, 198.51.100.0/24, 2001:db8::/32 - and a request from anywhere else is rejected with IP_NOT_ALLOWED. IPv4 and IPv6 are listed separately: an IPv4 range does not cover you if you reach us over IPv6, so if you use both, send us both. Leave the restriction empty and we accept your key from any address.

Body
Responses
202

Accepted for delivery. This is a 202, not a 200, on purpose: we have queued the message, not delivered it. The outcome arrives later in the delivery report.

application/json
request_idstring · uuidOptional

Id for this message. One id covers every channel it is tried on, and it comes back as message_id in the delivery report. Store it - it is what we need for any support question about the message.

costnumber · nullableOptional

Indicative price for the first channel tried, in your account currency. null when no price could be resolved. This is only an estimate: a failover may deliver on a different, differently-priced channel, and the delivery report's cost is what was actually charged - the two may differ.

post/v1/messages
POST /v1/messages HTTP/1.1
Host: channels.bind.hr
Authorization: Bearer YOUR_SECRET_TOKEN
Content-Type: application/json
Accept: */*
Content-Length: 157

{
  "channels": [
    {
      "channel": "viber",
      "profile_id": "8f1c1b0e-4f6a-4b7e-9a2d-2c3b4d5e6f70",
      "to": "385951234567",
      "content": {
        "text": "Your order #4182 has shipped."
      }
    }
  ]
}
{
  "request_id": "0f2b7a3c-8e4d-4a51-9f3b-1d6c7e8a9b01",
  "cost": 0.015
}

Last updated