Content Validation
The content validation endpoint scans outbound message text for required compliance elements. It’s a utility — use it before sending to catch compliance gaps, or let the message-log endpoint auto-scan after sending.
Validate Content (Public Endpoint)
Section titled “Validate Content (Public Endpoint)”POST https://sms.econsent.org/v1/sms/validate-contentContent-Type: application/jsonRequest
Section titled “Request”{ "message_body": "Spring sale! Get 50% off insurance quotes. Visit acme.com today.", "message_type": "marketing", "sending_entity": "Acme Insurance"}Response
Section titled “Response”{ "compliant": false, "score": 30, "issues": [ "Marketing message missing opt-out instructions (e.g., 'Reply STOP to unsubscribe')", "Message does not identify the sending business by name" ], "suggestions": [ "Add 'Reply STOP to opt out' or similar opt-out language", "Include your business name in the message body" ], "checks": { "opt_out_language": false, "sender_identification": false, "rate_disclosure": false }}What It Checks
Section titled “What It Checks”| Check | Required For | What It Looks For |
|---|---|---|
| Opt-out language | Marketing | STOP, opt out, unsubscribe, Reply STOP |
| Sender identification | Marketing | sending_entity name appears in the message body |
| Rate disclosure | Best practice | ”Msg & Data rates”, “Message and data rates” |
Scoring
Section titled “Scoring”- 100 — All checks pass
- 70 — Missing rate disclosure only (best practice, not required)
- 60 — Missing sender identification
- 30 — Missing opt-out language (critical)
Auto-scan on Message Log
Section titled “Auto-scan on Message Log”When you log a message via POST /v1/sms/message-log with a message_body field, the same content scan runs automatically. Results appear in the response as content_compliance_score and compliance_notes.
{ "phone": "+15551234567", "sending_entity": "Acme Insurance", "message_type": "marketing", "content_hash": "a1b2c3d4...", "message_body": "Acme Insurance: Your quote is ready! Reply STOP to opt out. Msg&Data rates apply."}Response includes:
{ "message_log_id": "msg_abc123", "content_compliance_score": 100, "compliance_notes": []}