Send a message
POST/messages
POST /messages: send one SMS to one recipient, with idempotency and the 202 response shape.
Send one SMS. to is a single Israeli mobile number (E.164 +9725XXXXXXXX or local 05XXXXXXXX; normalised & validated). from must be an approved sender (see List senders); a phone sender is accepted in either form, +9725XXXXXXXX or 05XXXXXXXX. body is up to 603 characters. The optional Idempotency-Key header makes retries safe.
mode declares the send purpose: "marketing" checks the recipient against this workspace's unsubscribe list and rejects with 403 RECIPIENT_UNSUBSCRIBED (nothing is charged); "transactional" skips that check and is your recorded declaration that the message is operational (verification codes, order updates, reminders) and not marketing content. When mode is omitted, the workspace default set at the top of this page applies (marketing unless declared otherwise). Sending marketing content in transactional mode violates the Terms of Service and Israel's anti-spam law (s.30A of the Communications Law) - liability is yours.
curl -X POST https://sendy.co.il/api/v1/messages \
-H "Authorization: Bearer sk_live_8Jc…" \
-H "Content-Type: application/json" \
-H "Idempotency-Key: order-1042" \
-d '{
"to": "+972501234567",
"from": "Sendy",
"body": "Your verification code is 4827",
"mode": "transactional"
}'const res = await fetch(`https://sendy.co.il/api/v1/messages`, {
method: "POST",
headers: {
Authorization: "Bearer sk_live_8Jc…",
"Content-Type": "application/json",
"Idempotency-Key": "order-1042",
},
body: JSON.stringify({
to: "+972501234567",
from: "Sendy",
body: "Your verification code is 4827",
mode: "transactional",
}),
});
const message = await res.json();{
"id": "cmqzkdkul0007p20mf0r4tz21",
"status": "queued",
"to": "+972501234567",
"from": "Sendy",
"credits_charged": 1,
"credits_refunded": 0,
"refunded": false,
"created_at": "2026-06-29T18:41:32.877Z"
}credits_charged is the billed cost: 1 credit = 1 message of up to 201 characters - in Hebrew, English, or both - computed as ceil(body length / 201). A 220-character message is 2 credits.
credits_refunded / refunded. If a message is refunded - a genuine gateway rejection, a cancellation, or a no-receipt reclaim - credits_refunded returns the amount and refunded becomes true. The net cost is credits_charged − credits_refunded. A plain delivery failure (undelivered) is not refunded.
Unsubscribed recipients. Whether a send is filtered against this workspace's unsubscribe list is controlled by mode (above), not a separate toggle. A "marketing" send whose to matches a contact that has unsubscribed is rejected with 403 RECIPIENT_UNSUBSCRIBED and no credit is charged; a "transactional" send skips that check. When mode is omitted, the workspace default set at the top of this page applies (marketing unless declared otherwise).