Skip to main content
GET
/
api
/
businesses
/
me
/
phone-compliance
SMS Compliance
curl --request GET \
  --url https://api.example.com/api/businesses/me/phone-compliance
Phone Compliance covers the required carrier registration flow for NearIQ-owned SMS numbers. The customer flow is:
  1. Provision a business phone number.
  2. Register the number or business for SMS compliance.
  3. Wait for carrier approval.
  4. Send SMS only after the number is approved.
In API terms: provision the number, register compliance, wait for approval, then send. NearIQ keeps voice calling separate. Voice can continue while SMS compliance is pending, but outbound SMS returns sms_compliance_pending until the relevant toll-free verification or 10DLC campaign is approved.

GET /api/businesses/me/phone-compliance

Returns compliance records for the active business, including status, rejection details, submitted dates, and the matching phone number.
curl "https://app.neariq.io/api/businesses/me/phone-compliance" \
  -H "Cookie: neariq-session=..."

POST /api/businesses/me/phone-compliance

Submits compliance for the active business phone number. Toll-free numbers use carrier toll-free verification. Local US numbers use A2P 10DLC brand registration and campaign registration through the configured Messaging Service.
curl -X POST "https://app.neariq.io/api/businesses/me/phone-compliance" \
  -H "Content-Type: application/json" \
  -H "Cookie: neariq-session=..." \
  -d '{
    "phoneNumberId": "00000000-0000-4000-8000-000000000000",
    "businessName": "Aster Grove Fitness",
    "businessWebsite": "https://aster.example",
    "businessType": "PRIVATE_PROFIT",
    "businessStreetAddress": "100 Market St",
    "businessCity": "Austin",
    "businessStateProvinceRegion": "TX",
    "businessPostalCode": "78701",
    "businessCountry": "US",
    "businessContactFirstName": "Ari",
    "businessContactLastName": "Rivera",
    "businessContactEmail": "owner@example.com",
    "businessContactPhone": "+15125550123",
    "useCaseCategories": ["CUSTOMER_CARE"],
    "useCaseSummary": "Customer care, review requests, reminders, and local business updates.",
    "productionMessageSample": "Hi, this is Aster Grove Fitness. Reply STOP to opt out.",
    "optInType": "WEB_FORM",
    "messageVolume": "100",
    "messageSamples": ["Hi, this is Aster Grove Fitness. Reply STOP to opt out."]
  }'

PATCH /api/businesses/me/phone-compliance/

Updates and resubmits a rejected or draft registration. The body accepts the same fields as POST, but all fields are optional.

POST /api/compliance/status-callback

Signed communications-provider callback endpoint for compliance status changes. It updates phone_compliance and the linked business_phone_numbers row. If callbacks are missed, the worker polls pending registrations every six hours. When the status changes, NearIQ sends branded transactional email to the account notification email, profile email, or registration contact email:
  • Approved: “Your SMS number is ready!”
  • Rejected/action required/expired: “SMS verification needs attention”
  • Pending after three days: “Your SMS number is being reviewed”
  • Pending after seven days: “We’ve escalated your verification - no action needed from you”
Customer email bodies stay provider-neutral. The daily worker records pending reminders with pending_reminder_sent_at, records escalations with escalated_at, and writes compliance_escalated to messaging_audit_log. Set SMS_COMPLIANCE_SUPPORT_WEBHOOK_URL on the worker if stuck-review escalations should also post into an internal support intake; otherwise the customer email and audit log still run.

SMS Send Gate

All outbound SMS sends check the linked phone number before contacting the communications provider. If approval is not complete, the API returns:
{
  "error": "sms_compliance_pending",
  "message": "SMS sending requires compliance approval. Current status: pending_review",
  "complianceStatus": "pending_review"
}

Admin

Admins can audit all registrations:
curl "https://app.neariq.io/api/admin/phone-compliance?status=pending_review" \
  -H "Cookie: neariq-session=..."