Skip to content

Messaging

Messages that show their working.

Send SMS with one request on carrier routes. Every reply carries the segment count and the exact cost, and the delivery receipt arrives as a signed webhook.

$0.00426

Lowest live rate, India

per segment

$0.001

Most the platform fee can be on a message

1,000

Messages in one bulk request

Overview

One POST sends a message and tells you what it cost

Messaging carries alerts, reminders, receipts and conversations over SMS. You choose a sender, we count the segments the way networks do, route the message by the strategy you pass and book the charge before it leaves.

At a glance

Send
POST /comms/sms
Status
GET /comms/sms/{messageId}
Bulk
POST /comms/sms/bulk, up to 1,000
Auth
Bearer API key, scope sms:send
Body
Up to 1,600 characters
Throughput
10 send requests a second per key

Capabilities

Everything a transactional sender needs

Built for teams who reconcile every message against an invoice.

  • Segments counted before sending

    GSM-7 fits 160 characters, or 153 per part once split. Unicode fits 70, or 67 per part. The count is done before the message leaves, so the cost is never a surprise.

    segments in every reply

  • The exact cost in the reply

    Rate, segments and fee are booked together. If the route refuses the message the charge is reversed and the reply says so.

    cost, status in SmsResult

  • Your brand or your number as sender

    Send from an alphanumeric name or a number. Each SMS route states which sender types it carries before you use it.

    from, up to 30 characters

  • Routing per message

    Leave out the route and Smart Routing picks one for the destination by cheapest, best_quality or balanced. Or pin a route you bought on the marketplace.

    strategy or routeId

  • Retries that never double-send

    Send an X-Idempotency-Key and a retried request replays the first reply for 24 hours instead of sending and billing again.

    X-Idempotency-Key header

  • Two-way on your own numbers

    Texts to a number you hold are posted to your URL, and you reply from the same number. Conversations are kept per number.

    PUT /dids/{id}/sms-settings, POST /dids/{id}/messages

  • Bulk sends

    Up to 1,000 messages in one request on an SMS route you bought, sent in order, with a status for each.

    POST /comms/sms/bulk

  • A sandbox on the real path

    Test keys validate, route, count and price the message on a real route, then simulate the send against sandbox credit and mark it simulated.

    px_test_sk_ keys

Send a message

Your first message is one request

Pass the destination, the sender and the text. The reply carries the message ID, the segment count and the cost.

  • Leave out routeId and Smart Routing picks the route. Pass strategy to choose cheapest, best_quality or balanced.
  • The reply status is the send-time outcome. Delivered or failed follows from the carrier receipt, on routes that return one.
curl -X POST https://packetexchange.io/api/v1/comms/sms \
  -H "Authorization: Bearer $PACKETEXCHANGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: $(uuidgen)" \
  -d '{
    "to": "+447700900123",
    "from": "Riverside",
    "message": "Your order 1042 is out for delivery and arrives between 14:00 and 16:00."
  }'

Response

{
  "success": true,
  "data": {
    "messageId": "…",
    "status": "accepted",
    "segments": 1,
    "cost": "…",
    "submittedAt": "…"
  }
}

Two-way messaging

Receive and reply on your own number

Point a number you hold at your URL. Inbound texts are posted there as they arrive, and you answer from the same number with one request.

  • Numbers come from the number store. Not every number type carries SMS; the store shows which do.
  • Every inbound text also raises the number.sms.received webhook, signed like every other event.
# Texts to the number are POSTed to your URL.
curl -X PUT https://packetexchange.io/api/v1/dids/$NUMBER_ID/sms-settings \
  -H "Authorization: Bearer $PACKETEXCHANGE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "smsEnabled": true, "forwardWebhookUrl": "https://example.com/inbound-sms" }'

# Reply from the same number.
curl -X POST https://packetexchange.io/api/v1/dids/$NUMBER_ID/messages \
  -H "Authorization: Bearer $PACKETEXCHANGE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "X-Idempotency-Key: $(uuidgen)" \
  -d '{ "to": "+447700900123", "body": "Thanks, we have your message." }'

On carrier routes

Routes you can see, priced before you send

Every SMS route on the marketplace states its rate, its sender types and whether it has returned delivery receipts lately. Smart Routing chooses among them per message.

Webhooks

Events, signed and retried

Subscribe an HTTPS endpoint once and every message reports back. Each delivery is signed and retried until your endpoint answers.

