Create Configuration Address
Create a new address configuration
Authorization
accountSid_authToken In: header
Request Body
application/x-www-form-urlencoded
Type of Address, value can be whatsapp or sms.
Value in
- "sms"
- "whatsapp"
- "messenger"
- "gbm"
- "email"
- "rcs"
- "apple"
- "chat"
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
Value in
- "webhook"
- "studio"
- "default"
Conversation Service for the auto-created conversation. If not set, the conversation is created in the default service.
^IS[0-9a-fA-F]{32}$34 <= length <= 34For type webhook, the url for the webhook request.
Value in
- "get"
- "post"
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.
^FW[0-9a-fA-F]{32}$34 <= length <= 34For 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.
Response Body
application/json
curl -X POST "https://example.com/v1/Configuration/Addresses" \ -H "Content-Type: application/x-www-form-urlencoded" \ -d 'Address=%2B37256123457&Type=sms&FriendlyName=My+Test+Configuration&AutoCreation.Enabled=true&AutoCreation.Type=webhook&AutoCreation.ConversationServiceSid=ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa&AutoCreation.WebhookUrl=https%3A%2F%2Fexample.com&AutoCreation.WebhookMethod=post&AutoCreation.WebhookFilters=onParticipantAdded%2ConMessageAdded&AddressCountry=CA'{ "account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "address": "+37256123457", "type": "sms", "friendly_name": "My Test Configuration", "address_country": "CA", "auto_creation": { "enabled": true, "type": "webhook", "conversation_service_sid": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa", "webhook_url": "https://example.com", "webhook_method": "POST", "webhook_filters": [ "onParticipantAdded", "onMessageAdded" ] }, "date_created": "2016-03-24T21:05:50Z", "date_updated": "2016-03-24T21:05:50Z", "url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"}