Skip to content
A2PCheck
A2PCheck/API Docs

A2P 10DLC pre-scan API

Add A2P 10DLC campaign pre-scanning to your messaging workflows: validate descriptions, sample messages, opt-in flows, and policy URLs over JSON — one campaign per call, scripted across your pipeline — before they're registered through Twilio, Plivo, Vonage, or any other provider.

The API checks campaign readiness; registration itself always happens with your provider. New to the review process? Start with what A2P verification means, or try a one-off scan in the free scanner.

Machine-readable specs are published: /openapi.json (OpenAPI 3.1) and /llms-full.txt (full field reference for AI agents). Building an agent or coding harness? See the agent guide.

Wiring the API into a provider-specific flow? See what each provider's registration reviews before you script the submission: Twilio, Plivo, Vonage, or the full provider list. The API checks readiness; registration stays with your provider.

For agencies, consultants & platform teams

If you register A2P 10DLC campaigns on behalf of clients — or your product onboards businesses that do — use the API to pre-scan every campaign before it reaches Twilio / TCR. Common patterns: gate submission on a GREEN report, surface per-field findings inline in your onboarding form, or store the scan output for client audit trails.

Create a self-serve API key from your developer dashboard and pass it as a bearer token for headless / API access. Scans run against your account and spend your credits. Anonymous/basic validation still works without a key for low-volume checks.

Create an API key

Authentication

Bearer auth is optional for the agent endpoint. Without a token, scans run under the anonymous/basic limits. Create a self-serve key from your developer dashboard and send it as a bearer token to run full scans against your account's credits. The full key is shown once at creation — we store only a hash, so save it then.

Authorization: Bearer a2p_live_your_api_key_here

Endpoints

POST/api/agent/validate

Stable JSON endpoint for AI agents and coding harnesses. Body: { tier?, campaign, campaignName?, idempotencyKey? }. Bearer token optional; defaults to the anonymous basic tier. Documented in /openapi.json.

NOTE/api/v1/scan · /api/v1/scan/quick

These are the underlying worker routes used by the hosted app. Agents should prefer /api/agent/validate, which keeps the payload stable and same-origin.

Request Body

{
  "useCaseType": "MARKETING",          // required
  "campaignDescription": "...",         // required
  "sampleMessages": ["msg1", "msg2"],   // required, 2-5 items
  "messageFlow": "...",                 // required
  "businessName": "Acme Inc",           // optional
  "privacyPolicyUrl": "https://...",    // optional
  "websiteUrl": "https://...",          // optional
  "termsOfServiceUrl": "https://...",   // optional
  "optInKeywords": ["START"],           // optional
  "optOutKeywords": ["STOP"],           // optional
  "helpKeywords": ["HELP"],             // optional
  "optInMessage": "...",                // optional
  "optOutMessage": "...",               // optional
  "helpMessage": "...",                 // optional
  "embeddedLinks": true,                // optional
  "embeddedPhoneNumbers": false,        // optional
  "ageGatedContent": false,             // optional
  "directLending": false,               // optional
  "numberPool": false                   // optional
}

Example

curl -X POST https://www.a2pcheck.com/api/agent/validate \
  -H "Content-Type: application/json" \
  -H "Authorization: Bearer a2p_live_your_api_key_here" \
  -d '{
    "tier": "full",
    "campaign": {
      "useCaseType": "MARKETING",
      "campaignDescription": "Weekly promotional offers...",
      "sampleMessages": [
        "Acme: 20% off this week! Shop at acme.com/sale. Reply STOP to opt out.",
        "Acme: New arrivals just dropped! Browse at acme.com/new. Msg&data rates apply."
      ],
      "messageFlow": "Customers opt in via checkout checkbox at acme.com",
      "optOutKeywords": ["STOP"],
      "helpKeywords": ["HELP"]
    }
  }'

Error Codes

StatusCodeDescription
400BAD_REQUESTMalformed body / invalid tier / missing campaign
401INVALID_API_KEYAPI key is missing, unknown, or revoked
401AUTH_REQUIREDThis scan tier needs a signed-in account or key
402INSUFFICIENT_CREDITSAccount needs more scan credits
429ANON_SCAN_LIMITAnonymous per-IP daily limit hit
5xxSCAN_FAILEDUpstream scan failure (retry later)

Headless API access

Self-serve API keys are live. Create one from your developer dashboard and send it as a bearer token. The anonymous basic endpoint still works without a key for low-volume agent checks.

Create an API key