sent-two-way-messaging
Sent Two-Way Messaging
Inbound messaging on Sent has one governing rule: consent is enforced by the platform before the application sees the event. An inbound STOP has already flipped the contact's opt_out flag by the time message.received arrives. The application's job is to record it, reflect it in its own UI, and never attempt to send around it.
Keyword handling
Ten keywords ship as defaults:
| Action | Keywords |
|---|---|
| Opt out | STOP, CANCEL, UNSUBSCRIBE, QUIT, END |
| Opt in | START, UNSTOP, SUBSCRIBE |
| Help auto-reply | HELP, INFO |
Matching requires the entire trimmed message body to equal a keyword, case-insensitively. "Please stop messaging me" does not match; "stop" does. Custom keywords are configured in the Sent Dashboard under Compliance, Opt Keywords, with an action of Opt Out, Opt In, or Help, and each must be a single exact token.
Do not claim keywords that are not in the documented set. In application code, mirror the same exact-match rule only to update local subscriber state and audit evidence; never use that matcher to apply consent to Sent a second time. Keep custom dashboard keywords synchronized with the local mirror, and reconcile against the contact's opt_out field when uncertain.