Create a new address configuration
Address Configuration resource manages the configurations related to a unique address within Conversations
Create a new address configuration
Body
-
Type of Address, value can be
whatsapp
orsms
.Values are
sms
,whatsapp
,messenger
,gbm
,email
,rcs
,apple
, orchat
. -
The unique address to be configured. The address can be a whatsapp address or phone number
-
The human-readable name of this configuration, limited to 256 characters. Optional.
-
Enable/Disable auto-creating conversations for messages to this address
-
Values are
webhook
,studio
, ordefault
. -
Conversation Service for the auto-created conversation. If not set, the conversation is created in the default service.
Minimum length is
34
, maximum length is34
. Format should match the following pattern:^IS[0-9a-fA-F]{32}$
. -
For type
webhook
, the url for the webhook request. -
Values are
get
orpost
. -
The list of events, firing webhook event for this Conversation. Values can be any of the following:
onMessageAdded
,onMessageUpdated
,onMessageRemoved
,onConversationUpdated
,onConversationStateUpdated
,onConversationRemoved
,onParticipantAdded
,onParticipantUpdated
,onParticipantRemoved
,onDeliveryUpdated
-
For type
studio
, the studio flow SID where the webhook should be sent to.Minimum length is
34
, maximum length is34
. Format should match the following pattern:^FW[0-9a-fA-F]{32}$
. -
For type
studio
, number of times to retry the webhook request -
An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses.
curl \
--request POST 'https://conversations.twilio.com/v1/Configuration/Addresses' \
--user "username:password" \
--header "Content-Type: application/x-www-form-urlencoded" \
--data 'Type=sms&Address=%2B37256123457&FriendlyName=My+Test+Configuration&AddressCountry=CA&AutoCreation.Type=webhook&AutoCreation.Enabled=true&AutoCreation.WebhookUrl=https%3A%2F%2Fexample.com&AutoCreation.WebhookMethod=post&AutoCreation.WebhookFilters=onParticipantAdded&AutoCreation.WebhookFilters=onMessageAdded&AutoCreation.ConversationServiceSid=ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa'
{"Type"=>"sms", "Address"=>"+37256123457", "FriendlyName"=>"My Test Configuration", "AddressCountry"=>"CA", "AutoCreation.Type"=>"webhook", "AutoCreation.Enabled"=>true, "AutoCreation.WebhookUrl"=>"https://example.com", "AutoCreation.WebhookMethod"=>"post", "AutoCreation.WebhookFilters"=>["onParticipantAdded", "onMessageAdded"], "AutoCreation.ConversationServiceSid"=>"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
{"Type"=>"apple", "Address"=>"urn:mbid:AQAAYyUbut6E4B3T9FLv5EbG", "FriendlyName"=>"My AMB Test Configuration", "AddressCountry"=>"CA", "AutoCreation.Type"=>"webhook", "AutoCreation.Enabled"=>true, "AutoCreation.WebhookUrl"=>"https://example.com", "AutoCreation.WebhookMethod"=>"post", "AutoCreation.WebhookFilters"=>["onParticipantAdded", "onMessageAdded"], "AutoCreation.ConversationServiceSid"=>"ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}
{"Type"=>"email", "Address"=>"example@example.com", "FriendlyName"=>"My Email Configuration", "AutoCreation.Type"=>"default", "AutoCreation.Enabled"=>true}
{
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "sms",
"address": "+37256123457",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-03-24T21:05:50Z",
"date_updated": "2016-03-24T21:05:50Z",
"auto_creation": {
"type": "webhook",
"enabled": true,
"webhook_url": "https://example.com",
"webhook_method": "POST",
"webhook_filters": [
"onParticipantAdded",
"onMessageAdded"
],
"conversation_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"friendly_name": "My Test Configuration",
"address_country": "CA"
}
{
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "apple",
"address": "urn:mbid:AQAAYyUbut6E4B3T9FLv5EbG",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-03-24T21:05:50Z",
"date_updated": "2016-03-24T21:05:50Z",
"auto_creation": {
"type": "webhook",
"enabled": true,
"webhook_url": "https://example.com",
"webhook_method": "POST",
"webhook_filters": [
"onParticipantAdded",
"onMessageAdded"
],
"conversation_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
},
"friendly_name": "My AMB Test Configuration",
"address_country": "CA"
}
{
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"type": "email",
"address": "example@example.com",
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
"date_created": "2016-03-24T21:05:50Z",
"date_updated": "2016-03-24T21:05:50Z",
"auto_creation": {
"type": "default",
"enabled": true
},
"friendly_name": "My Email Configuration",
"address_country": null
}