I'm interested in the process of onboarding customers into the A2P-10DLC campaigns.
I'm reading the documentation for the Secondary Customer Profile creation using the Twilio Trusthub API.
I see that I can provide a status callback URL as part of the customer profile creation process, as described here.
The Trusthub API documentation mentions after the customer profile has been submitted for review, it will notify the status_callback
URL with the status changes. That is described here.
My question is: Where can I see the contract of the request body sent by Twilio to the status_callback
URL after the customer profile has been reviewed?
I been reading the Twilio A2P-10DLC documentation for onboarding clients and the TrustHub API reference, but I can't seem to find the data contract I'm looking for.
I could not locate either...And, I checked through the various github respositories. But, if I had to guess, the status_callback payload will be the same or similar to the one shown in the example "Submit for Review":
{
"sid": "BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"policy_sid": "RNXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"friendly_name": "friendly_name",
"status": "pending-review",
"email": "email",
"status_callback": "http://www.example.com",
"valid_until": null,
"date_created": "2019-07-30T22:29:24Z",
"date_updated": "2019-07-31T01:09:00Z",
"url": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
"links": {
"customer_profiles_entity_assignments": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/EntityAssignments",
"customer_profiles_evaluations": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/Evaluations",
"customer_profiles_channel_endpoint_assignment": "https://trusthub.twilio.com/v1/CustomerProfiles/BUXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX/ChannelEndpointAssignments"
}
}
Friendly reminder that Twilio Webhooks are in application/x-www-form-urlencoded format - not JSON. You will have to parse and create your own contract. For example:
You can confirm the webhook payload by creating a secondard profile, setting the status_callback to an endpoint that will capture and collect any traffic such as a requestbin.
A last option to consider is opening a ticket, asking Twilio Support for the webhook payload and asking them to update the public documentation.