Create external campaign
Resource to associate preregistered campaign with Messaging Service.
Body
-
ID of the preregistered campaign.
-
The SID of the Messaging Service that the resource is associated with.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^MG[0-9a-fA-F]{32}$
. -
Customers should use this flag during the ERC registration process to indicate to Twilio that the campaign being registered is undergoing CNP migration. It is important for the user to first trigger the CNP migration process for said campaign in their CSP portal and have Twilio accept the sharing request, before making this api call.
POST
/v1/Services/PreregisteredUsa2p
curl \
--request POST 'https://messaging.twilio.com/v1/Services/PreregisteredUsa2p' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'CampaignId=CMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&CnpMigration=false&MessagingServiceSid=MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
Request example
{"CampaignId"=>"CMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "CnpMigration"=>false, "MessagingServiceSid"=>"MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
Response examples (201)
{
"sid": "QE2c6890da8086d771620e9b13fadeba0b",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"campaign_id": "CMaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2021-03-21T21:31:00Z",
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}