Skip to main content
POST
/
agency
/
twilio
/
add-phone-numbers-to-messaging-service
Add phone numbers to a messaging service
curl --request POST \
  --url https://api.cleartalk.ai/agency/twilio/add-phone-numbers-to-messaging-service \
  --header 'Content-Type: application/json' \
  --header 'x-api-key: <api-key>' \
  --data '
{
  "phoneNumberSids": [
    "<string>"
  ]
}
'
{
  "success": 123,
  "failed": 123,
  "results": [
    {
      "phone_number_sid": "<string>",
      "status": "<string>",
      "data": {
        "sid": "<string>",
        "phone_number": "<string>",
        "capabilities": {},
        "date_created": "<string>"
      }
    }
  ],
  "errors": [
    {
      "phone_number_sid": "<string>",
      "status": "<string>",
      "error": "<string>"
    }
  ],
  "message": "<string>"
}

Authorizations

x-api-key
string
header
required

API Key for authentication

Body

application/json
phoneNumberSids
string[]
required

Array of phone number SIDs to add to the messaging service

Response

Phone numbers added to messaging service successfully

success
number

Number of successfully added phone numbers

failed
number

Number of failed additions

results
object[]
errors
object[]
message
string

Summary message