Create a new MessagingConfiguration for a service.
Create a new MessagingConfiguration for a service.
Path parameters
-
The SID of the Service that the resource is associated with.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^VA[0-9a-fA-F]{32}$
.
Body
-
The ISO-3166-1 country code of the country this configuration will be applied to. If this is a global configuration, Country will take the value
all
. -
The SID of the Messaging Service to be used to send SMS to the country of this configuration.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^MG[0-9a-fA-F]{32}$
.
POST
/v2/Services/{ServiceSid}/MessagingConfigurations
curl \
--request POST 'https://verify.twilio.com/v2/Services/{ServiceSid}/MessagingConfigurations' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Country=CA&MessagingServiceSid=MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
Request example
{"Country"=>"CA", "MessagingServiceSid"=>"MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
Response examples (201)
{
"url": "https://verify.twilio.com/v2/Services/VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa/MessagingConfigurations/CA",
"country": "CA",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"service_sid": "VAaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2015-07-30T20:00:00Z",
"date_updated": "2015-07-30T20:00:00Z",
"messaging_service_sid": "MGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
}