Create channel sender

POST /v1/Services/{MessagingServiceSid}/ChannelSenders

A Messaging Service resource to read, fetch all Channel Senders associated with a Messaging Service.

Path parameters

  • MessagingServiceSid string Required

    The SID of the Service to create the resource under.

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

application/x-www-form-urlencoded

Body

  • Sid string Required

    The SID of the Channel Sender being added to the Service.

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

Responses

  • 201 application/json

    Created

    Hide headers attributes Show headers attributes
    • Access-Control-Allow-Origin string

      Specify the origin(s) allowed to access the resource

    • Access-Control-Allow-Methods string

      Specify the HTTP methods allowed when accessing the resource

    • Access-Control-Allow-Headers string

      Specify the headers allowed when accessing the resource

    • Access-Control-Allow-Credentials boolean

      Indicates whether the browser should include credentials

    • Access-Control-Expose-Headers string

      Headers exposed to the client

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

      The SID of the Account that created the ChannelSender resource.

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

    • messaging_service_sid string | null

      The SID of the 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 we created to identify the ChannelSender resource.

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

    • sender string | null

      The unique string that identifies the sender e.g whatsapp:+123456XXXX.

    • sender_type string | null

      A string value that identifies the sender type e.g WhatsApp, Messenger.

    • country_code string | null

      The 2-character ISO Country Code of the number.

    • date_created string(date-time) | null

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

    • date_updated string(date-time) | null

      The date and time in GMT when the resource was last updated specified in ISO 8601 format.

    • url string(uri) | null

      The absolute URL of the ChannelSender resource.

POST /v1/Services/{MessagingServiceSid}/ChannelSenders
curl \
 --request POST 'https://messaging.twilio.com/v1/Services/{MessagingServiceSid}/ChannelSenders' \
 --user "username:password" \
 --header "Content-Type: application/x-www-form-urlencoded" \
 --data 'Sid=XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
{"Sid"=>"XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
{"Sid"=>"XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"}
{"Sid"=>"XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac"}
Response examples (201)
{
  "sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelSenders/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "sender": "whatsapp:+12487960483",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "sender_type": "WhatsApp",
  "country_code": "US",
  "date_created": "2023-07-30T20:12:31Z",
  "date_updated": "2023-07-30T20:12:33Z",
  "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
{
  "sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
  "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelSenders/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
  "sender": "messenger:104794531907950",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "sender_type": "Messanger",
  "country_code": "US",
  "date_created": "2023-07-30T20:12:31Z",
  "date_updated": "2023-07-30T20:12:33Z",
  "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}
{
  "sid": "XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac",
  "url": "https://messaging.twilio.com/v1/Services/MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/ChannelSenders/XEaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac",
  "sender": "rcs:ms_dev_test_agent",
  "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
  "sender_type": "RCS",
  "country_code": "US",
  "date_created": "2023-07-30T20:12:31Z",
  "date_updated": "2023-07-30T20:12:33Z",
  "messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}