Customers who do not run an SMPP stack can send with a single HTTPS request and receive receipts and inbound messages as signed HTTP callbacks. The message takes the same path as an SMPP submit: durable store, firewall, routing, carrier submission and CDR.
Overview
| Interface | Direction | Purpose |
|---|---|---|
POST /send | Customer to YepMsg | Submit a message |
| Receipt webhook | YepMsg to customer | Delivery receipts |
| Inbound webhook | YepMsg to customer | Messages received for the customer's numbers |
Authentication and exposure
The send API uses HTTP Basic with the account's SMPP bind credentials. The account's IP allowlist applies to the HTTP client address. Failed logins feed the same per-source throttle as SMPP binds, and a throttled source receives 429 whatever credentials it presents.
Missing credentials give 401. Wrong credentials and a blocked address both give 403, so the response does not reveal which accounts exist.
Publish the listener over HTTPS only, with a certificate that the gateway reloads from disk when it changes, and forward the port straight to the gateway. The allowlist and the throttle read the TCP peer address, so a reverse proxy in front would make every client share the proxy's address.
Sending
{"from": "ExampleCo", "to": "447700900123", "text": "Your code is 1234", "dlr": true}
| Field | Required | Notes |
|---|---|---|
from | No | Sender address |
to | Yes | Destination number |
text | One of text or data | UTF-8. Long messages are segmented |
data | One of text or data | Base64 bytes, sent as 8-bit binary |
coding | No | auto (default), gsm, ucs2 or binary |
udh | No | Base64 user data header, for binary payloads |
dlr | No | Request a delivery receipt |
A successful response is 200 with the message ID:
{"message_id": "11111111-2222-4333-8444-555566667777"}
This is the same ID an SMPP client gets, and receipts and CDRs refer to it.
| Status | Meaning |
|---|---|
400 | Validation failure, or the carrier address was rejected |
429 | Throttled: the account's throughput cap or quota is exhausted, or the source is blocked after failed logins. Slow down and retry |
502 | Other carrier or system rejection, with the SMPP status in the body |
503 | Queue full. Retry with backoff |
The account's throughput is one budget shared between its SMPP sessions and this API. A request over the cap is refused at once and never queued.
Webhooks
An account with a receipt URL and an inbound URL receives its receipts and inbound messages there instead of over SMPP. For each direction an account uses either webhooks or SMPP, depending on whether a URL is set.
Each delivery is a POST with a JSON body and these headers:
| Header | Value |
|---|---|
Content-Type | application/json |
X-YepMsg-Event | dlr or mo |
X-YepMsg-Timestamp | Unix seconds |
X-YepMsg-Signature | sha256= and a hex HMAC, present when a secret is set |
A receipt body:
{
"type": "dlr",
"message_id": "11111111-2222-4333-8444-555566667777",
"from": "447700900123",
"to": "ExampleCo",
"status": "DELIVRD",
"error": "000",
"timestamp": "2026-11-19T10:04:46Z"
}
An inbound body carries type: "mo", the message ID, sender, receiver and the text, or base64 data for a binary message.
Your endpoint must answer 2xx within the webhook timeout. Any other answer or a transport error parks the delivery in the durable store, and it is retried every 30 seconds until it succeeds or 24 hours pass. Handlers must be idempotent on message_id. Redirects are not followed and the URL must resolve to a public address.
Verifying the signature
The secret can be set per account or for the whole gateway. Compute an HMAC-SHA256 over the timestamp, a full stop and the raw request body, and compare it in constant time with the hex in the header. Reject requests whose timestamp is far from the current time, to prevent replay.
signing_input = timestamp + "." + raw_body
expected = "sha256=" + hex(hmac_sha256(secret, signing_input))
HTTP-only customers
A customer that sends over HTTP and wants receipts needs a receipt URL. Without one, receipts go to bound SMPP sessions and wait for one. The same applies to inbound messages.
Specification
The send API is specified in a versioned document, with a variant written for coding agents that implement clients. The specification is provided to customers and evaluating teams on request. Get in touch.