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
Property nameTypePIIDescription
sidSID<IG>
Not PII

A 34 character string that uniquely identifies this resource.

Pattern: ^IG[0-9a-fA-F]{32}$Min length: 34Max length: 34

account_sidSID<AC>

The unique ID of the Account the address belongs to

Pattern: ^AC[0-9a-fA-F]{32}$Min length: 34Max length: 34

typestring

Type of Address, value can be whatsapp or sms.


addressstring
PII MTL: 30 days

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


friendly_namestring

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


auto_creationobject

Auto Creation configuration for the address.


date_createdstring<date-time>

The date that this resource was created.


date_updatedstring<date-time>

The date that this resource was last updated.


urlstring<uri>

An absolute API resource URL for this address configuration.


address_countrystring

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

Request body parameters

request-body-parameters page anchor
Property nameTypeRequiredPIIDescription
Typeenum<string>required

Type of Address. Value can be whatsapp or sms.

Possible values:
smswhatsappmessengergbmemail

Addressstringrequired

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


FriendlyNamestringOptional

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


AutoCreation.EnabledbooleanOptional

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


AutoCreation.Typeenum<string>Optional

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.ConversationServiceSidSID<IS>Optional

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

Pattern: ^IS[0-9a-fA-F]{32}$Min length: 34Max length: 34

AutoCreation.WebhookUrlstringOptional

For type webhook, the url for the webhook request.


AutoCreation.WebhookMethodenum<string>Optional

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

Possible values:
GETPOST

AutoCreation.WebhookFiltersarray[string]Optional

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.StudioFlowSidSID<FW>Optional

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

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34

AutoCreation.StudioRetryCountintegerOptional

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


AddressCountrystringOptional

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

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

Output

_22
{
_22
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_22
}


Fetch an AddressConfiguration resource

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

Property nameTypeRequiredPIIDescription
Sidstringrequired

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

_18
// Download the helper library from https://www.twilio.com/docs/node/install
_18
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_18
_18
// Find your Account SID and Auth Token at twilio.com/console
_18
// and set the environment variables. See http://twil.io/secure
_18
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_18
const authToken = process.env.TWILIO_AUTH_TOKEN;
_18
const client = twilio(accountSid, authToken);
_18
_18
async function fetchConfigurationAddress() {
_18
const addressConfiguration = await client.conversations.v1
_18
.addressConfigurations("IGXXXXXXXXXXXXXXXXXXXXXXXX")
_18
.fetch();
_18
_18
console.log(addressConfiguration.sid);
_18
}
_18
_18
fetchConfigurationAddress();

Output

_22
{
_22
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_22
"sid": "IGXXXXXXXXXXXXXXXXXXXXXXXX",
_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": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_22
}


Read multiple AddressConfiguration resources

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

Property nameTypeRequiredPIIDescription
TypestringOptional

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


PageSizeintegerOptional

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

Minimum: 1Maximum: 1000

PageintegerOptional

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

Minimum: 0

PageTokenstringOptional

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

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

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": null,
_68
"url": "https://conversations.twilio.com/v1/Configuration/Addresses?PageSize=50&Page=0",
_68
"next_page_url": null,
_68
"key": "address_configurations"
_68
},
_68
"address_configurations": [
_68
{
_68
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_68
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_68
},
_68
{
_68
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_68
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab",
_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": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_68
"studio_flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaab"
_68
},
_68
{
_68
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_68
"sid": "IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac",
_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/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaac"
_68
}
_68
]
_68
}


Update an AddressConfiguration resource

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

Property nameTypeRequiredPIIDescription
Sidstringrequired

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

Property nameTypeRequiredPIIDescription
FriendlyNamestringOptional

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


AutoCreation.EnabledbooleanOptional

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


AutoCreation.Typeenum<string>Optional

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

Possible values:
webhookstudiodefault

AutoCreation.ConversationServiceSidSID<IS>Optional

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

Pattern: ^IS[0-9a-fA-F]{32}$Min length: 34Max length: 34

AutoCreation.WebhookUrlstringOptional

For type webhook, the url for the webhook request.


AutoCreation.WebhookMethodenum<string>Optional

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

Possible values:
GETPOST

AutoCreation.WebhookFiltersarray[string]Optional

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.StudioFlowSidSID<FW>Optional

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

Pattern: ^FW[0-9a-fA-F]{32}$Min length: 34Max length: 34

AutoCreation.StudioRetryCountintegerOptional

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

_24
// Download the helper library from https://www.twilio.com/docs/node/install
_24
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_24
_24
// Find your Account SID and Auth Token at twilio.com/console
_24
// and set the environment variables. See http://twil.io/secure
_24
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_24
const authToken = process.env.TWILIO_AUTH_TOKEN;
_24
const client = twilio(accountSid, authToken);
_24
_24
async function updateConfigurationAddress() {
_24
const addressConfiguration = await client.conversations.v1
_24
.addressConfigurations("IGXXXXXXXXXXXXXXXXXXXXXXX")
_24
.update({
_24
"autoCreation.enabled": false,
_24
"autoCreation.studioFlowSid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_24
"autoCreation.studioRetryCount": 3,
_24
"autoCreation.type": "studio",
_24
friendlyName: "My Test Configuration Updated",
_24
});
_24
_24
console.log(addressConfiguration.sid);
_24
}
_24
_24
updateConfigurationAddress();

Output

_18
{
_18
"account_sid": "ACaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"sid": "IGXXXXXXXXXXXXXXXXXXXXXXX",
_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": "ISaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_18
"studio_flow_sid": "FWaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa",
_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/IGaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaaa"
_18
}


Delete an AddressConfiguration resource

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

Property nameTypeRequiredPIIDescription
Sidstringrequired

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

_16
// Download the helper library from https://www.twilio.com/docs/node/install
_16
const twilio = require("twilio"); // Or, for ESM: import twilio from "twilio";
_16
_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 = twilio(accountSid, authToken);
_16
_16
async function deleteConfigurationAddress() {
_16
await client.conversations.v1
_16
.addressConfigurations("IGXXXXXXXXXXXXXXXXXXX")
_16
.remove();
_16
}
_16
_16
deleteConfigurationAddress();


Rate this page: