Create a Webhook Configuration

POST /v1/Porting/Configuration/Webhook

Create a Webhook Configuration

application/json

Body

object object

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

    Hide response attributes Show response attributes object
    • url string(uri) | null

      The URL of the webhook configuration request

    • port_in_target_url string(uri) | null

      The complete webhook url that will be called when a notification event for port in request or port in phone number happens

    • port_out_target_url string(uri) | null

      The complete webhook url that will be called when a notification event for a port out phone number happens.

    • notifications_of array[string] | null

      A list to filter what notification events to receive for this account and its sub accounts. If it is an empty list, then it means that there are no filters for the notifications events to send in each webhook and all events will get sent.

POST /v1/Porting/Configuration/Webhook
curl \
 --request POST 'https://numbers.twilio.com/v1/Porting/Configuration/Webhook' \
 --user "username:password" \
 --header "Content-Type: application/json"
Request examples
{}
Response examples (201)
{
  "url": "https://numbers.twilio.com/v1/Porting/Configuration/Webhook",
  "notifications_of": [
    "PortInWaitingForSignature",
    "PortInInProgress",
    "PortInCompleted",
    "PortInActionRequired",
    "PortInCanceled",
    "PortInExpired",
    "PortInPhoneNumberWaitingForSignature",
    "PortInPhoneNumberSubmitted",
    "PortInPhoneNumberPending",
    "PortInPhoneNumberCompleted",
    "PortInPhoneNumberRejected",
    "PortOutPhoneNumberCompleted"
  ],
  "port_in_target_url": "https://www.example.com/port-in",
  "port_out_target_url": "https://www.example.com/port-out"
}