REST API v1POST /api/v1/audit10DLC · Toll-Free · FCC AI Voice

Pre-Flight Compliance API for ISVs, CRMs & AI Voice Platforms

Stop letting your sub-accounts submit broken opt-in URLs to Twilio TrustHub, Telnyx, or Bandwidth. Call POST /api/v1/audit during customer onboarding to deterministically verify their live website DOM, checkboxes, and Privacy Policy—and auto-generate a compliant Usa2p payload in real time.

1. Endpoint & Authentication

Send a POST request to https://campaignpass.vercel.app/api/v1/audit. Pass your Lemon Squeezy License Key in the x-campaignpass-key header (or Authorization: Bearer YOUR_KEY) to unlock the full remediationPack in the JSON response.

cURLRequest Example (POST /api/v1/audit)
curl -X POST https://campaignpass.vercel.app/api/v1/audit \
  -H "Content-Type: application/json" \
  -H "x-campaignpass-key: YOUR_LEMON_SQUEEZY_LICENSE_KEY" \
  -d '{
    "url": "https://clientdomain.com/book",
    "brandName": "Harbor & Pine Dental",
    "useCase": "MARKETING",
    "description": "Appointment reminders and dental promos",
    "samples": [
      "Your appointment is tomorrow at 3pm."
    ]
  }'

2. Structured JSON Response

Returns a deterministic 0–100 compliance score, exact Twilio/TCR error codes with DOM evidence, and a ready-to-submit twilioUsa2pPayload object mapped to Twilio's /v1/Services/{Sid}/Compliance/Usa2p parameters (including the mandatory 2026 privacy_policy_url and terms_and_conditions_url fields).

200 OKResponse Payload (Authenticated)
{
  "ok": true,
  "apiVersion": "2026-10-16",
  "authenticated": true,
  "score": 11,
  "verdict": "reject",
  "verdictLabel": "This filing gets rejected.",
  "brandName": "Harbor & Pine Dental",
  "useCase": "MARKETING",
  "pageUrl": "https://clientdomain.com/book",
  "privacyUrl": "https://clientdomain.com/privacy",
  "termsUrl": "https://clientdomain.com/terms",
  "findings": [
    {
      "code": "30925",
      "severity": "fail",
      "title": "No separate SMS consent box",
      "evidence": "I agree to the Terms of Service and Privacy Policy."
    },
    {
      "code": "30932",
      "severity": "fail",
      "title": "The privacy policy will fail the mobile-data test",
      "evidence": "We may share your mobile number and SMS consent with marketing partners..."
    }
  ],
  "remediationPack": {
    "twilioUsa2pPayload": {
      "brand_name": "Harbor & Pine Dental",
      "us_app_to_person_usecase": "MARKETING",
      "description": "Harbor & Pine Dental sends recurring promotional and appointment text messages...",
      "message_flow": "End users opt in on the public web form at https://clientdomain.com/book...",
      "message_samples": [
        "Harbor & Pine Dental: [first name], a spot opened on [date]. Reply STOP to unsubscribe.",
        "Harbor & Pine Dental: 20% off this month for text subscribers. See https://clientdomain.com/offer Reply STOP to opt out."
      ],
      "has_embedded_links": true,
      "has_embedded_phone": false,
      "opt_in_message": "Harbor & Pine Dental: You are subscribed to recurring messages...",
      "opt_out_message": "Harbor & Pine Dental: You are unsubscribed and will receive no further messages.",
      "help_message": "Harbor & Pine Dental: For help visit https://clientdomain.com/book...",
      "privacy_policy_url": "https://clientdomain.com/privacy",
      "terms_and_conditions_url": "https://clientdomain.com/terms"
    },
    "optInFormHtml": "<form>...</form>",
    "ctiaPrivacyClause": "No mobile information will be shared with third parties or affiliates..."
  }
}