Each delivery carries X-PX-Signature, v1= followed by an HMAC SHA-256 of the timestamp and the raw body, with the timestamp in X-PX-Timestamp. Failed deliveries are retried with a growing back-off, and every attempt can be read and resent.

  • sms.sentThe route accepted the message.
  • sms.deliveredA carrier receipt confirmed delivery. Never inferred.
  • sms.failedThe route refused it or the carrier reported it undelivered. The charge is refunded.
  • number.sms.receivedA text arrived on a number you hold.
  • balance.lowYour balance fell below your threshold.

Pricing

Per segment, at the route rate

A message is billed per segment at the rate of the route that carries it, plus a platform fee of 2% of that cost that never exceeds $0.001 for the whole message. A refused or failed message costs nothing.

Account and API keys
Free
Platform fee
2% of carrier cost, at most $0.001 a message
Failed or refused message
Refunded
Top up
From $5 by card or crypto

Lowest live rates right now, per segment

  • United States$0.0092 /msg
  • India$0.00426 /msg
  • Pakistan$0.03375 /msg
  • Nigeria$0.0062 /msg
  • Philippines$0.1573 /msg

Live rates are the cheapest listed route for an ordinary mobile number in each destination, read from the marketplace as this page was served. Look up any number on the pricing page.

In production

Built for production

The details that keep a messaging integration honest at volume.

  • Delivered means deliveredA message moves to delivered only on a carrier receipt that says so, never by inference, and each route shows whether it has returned receipts in the last 30 days.
  • No charge for a refused sendIf the route refuses the hand-off, the charge is reversed at once and the reply shows a cost of zero.
  • Retries that never double-sendAn X-Idempotency-Key replays the original reply for 24 hours, so a retry never sends or bills the same message twice.
  • Guardrails before routingEmbargoed destinations are refused before routing or billing, and your suppression list applies to every send.
  • Events you can proveEvery webhook is signed with HMAC SHA-256 over the timestamp and body, retried with back-off, logged, and can be resent from the dashboard.
  • A sandbox on the real pathTest keys validate, route, count segments and price on a real route, then simulate the send, so tests answer exactly like production.

Moving over

Your sends map across, field by field.

Coming from Twilio

The names you know, mapped

If you have built on Twilio, most of what you know carries over. These are the pieces that change for this product.

TwilioMessages resource, POST .../Messages.jsonHerePOST /comms/smsJSON body with to, from and message instead of form-encoded To, From and Body.
TwilioAccount SID and Auth Token (Basic auth)HereOne API key as a Bearer tokenRestrict a key to sms:send so it can message and do nothing else.
TwilioStatusCallback URL on each messageHereWebhook endpoints on the accountSubscribe once to sms.sent, sms.delivered and sms.failed.
TwilioMessage SIDHeremessageIdRead the message any time at GET /comms/sms/{messageId}.
TwilioMessaging Service routingHerefrom per message, Smart Routing per destinationPick the sender on each request, and the route by strategy or a route you bought.
TwilioIncoming message webhook with a TwiML replyHereforwardWebhookUrl on the number, reply with POST /dids/{id}/messagesYour endpoint answers 200; the reply is its own request.
TwilioTest credentialsHereTest keys (px_test_sk_)Same endpoints, simulated sends, marked simulated: true.

Twilio is a trademark of Twilio Inc. PacketExchange is not affiliated with or endorsed by Twilio.

Questions

Messaging, answered

How is a message billed?
Per segment, at the route's rate for the destination's longest matching prefix, plus a platform fee of 2% of that cost, never more than $0.001 for the whole message. The reply states the segments and the cost.
Do I get delivery receipts?
When the route returns one. The send reply carries the send-time outcome, then GET /comms/sms/{messageId} and the sms.delivered or sms.failed webhook follow when the carrier receipt arrives. A failed message is refunded.
Which sender IDs can I use?
An alphanumeric name or a number, up to 30 characters of letters, digits, spaces and . + _ -. Each SMS route states whether it carries alphanumeric, numeric or pre-registered senders.
Can people text me back?
Yes, on a number you hold from the number store that carries SMS. Set a forwarding URL on the number and inbound texts are posted to it; reply with POST /dids/{id}/messages.
Can I test without sending?
Yes. Test keys run the full path and simulate the send against sandbox credit, so nothing is delivered and your balance is untouched. Sandbox credit is added with an invite code.
Is there a monthly fee?
No. The account and keys are free and you pay per message from a prepaid balance, topped up from $5 by card or crypto.

Send your first message today

Free account, an API key on sign-up and carrier rates from the first message. No contract and no monthly fee.

Prefer to talk it through? Contact the team.