Skip to contentSkip to navigationSkip to topbar
Rate this page:
On this page

Address Configuration Resource


The Address Configuration resource manages the configurations related to a unique address within the Conversations product, allowing you to specify which addresses should auto-create a Conversation upon receiving an inbound message.
The unique address must be a single address (i.e. a WhatsApp or SMS phone number) that belongs to your Twilio Account.

The configuration can optionally include automatically attaching a Conversation-scoped Webhook to the auto-created conversations.


AddressConfiguration properties

addressconfiguration-properties page anchor
Resource properties
sidtype: SID<IG>Not PII

A 34 character string that uniquely identifies this resource.


typetype: stringNot PII

Type of Address, value can be whatsapp or sms.


addresstype: stringPII MTL: 30 days

The unique address to be configured. The address can be a whatsapp address or phone number


friendly_nametype: stringNot PII

The human-readable name of this configuration, limited to 256 characters. Optional.


auto_creationtype: objectNot PII

Auto Creation configuration for the address.


date_createdtype: string<DATE TIME>Not PII

The date that this resource was created.


date_updatedtype: string<DATE TIME>Not PII

The date that this resource was last updated.


urltype: string<URI>Not PII

An absolute API resource URL for this address configuration.


address_countrytype: stringNot PII

An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses.


Create an AddressConfiguration resource

create-an-addressconfiguration-resource page anchor
POST https://conversations.twilio.com/v1/Configuration/Addresses

Parameters

create-parameters page anchor
Request body parameters
Typetype: enum<STRING>Not PII
Required

Type of Address. Value can be whatsapp or sms.

Possible values:
smswhatsappmessengergbmemail

Addresstype: stringPII MTL: 30 days
Required

The unique address to be configured. The address can be a whatsapp address or phone number


FriendlyNametype: stringNot PII

The human-readable name of this configuration, limited to 256 characters. Optional.


AutoCreation.Enabledtype: booleanNot PII

Enable/Disable auto-creating conversations for messages to this address


AutoCreation.Typetype: enum<STRING>Not PII

Type of Auto Creation. Value can be one of webhook, studio or default. default creates a new Conversation under the default Conversation service, without a webhook or Studio integration.

Possible values:
webhookstudiodefault

AutoCreation.ConversationServiceSidtype: SID<IS>Not PII

Conversation Service for the auto-created conversation. If not set, the conversation is created in the default service.


AutoCreation.WebhookUrltype: stringNot PII

For type webhook, the url for the webhook request.


AutoCreation.WebhookMethodtype: enum<STRING>Not PII

For type webhook, the HTTP method to be used when sending a webhook request.

Possible values:
GETPOST

AutoCreation.WebhookFilterstype: string[]Not PII

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


AutoCreation.StudioFlowSidtype: SID<FW>Not PII

For type studio, the studio flow SID where the webhook should be sent to.


AutoCreation.StudioRetryCounttype: integerNot PII

For type studio, number of times to retry the webhook request


AddressCountrytype: stringNot PII

An ISO 3166-1 alpha-2n country code which the address belongs to. This is currently only applicable to short code addresses.

Create Address Configuration

create-address-configuration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
// Find your Account SID and Auth Token at twilio.com/console
_20
// and set the environment variables. See http://twil.io/secure
_20
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_20
const authToken = process.env.TWILIO_AUTH_TOKEN;
_20
const client = require('twilio')(accountSid, authToken);
_20
_20
client.conversations.v1.addressConfigurations
_20
.create({
_20
friendlyName: 'My Test Configuration',
_20
'autoCreation.enabled': true,
_20
'autoCreation.type': 'webhook',
_20
'autoCreation.conversationServiceSid': 'ISXXXXXXXXXXXXXXXXXXXXXX',
_20
'autoCreation.webhookUrl': 'https://example.com',
_20
'autoCreation.webhookMethod': 'POST',
_20
'autoCreation.webhookFilters': ['onParticipantAdded', 'onMessageAdded'],
_20
type: 'sms',
_20
address: '+37256123457'
_20
})
_20
.then(address_configuration => console.log(address_configuration.sid));

Output

