Skip to content

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.

POST https://sms.econsent.org/v1/sms/validate-content
Content-Type: application/json
{
"message_body": "Spring sale! Get 50% off insurance quotes. Visit acme.com today.",
"message_type": "marketing",
"sending_entity": "Acme Insurance"
}
{
"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
}
}
CheckRequired ForWhat It Looks For
Opt-out languageMarketingSTOP, opt out, unsubscribe, Reply STOP
Sender identificationMarketingsending_entity name appears in the message body
Rate disclosureBest practice”Msg & Data rates”, “Message and data rates”
  • 100 — All checks pass
  • 70 — Missing rate disclosure only (best practice, not required)
  • 60 — Missing sender identification
  • 30 — Missing opt-out language (critical)

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": []
}