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

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

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

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

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

_13
// Download the helper library from https://www.twilio.com/docs/node/install
_13
import twilio from "twilio";
_13
_13
// Find your Account SID and Auth Token at twilio.com/console
_13
// and set the environment variables. See http://twil.io/secure
_13
const accountSid = process.env.TWILIO_ACCOUNT_SID;
_13
const authToken = process.env.TWILIO_AUTH_TOKEN;
_13
const client = twilio(accountSid, authToken);
_13
_13
const addressConfigurations =
_13
await client.conversations.v1.addressConfigurations.list({ limit: 20 });
_13
_13
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": 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

_20
// Download the helper library from https://www.twilio.com/docs/node/install
_20
import twilio from "twilio";
_20
_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 = twilio(accountSid, authToken);
_20
_20
const addressConfiguration = await client.conversations.v1
_20
.addressConfigurations("IGXXXXXXXXXXXXXXXXXXXXXXX")
_20
.update({
_20
"autoCreation.enabled": false,
_20
"autoCreation.studioFlowSid": "FWXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
_20
"autoCreation.studioRetryCount": 3,
_20
"autoCreation.type": "studio",
_20
friendlyName: "My Test Configuration Updated",
_20
});
_20
_20
console.log(addressConfiguration.sid);

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

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


Rate this page: