Create external campaign

POST /v1/Services/PreregisteredUsa2p

Resource to associate preregistered campaign with Messaging Service.

application/x-www-form-urlencoded

Body

  • CampaignId string Required

    ID of the preregistered campaign.

  • MessagingServiceSid string Required

    The SID of the Messaging Service that the resource is associated with.

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

Responses

  • 201

    Created

    Hide response attributes Show response attributes object
    • account_sid string | null

      The SID of the Account that created the resource

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

    • campaign_id string | null

      ID of the preregistered campaign.

    • date_created string(date-time) | null

      The ISO 8601 date and time in GMT when the resource was created

    • The SID of the Messaging Service the resource is associated with

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

    • sid string | null

      The unique string that identifies a US A2P Compliance resource

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

POST /v1/Services/PreregisteredUsa2p
curl \
 -X POST https://messaging.twilio.com/v1/Services/PreregisteredUsa2p \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'CampaignId=string&MessagingServiceSid=string'
Request example
{
  "CampaignId": "string",
  "MessagingServiceSid": "string"
}
Response examples (201)
{
  "account_sid": "string",
  "campaign_id": "string",
  "date_created": "2023-05-04T09:42:00+00:00",
  "messaging_service_sid": "string",
  "sid": "string"
}