_22
{
_22
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"sid": "IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"address": "+37256123457",
_22
"type": "sms",
_22
"friendly_name": "My Test Configuration",
_22
"address_country": "CA",
_22
"auto_creation": {
_22
"enabled": true,
_22
"type": "webhook",
_22
"conversation_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"webhook_url": "https://example.com",
_22
"webhook_method": "POST",
_22
"webhook_filters": [
_22
"onParticipantAdded",
_22
"onMessageAdded"
_22
]
_22
},
_22
"date_created": "2016-03-24T21:05:50Z",
_22
"date_updated": "2016-03-24T21:05:50Z",
_22
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_22
}


Fetch an AddressConfiguration resource

fetch-an-addressconfiguration-resource page anchor
GET https://conversations.twilio.com/v1/Configuration/Addresses/{Sid}

URI parameters
Sidtype: stringNot PII
Path Parameter

The SID of the Address Configuration resource. This value can be either the sid or the address of the configuration

Fetch Address Configuration

fetch-address-configuration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.conversations.v1.addressConfigurations('IGXXXXXXXXXXXXXXXXXXXXXXXX')
_10
.fetch()
_10
.then(address_configuration => console.log(address_configuration.friendlyName));

Output

_22
{
_22
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"sid": "IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"address": "+37256123457",
_22
"type": "sms",
_22
"friendly_name": "My Test Configuration",
_22
"address_country": "CA",
_22
"auto_creation": {
_22
"enabled": true,
_22
"type": "webhook",
_22
"conversation_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_22
"webhook_url": "https://example.com",
_22
"webhook_method": "POST",
_22
"webhook_filters": [
_22
"onParticipantAdded",
_22
"onMessageAdded"
_22
]
_22
},
_22
"date_created": "2016-03-24T21:05:50Z",
_22
"date_updated": "2016-03-24T21:05:50Z",
_22
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_22
}


Read multiple AddressConfiguration resources

read-multiple-addressconfiguration-resources page anchor
GET https://conversations.twilio.com/v1/Configuration/Addresses

URI parameters
Typetype: stringNot PII
Query Parameter

Filter the address configurations by its type. This value can be one of: whatsapp, sms.


PageSizetype: integerNot PII
Query Parameter

How many resources to return in each list page. The default is 50, and the maximum is 1000.


Pagetype: integerNot PII
Query Parameter

The page index. This value is simply for client state.


PageTokentype: stringNot PII
Query Parameter

The page token. This is provided by the API.

List Address Configurations

list-address-configurations page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.conversations.v1.addressConfigurations
_10
.list({limit: 20})
_10
.then(addressConfigurations => addressConfigurations.forEach(a => console.log(a.sid)));

Output

_68
{
_68
"meta": {
_68
"page": 0,
_68
"page_size": 50,
_68
"first_page_url": "https://conversations.twilio.com/v1/Configuration/Addresses?PageSize=50&Page=0",
_68
"previous_page_url": "https://conversations.twilio.com/v1/Configuration/Addresses?PageSize=50&Page=0",
_68
"url": "https://conversations.twilio.com/v1/Configuration/Addresses?PageSize=50&Page=0",
_68
"next_page_url": "https://conversations.twilio.com/v1/Configuration/Addresses?PageSize=50&Page=1",
_68
"key": "address_configurations"
_68
},
_68
"address_configurations": [
_68
{
_68
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_68
"sid": "IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_68
"address": "+37256123457",
_68
"type": "sms",
_68
"friendly_name": "My Test Configuration",
_68
"address_country": "CA",
_68
"auto_creation": {
_68
"enabled": true,
_68
"type": "webhook",
_68
"conversation_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_68
"webhook_url": "https://example.com",
_68
"webhook_method": "POST",
_68
"webhook_filters": [
_68
"onParticipantAdded",
_68
"onMessageAdded"
_68
]
_68
},
_68
"date_created": "2016-03-24T21:05:50Z",
_68
"date_updated": "2016-03-24T21:05:50Z",
_68
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_68
},
_68
{
_68
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_68
"sid": "IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_68
"address": "+37256123458",
_68
"type": "sms",
_68
"friendly_name": "Studio Test Configuration",
_68
"address_country": "US",
_68
"auto_creation": {
_68
"enabled": false,
_68
"type": "studio",
_68
"conversation_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_68
"studio_flow_sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_68
"studio_retry_count": 3
_68
},
_68
"date_created": "2016-03-24T21:05:50Z",
_68
"date_updated": "2016-03-24T21:05:50Z",
_68
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_68
},
_68
{
_68
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_68
"sid": "IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_68
"address": "+37256123459",
_68
"type": "sms",
_68
"friendly_name": "Default Test Configuration",
_68
"address_country": "NG",
_68
"auto_creation": {
_68
"enabled": true,
_68
"type": "default"
_68
},
_68
"date_created": "2016-03-24T21:05:50Z",
_68
"date_updated": "2016-03-24T21:05:50Z",
_68
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_68
}
_68
]
_68
}


