Skip to main content

Create New Phone Number Campaign

PUT 
/phoneNumberCampaign/:phoneNumber

This endpoint allows you to assign a different campaign to a supplied phoneNumber.

Request

Path Parameters

    phoneNumber Phonenumberrequired

Body

required

    phoneNumber Phonenumber (string)required

    The phone number you want to link to a specified campaign.

    campaignId Campaignid (string)required

    The ID of the campaign you want to link to the specified phone number.

Responses

200: Successful Response

default: Unexpected error

Request samples


curl -L -X PUT 'https://api.telnyx.com/10dlc/phoneNumberCampaign/:phoneNumber' \
-H 'Content-Type: application/json' \
-H 'Accept: application/json' \
-H 'Authorization: Bearer <TOKEN>' \
-d '{
"phoneNumber": "+18005550199",
"campaignId": "4b300178-131c-d902-d54e-72d90ba1620j"
}'

Response samples


{
"phoneNumber": "+18005550199",
"brandId": "7ba705b7-22af-493f-addc-ac04b7ca071c",
"tcrBrandId": "BBRAND1",
"campaignId": "string",
"tcrCampaignId": "CCAMPA1",
"telnyxCampaignId": "3008dd9f-66d7-40e0-bf23-bf2d8d1a96ba",
"createdAt": "2024-07-26T07:46:18.237Z",
"updatedAt": "2024-07-26T07:46:18.237Z"
}