Assign Messaging Profile To Campaign

posthttps://api.telnyx.com/10dlc/phoneNumberAssignmentByProfile

This endpoint allows you to link all phone numbers associated with a Messaging Profile to a campaign. Please note: if you want to assign phone numbers to a campaign that you did not create with Telnyx 10DLC services, this endpoint allows that provided that you've shared the campaign with Telnyx. In this case, only provide the parameter, tcrCampaignId, and not campaignId. In all other cases (where the campaign you're assigning was created with Telnyx 10DLC services), only provide campaignId, not tcrCampaignId.

curl -X POST \ --header 'Content-Type: application/json' \ --header 'Accept: application/json' \ --header 'Authorization: Bearer YOUR_API_KEY' \ --data-raw '{ "messagingProfileId":"400517b4-1f01-43b7-a518-8fa039bd4bf7", "campaignId":"4b300187-f92a-4bxa-20a5-57mq47b35d50" }' \ 'https://api.telnyx.com/10dlc/phoneNumberAssignmentByProfile'

Parameters

In Body (application/json)
messagingProfileId
string
()
required
The ID of the messaging profile that you want to link to the specified campaign.
Example: "4001767e-ce0f-4cae-9d5f-0d5e636e7809"
tcrCampaignId
string
()
optional
The TCR ID of the shared campaign you want to link to the specified messaging profile (for campaigns not created using Telnyx 10DLC services only). If you supply this ID in the request, do not also include a campaignId.
Example: "CWZTFH1"
campaignId
string
()
optional
The ID of the campaign you want to link to the specified messaging profile. If you supply this ID in the request, do not also include a tcrCampaignId.
Example: "4b300178-131c-d902-d54e-72d90ba1620j"

Responses

202
Successful Response

Success Response

{
  "messagingProfileId": "4001767e-ce0f-4cae-9d5f-0d5e636e7809",
  "tcrCampaignId": "CWZTFH1",
  "campaignId": "4b300178-131c-d902-d54e-72d90ba1620j",
  "taskId": "667a80f8-b0a9-49d0-b9ab-a7a1bcc45086"
}

...

gethttps://api.telnyx.com/10dlc/phoneNumberAssignmentByProfile/{taskId}

...

...

Parameters

Responses

Success Response

...

gethttps://api.telnyx.com/10dlc/phoneNumberAssignmentByProfile/{taskId}/phoneNumbers

...

...

Parameters

Responses

Success Response

Was this page helpful?