10DLC A2P Provisioning Webhooks

Webhooks push real-time server-to-server notifications of campaign registration and line provisioning state changes occurring in your account. You must provide a public facing url to receive webhook callbacks. Webhooks payloads are in application/json format.

Campaign Webhooks

You can subscribe to the following Campaign Events.

Type Event Description
campaign add Alerts when a campaign has been activated.
campaign delete Alerts when a campaign has been deactivated.
campaign numberPool Alerts when a number pool has been added, changed or removed from a campaign.

Campaign Add Webhook

Campaign Add Payload

The campaign/add payload contains properties specific to the activation of a campaign.

POST /campaign/add HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 180
Host: your-domain.com
User-Agent: Apache-HttpClient/4.5.7 (Java/1.8.0_201)

{
  "statusCode": 0,
  "description": "Campaign Active",
  "campaignId": "abc123",
  "brandId": "xyz456",
  "mnoId": [10017, 10035, 10037],
  "numberPoolSubId": "xyz456",
  "eventDate": "2020-11-13T17:01:17.123Z"
}

Campaign Add Status Codes

The campaign/add status code will be one of the following values:

status message
0 Campaign Activated
1 TBD

Campaign Add Properties

Property Type Description
statusCode Integer See above
description String See above
campaignId String The campaign ID
brandId String The brand ID
mnoId Array Array of Carrier MNO IDs (Integers)
numberPoolSubId String Number pool sub ID. null if line is not associated with a number pool.
eventDate String UTC timestamp with milliseconds

Campaign Delete Webhook

Campaign Delete Payload

The campaign/delete payload contains properties specific to the deactivation of a campaign.

POST /campaign/delete HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 180
Host: your-domain.com
User-Agent: Apache-HttpClient/4.5.7 (Java/1.8.0_201)

{
  "statusCode": 0,
  "description": "Campaign Expired",
  "campaignId": "abc123",
  "brandId": "xyz456",
  "mnoId": [10017, 10035, 10037],
  "numberPoolSubId": "xyz456",
  "eventDate": "2020-11-13T17:01:17.123Z"
}

Campaign Delete Status Codes

The campaign/delete status code will be one of the following values:

status message
0 Campaign Expired
1 Campaign Unelected

Campaign Delete Properties

Property Type Description
statusCode Integer See above
description String See above
campaignId String The campaign ID
brandId String The brand ID
mnoId Array Array of Carrier MNO IDs (Integers)
numberPoolSubId String Number pool sub ID. null if line is not associated with a number pool.
eventDate String UTC timestamp with milliseconds

Campaign Number Pool Webhook

Campaign Number Pool Payload

The campaign/numberPool payload contains properties specific to a campaign when a number pool has been added, changed, or removed.

POST /campaign/numberPool HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 195
Host: your-domain.com
User-Agent: Apache-HttpClient/4.5.7 (Java/1.8.0_201)

{
  "statusCode": 0,
  "description": "Number pool added to campaign",
  "campaignId": "abc123",
  "brandId": "xyz456",
  "mnoId": [10017, 10035, 10037],
  "numberPoolSubId": "xyz456",
  "eventDate": "2020-11-13T17:01:17.123Z"
}

Campaign Number Pool Status Codes

The campaign/numberPool status code will be the following value:

Status Code Description
0 Number Pool Added
1 Number Pool Changed
2 Number Pool Deleted. numberPoolSubId will be set to null.

Campaign Number Pool Properties

Property Type Description
statusCode Integer See above
description String See above
campaignId String The campaign ID
brandId String The brand ID
mnoId Array Array of Carrier MNO IDs (Integers)
numberPoolSubId String Number pool sub ID. null if line is not associated with a number pool.
eventDate String UTC timestamp with milliseconds

Using Sub-ID’s for Number Pools

The numberPoolSubId is a unique identifier for the number pool. It is used to identify the specific number pool associated with the campaign.


Provisioning Webhooks

You can subscribe to the following Provisioning Events.

Type Event Description
provision add Alerts when a line provision (add) request has finished processing.
provision delete Alerts when a line de-provision (delete) request has finished processing.

Provisioning Flow and Webhook Timing

When sending a provisioning request (POST /v3/lines), you will immediately receive a 202 Accepted HTTP status code. However, it should be clarified that this does not confirm the final status of the request, in order to follow up the result you must listen to the webhook notification:

Typical Timeline Example:

  1. Client sends POST to provision a phone number.
  2. Server responds with 202 Accepted immediately.
  3. After the provisioning process has been completed, a webhook provision/add will arrive at the configured webhook URL.
  4. The webhook contains the final statusCode indicating success (200) or error.

Provision Add Webhook

Provision Add Payload

The provision/add payload contains properties specific to the status of a line provisioning (add) request.

POST /provision/add HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 192
Host: your-domain.com
User-Agent: Apache-HttpClient/4.5.7 (Java/1.8.0_201)

{
  "statusCode": 200,
  "description": "Line Provisioned",
  "lineNumber": "+12065551234",
  "campaignId": "abc123",
  "numberPoolSubId": "xyz456",
  "vendorCustomerId": "werwiou789",
  "requestId": "def789",
  "eventDate": "2020-11-13T17:01:17.123Z"
}

Provision Add Status Codes

The provision/add status code will be one of the following values:

status message
200 Line Provisioned.
41010 Requested phone number is not provisioned.
42030 Provided campaign is not active.
500 There was an error processing your request. Please try again later.

Provision Add Properties

Property Type Description
statusCode Integer See above
description String See above
lineNumber String E.164 formatted Phone Number of line provisioned
campaignId String The campaign ID
numberPoolSubId String Number pool sub ID. null if line is not associated with a number pool.
vendorCustomerId String Optional external id
requestId String The id returned when the provision request was submitted
eventDate String UTC timestamp with milliseconds

Provision Delete Webhook

Provision Delete Payload

The provision/delete payload contains properties specific to the progress of a line de-provisioning (delete) request.

POST /provision/delete HTTP/1.1
Content-Type: application/json;charset=UTF-8
Content-Length: 188
Host: your-domain.com
User-Agent: Apache-HttpClient/4.5.7 (Java/1.8.0_201)

{
  "statusCode": 200,
  "description": "Line Deleted",
  "lineNumber": "+12065551234",
  "campaignId": "abc123",
  "numberPoolSubId": "xyz456",
  "vendorCustomerId": "werwiou789",
  "requestId": "def789",
  "eventDate": "2020-11-13T17:01:17.123Z"
}

Provision Delete Status Codes

The provision/delete webhook will return the following status code:

Code Description
200 Line Deleted

Provision Delete Properties

Property Type Description
statusCode Integer See above
description String See above
lineNumber String E.164 formatted Phone Number of line provisioned
campaignId String The campaign ID
numberPoolSubId String Number pool sub ID. null if line is not associated with a number pool.
vendorCustomerId String Optional external id
requestId String The id returned when the provision request was submitted
eventDate String UTC timestamp with milliseconds

Webhook Configuration

More details to come with the final documentation for webhooks.