Update an AddressConfiguration resource

update-an-addressconfiguration-resource page anchor
POST https://conversations.twilio.com/v1/Configuration/Addresses/{Sid}

URI parameters
Sidtype: stringNot PII
Path Parameter

The SID of the Address Configuration resource. This value can be either the sid or the address of the configuration


Request body parameters
FriendlyNametype: stringNot PII

The human-readable name of this configuration, limited to 256 characters. Optional.


AutoCreation.Enabledtype: booleanNot PII

Enable/Disable auto-creating conversations for messages to this address


AutoCreation.Typetype: enum<STRING>Not PII

Type of Auto Creation. Value can be one of webhook, studio or default.

Possible values:
webhookstudiodefault

AutoCreation.ConversationServiceSidtype: SID<IS>Not PII

Conversation Service for the auto-created conversation. If not set, the conversation is created in the default service.


AutoCreation.WebhookUrltype: stringNot PII

For type webhook, the url for the webhook request.


AutoCreation.WebhookMethodtype: enum<STRING>Not PII

For type webhook, the HTTP method to be used when sending a webhook request.

Possible values:
GETPOST

AutoCreation.WebhookFilterstype: string[]Not PII

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


AutoCreation.StudioFlowSidtype: SID<FW>Not PII

For type studio, the studio flow SID where the webhook should be sent to.


AutoCreation.StudioRetryCounttype: integerNot PII

For type studio, number of times to retry the webhook request

Update Address Configuration

update-address-configuration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
// Find your Account SID and Auth Token at twilio.com/console
_16
// and set the environment variables. See http://twil.io/secure
_16
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_16
const authToken = process.env.TWILIO_AUTH_TOKEN;
_16
const client = require('twilio')(accountSid, authToken);
_16
_16
client.conversations.v1.addressConfigurations('IGXXXXXXXXXXXXXXXXXXXXXXX')
_16
.update({
_16
friendlyName: 'My Test Configuration Updated',
_16
'autoCreation.enabled': ,
_16
'autoCreation.type': 'studio',
_16
'autoCreation.studioFlowSid': 'FWXXXXXXXXXXXXXXXXXXXXXXXXXXXX',
_16
'autoCreation.studioRetryCount': 3
_16
})
_16
.then(address_configuration => console.log(address_configuration.friendlyName));

Output

_18
{
_18
"account_sid": "ACXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"sid": "IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"address": "+37256123457",
_18
"type": "sms",
_18
"friendly_name": "My Test Configuration Updated",
_18
"address_country": "CA",
_18
"auto_creation": {
_18
"enabled": false,
_18
"type": "studio",
_18
"conversation_service_sid": "ISXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"studio_flow_sid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_18
"studio_retry_count": 3
_18
},
_18
"date_created": "2016-03-24T21:05:50Z",
_18
"date_updated": "2016-03-24T21:05:51Z",
_18
"url": "https://conversations.twilio.com/v1/Configuration/Addresses/IGXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
_18
}


Delete an AddressConfiguration resource

delete-an-addressconfiguration-resource page anchor
DELETE https://conversations.twilio.com/v1/Configuration/Addresses/{Sid}

URI parameters
Sidtype: stringNot PII
Path Parameter

The SID of the Address Configuration resource. This value can be either the sid or the address of the configuration

Delete Address Configuration

delete-address-configuration page anchor
Node.js
Python
C#
Java
Go
PHP
Ruby
twilio-cli
curl

_10
// Download the helper library from https://www.twilio.com/docs/node/install
_10
// Find your Account SID and Auth Token at twilio.com/console
_10
// and set the environment variables. See http://twil.io/secure
_10
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_10
const authToken = process.env.TWILIO_AUTH_TOKEN;
_10
const client = require('twilio')(accountSid, authToken);
_10
_10
client.conversations.v1.addressConfigurations('IGXXXXXXXXXXXXXXXXXXX')
_10
.remove();


Rate this page: