
Create Brand
Create Campaign
Link Number
Unlink Number
Handle callbacks in your web app
To handle callbacks in your application, your endpoint should capture HTTP requests and respond to them. When Plivo sends the HTTP request callbacks to the webhook during an event, you should capture the request (POST or GET based on the method you’ve defined for the URL) and respond with a 200 OK response. You can store the callback data in your database.Note: Plivo automatically retries webhooks three times if an HTTP 200 status code is not returned:
*First at 60 seconds after the original attempt.
*Second at 120 seconds after the first retry attempt.
*Third at 240 seconds after the second retry attempt.
Possible status values
Endpoint | Status | Explanation |
---|---|---|
brand | created | Brand creation request was submitted to TCR for processing. |
rejected | Brand creation was rejected by TCR. Reach out to our support team to learn why. | |
registered | Brand was registered with TCR. You can now create campaigns using this brand. | |
campaign | created | Campaign creation request was submitted to TCR for processing. |
rejected | Campaign creation request was rejected by TCR. Reach out to our support team to learn why. | |
registered | Campaign was registered with TCR. You can now link your Plivo long codes with this campaign. | |
number_linking | created | Request to link your Plivo long code with the campaign was submitted to operators. |
failed | Request to link your Plivo long code with the campaign was rejected by operators. Retry the request; if the issue persists, contact our support team. | |
success | Request to link your Plivo long code with the campaign was processed by operators. | |
number_unlinking | created | Request to unlink your Plivo long code with the campaign was submitted to operators. |
failed | Request to unlink your Plivo long code with the campaign was rejected by operators. Retry the request; if the issue persists, contact our support team. | |
success | Request to unlink your Plivo long code with the campaign was processed by operators. This number can now be linked to other campaigns. |
Test and Validate
Let’s take a look at an example. Typically, you would include a URL that points to your web app, but we’ll use a URL from RequestBin, a service that lets you collect, analyze, and debug HTTP requests, so we can check the callbacks.- Create a new bin in RequestBin.
- Replace the “url” placeholder with the URL of the new bin.
- Run the code that appear above. You should see callback requests in RequestBin similar to the screenshots below for various callback events.
Brand created callback

Brand registered callback

Campaign created callback

Campaign registered callback

Number linking created callback

Number unlinking created callback
