Add a new phone number or phone number 1k prefix to SafeList.

POST /v1/SafeList/Numbers

Add a new phone number or phone number 1k prefix to SafeList.

application/x-www-form-urlencoded

Body

  • PhoneNumber string Required

    The phone number or phone number 1k prefix to be added in SafeList. Phone numbers must be in E.164 format.

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
    • sid string | null

      The unique string that we created to identify the SafeList resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^GN[0-9a-fA-F]{32}$.

    • phone_number string | null

      The phone number or phone number 1k prefix in SafeList.

POST /v1/SafeList/Numbers
curl \
 --request POST 'https://accounts.twilio.com/v1/SafeList/Numbers' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'PhoneNumber=%2B18001234567'
Request example
{"PhoneNumber"=>"+18001234567"}
Response examples (201)
{
  "sid": "GNaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "phone_number": "+18001234567"
}