MyComm docs
Menu

Sending

Sending well

Habits that keep messages arriving and SIMs safe, in the order you meet them.

Pick the category and lane the recipient would expect#

A one-time code or a receipt is transactional; a promotion is marketing. Marketing needs consent, is refused for people who opted out and waits for the recipient's sending hours. Do not send promotional text as transactional to get around that: the content check refuses it with CATEGORY_MISMATCH, and a SIM that sends unwanted messages gets blocked. The table of categories, lanes and expiry times is in Sending messages.

Set an expiry that matches the message#

A code that arrives twenty minutes late is worse than no code. Set expires_in to how long the message is still useful (600 seconds for a one-time code), and MyComm drops it, as expired, if it could not send in time.

Make every send safe to repeat#

Use an Idempotency-Key per job, and a reference_id for the business object, so a retry or a double click cannot send twice. See Idempotency and retries.

Treat UNCONFIRMED as "maybe sent"#

When the phone loses its report, the message ends as failed with UNCONFIRMED: it may have been sent. Look before you retry, or accept the chance of a duplicate with acknowledge_possible_duplicate. Every other code is in the message lifecycle.

Count segments#

Characters outside the GSM-7 alphabet (many accented letters, Arabic, Urdu, emoji) switch a message to UCS-2, which fits 70 characters per segment instead of 160. Keep text short, avoid accidental Unicode (curly quotes pasted from a document are enough), and use a dry_run or the template preview to see the segments before a campaign.

Let the pace be the platform's#

Do not work around holds by rotating recipients, keys or phones. MyComm paces each SIM on purpose, and the same signals that delay a message protect the number from carrier blocks. See Keeping your SIM safe.

Listen instead of polling#

Subscribe to message.sent, message.delivered and message.failed instead of polling GET /v1/messages. Poll only to recover from a webhook outage, with backoff.