AgentMessage
Campaigns

Register a 10DLC campaign

POST
/v1/campaigns

Registers a new 10DLC campaign under your organization and returns 202 Accepted with the campaign resource. The campaign starts in PENDING status; its registry id and per-carrier metadata are populated asynchronously as carrier registration completes.

The referenced brand must belong to your organization; brand ids from another organization return 404 NOT_FOUND. The brand's identity status must be VERIFIED or VETTED_VERIFIED; otherwise the request is rejected with 409 BRAND_NOT_VERIFIED.

The usecase, description, message_flow, and brand_id fields are required, and at least one sample message must be provided. When the subscriber opt-out or subscriber help flags are set, the corresponding STOP and HELP keywords must be present, as required by CTIA.

Requires the campaigns:write scope.

AuthorizationBearer <token>

Authenticate by sending your API key as a bearer token: Authorization: Bearer am_live_.... Every request is automatically scoped to the organization that owns the key and to the scopes granted to that key.

In: header

Request Body

application/json

TypeScript Definitions

Use the request body type in TypeScript.

Response Body

application/json

application/json

application/json

application/json

application/json

application/json

curl -X POST "https://example.com/v1/campaigns" \  -H "Content-Type: application/json" \  -d '{    "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",    "usecase": "string",    "description": "string",    "message_flow": "string"  }'
{
  "success": true,
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "details": {
      "property1": "string",
      "property2": "string"
    }
  },
  "meta": {
    "total": 0,
    "limit": 0,
    "offset": 0,
    "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNC0yNlQxMjowMDowMFoiLCJpZCI6IjAxOTAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMSJ9",
    "last_event_at": "2019-08-24T14:15:22Z"
  },
  "data": {
    "id": "497f6eca-6276-4993-bfeb-53cbbbba6f08",
    "org_id": "a40f5d1f-d889-42e9-94ea-b9b33585fc6b",
    "brand_id": "1bb61461-e5e3-4ebb-8cc6-5b0c37f1b7da",
    "tcr_campaign_id": "string",
    "reference_id": "string",
    "status": "PENDING",
    "usecase": "string",
    "sub_usecases": [
      "string"
    ],
    "vertical": "string",
    "description": "string",
    "message_flow": "string",
    "help_message": "string",
    "embedded_link": true,
    "embedded_phone": true,
    "terms_and_conditions": true,
    "number_pool": true,
    "age_gated": true,
    "direct_lending": true,
    "subscriber_optin": true,
    "subscriber_optout": true,
    "subscriber_help": true,
    "sample1": "string",
    "sample2": "string",
    "sample3": "string",
    "sample4": "string",
    "sample5": "string",
    "optin_keywords": "string",
    "optout_keywords": "string",
    "help_keywords": "string",
    "optin_message": "string",
    "optout_message": "string",
    "privacy_policy_link": "http://example.com",
    "terms_and_conditions_link": "http://example.com",
    "embedded_link_sample": "string",
    "mno_ids": [
      0
    ],
    "tag": [
      "string"
    ],
    "auto_renewal": true,
    "mno_metadata": {
      "property1": {
        "mno": "string",
        "mnoSupport": true,
        "mnoReview": true,
        "qualify": true,
        "minMsgSamples": 0,
        "reqSubscriberOptin": true,
        "reqSubscriberOptout": true,
        "reqSubscriberHelp": true,
        "noEmbeddedLink": true,
        "noEmbeddedPhone": true,
        "msgClass": "string",
        "tpm": 0,
        "mmsTpm": 0,
        "tpmScope": "string",
        "brandTier": "string",
        "brandDailyCap": 0
      },
      "property2": {
        "mno": "string",
        "mnoSupport": true,
        "mnoReview": true,
        "qualify": true,
        "minMsgSamples": 0,
        "reqSubscriberOptin": true,
        "reqSubscriberOptout": true,
        "reqSubscriberHelp": true,
        "noEmbeddedLink": true,
        "noEmbeddedPhone": true,
        "msgClass": "string",
        "tpm": 0,
        "mmsTpm": 0,
        "tpmScope": "string",
        "brandTier": "string",
        "brandDailyCap": 0
      }
    },
    "monthly_fee": 0,
    "submitted_at": "2019-08-24T14:15:22Z",
    "billed_date": "2019-08-24T14:15:22Z",
    "next_renewal_or_expiration_date": "string",
    "expiration_date": "2019-08-24T14:15:22Z",
    "rejection_reasons": [
      "string"
    ],
    "rejected_at": "2019-08-24T14:15:22Z",
    "created_at": "2019-08-24T14:15:22Z",
    "updated_at": "2019-08-24T14:15:22Z"
  }
}
{
  "success": false,
  "error": {
    "code": "UNAUTHORIZED",
    "message": "authentication failed",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
  }
}
{
  "success": false,
  "error": {
    "code": "FORBIDDEN",
    "message": "missing required scope",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
  }
}
{
  "success": false,
  "error": {
    "code": "NOT_FOUND",
    "message": "not found",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM"
  }
}
{
  "success": true,
  "data": null,
  "error": {
    "code": "string",
    "message": "string",
    "request_id": "string",
    "details": {
      "property1": "string",
      "property2": "string"
    }
  },
  "meta": {
    "total": 0,
    "limit": 0,
    "offset": 0,
    "next_cursor": "eyJjcmVhdGVkX2F0IjoiMjAyNi0wNC0yNlQxMjowMDowMFoiLCJpZCI6IjAxOTAwMDAwLTAwMDAtMDAwMC0wMDAwLTAwMDAwMDAwMDAwMSJ9",
    "last_event_at": "2019-08-24T14:15:22Z"
  }
}
{
  "success": false,
  "error": {
    "code": "VALIDATION_FAILED",
    "message": "validation failed",
    "request_id": "01JTBQH2FZ8K1RXC0WJ4Z9P3VM",
    "details": {
      "to": "must be E.164",
      "body": "must be 1..1600 chars"
    }
  }
}