PushizoDocs
Channels

SMS

The SMS channel — Twilio and Netgsm providers, E.164 numbers, segment counting and Turkish characters, short links, STOP/START/HELP automation, MMS and inbound webhooks.

The SMS channel sends through POST /v1/notifications (target.channels: ["sms"]), campaigns and journeys; the body is the contents field (language selection + Liquid). For two-way conversations and keyword automations, see two-way SMS.

Providers

ProviderFields (secret in italics)Validation
twilioaccount_sid, auth_token, from_number (E.164 or alphanumeric) or messaging_service_sidGET /Accounts/{sid}.json
netgsmusercode, password, msgheader, iys_filter (0/11/12)GET /sms/rest/v2/msgheader + header check
mock—simulation

API: PUT /v1/apps/{app_id}/channels/sms + POST …/validate (admin).

Numbers and subscriptions

  • Numbers are stored in E.164 (+905321234567); on SDK/API registration, spaces, hyphens, parentheses and the 00 prefix are normalized, and an invalid value returns 400.
  • SDK: Pushizo.User.addSms('+90 532 …') → POST /sdk/v1/apps/{app_id}/subscriptions (channel: "sms"); for a logged-in user, external_id (+ identity_hash) proves ownership; for an anonymous user, the device's subscription_id does.
  • Server: POST /v1/apps/{app_id}/users/by/{label}/{value}/subscriptions { "channel": "sms", "token": "+90…" }, or send directly with target.include_phone_numbers.

Content fields

FieldDescription
contentsBody (language map, Liquid)
sms_fromSender number/header override
sms_media_urlsMMS media (up to 10, https://); Twilio only — 422 on Netgsm, MMS_NOT_SUPPORTED at send time
disable_sms_link_shorteningLinks are not converted to /t/s/{code} short links

Segment counting: GSM-7 is 160 characters for a single part / 153 per part for multipart; UCS-2 is 70 / 67. The Turkish letters ş ğ ı İ ç are outside GSM-7 and drop the message to UCS-2; the dashboard warns you. With Netgsm encoding: TR (the Turkish single-shift table), these letters count as 2 septets. The preview POST …/templates/{id}/render (channel: "sms") returns body, encoding, segments, non_gsm_characters, turkish_characters; counts.sms_segments accumulates in the message counters.

Short links: GET /t/s/{code} (8-character base62, 90 days) counts the click and redirects with a 302.

STOP / START / HELP

  • STOP → suppression stop + subscription unsubscribed + subscription.unsubscribed webhook; START → the stop entry is removed and the subscription becomes active again.
  • HELP / INFO / YARDIM / BİLGİ (the latter two are the Turkish keywords) → help; when apps.settings.sms.autoReply is on, the helpReply / stopReply text is sent as a transactional SMS to that single subscription (preferences).
  • Sources: Twilio inbound message webhook (Advanced Opt-Out OptOutType or keyword), Netgsm inbox polling (once a minute), generic webhook { "type": "stop" | "start" | "help", "address": "+90…" }.

Inbound webhooks and reports

URL: Channels → SMS → Webhook URL ({API_URL}/hooks/sms/{twilio|mock}/{token}).

ProviderSetupVerificationEvents
TwilioStatusCallback is added automatically on send; set the same URL as the number's A message comes in addressX-Twilio-Signaturedelivered, undelivered/failed (+ErrorCode), inbound STOP/START/HELP
NetgsmNo push webhook: the worker polls the delivery report (/sms/rest/v2/report, last 72 hours) and the inbox once a minute—Report 1 → delivered, 3 → invalid number (subscription invalid)
Generic (mock)JSON POSTURL tokendelivered, failed, stop, start, help

Local development

Mock SMS: numbers ending in 0001 are invalid, 0002 permanent failure, 0003 transient, 0004 rate limit, 0005 authentication error; all others succeed. To try STOP: curl -X POST "<webhook URL>" -H 'content-type: application/json' -d '{"type":"stop","address":"+905320000111"}'.

On this page