Create a new address configuration

POST /v1/Configuration/Addresses

Address Configuration resource manages the configurations related to a unique address within Conversations

Create a new address configuration

application/x-www-form-urlencoded

Body

  • Address string Required

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

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

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^IS[0-9a-fA-F]{32}$.

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

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

    Minimum length is 34, maximum length is 34. Format should match the following pattern: ^FW[0-9a-fA-F]{32}$.

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

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

    Values are webhook, studio, or default.

  • 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 webhook, the HTTP method to be used when sending a webhook request.

    Values are GET or POST.

  • For type webhook, the url for the webhook request.

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

  • Type string Required

    Type of Address. Value can be whatsapp or sms.

    Values are sms, whatsapp, messenger, or gbm.

Responses

  • 201

    Created

    Hide response attributes Show response attributes object
    • account_sid string | null

      The unique ID of the Account the address belongs to.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^AC[0-9a-fA-F]{32}$.

    • address string | null

      The unique address to be configured.

    • Auto Creation configuration for the address.

    • date_created string(date-time) | null

      The date that this resource was created.

    • date_updated string(date-time) | null

      The date that this resource was last updated.

    • friendly_name string | null

      The human-readable name of this configuration.

    • sid string | null

      A 34 character string that uniquely identifies this resource.

      Minimum length is 34, maximum length is 34. Format should match the following pattern: ^IG[0-9a-fA-F]{32}$.

    • type string | null

      Type of Address.

    • url string(uri) | null

      An absolute URL for this address configuration.

POST /v1/Configuration/Addresses
curl \
 -X POST https://conversations.twilio.com/v1/Configuration/Addresses \
 --user "username:password" \
 -H "Content-Type: application/x-www-form-urlencoded" \
 -d 'Address=string&AutoCreation.ConversationServiceSid=string&AutoCreation.Enabled=true&AutoCreation.StudioFlowSid=string&AutoCreation.StudioRetryCount=42&AutoCreation.Type=webhook&AutoCreation.WebhookFilters=string&AutoCreation.WebhookMethod=GET&AutoCreation.WebhookUrl=string&FriendlyName=string&Type=sms'
Request example
{
  "Address": "string",
  "AutoCreation.ConversationServiceSid": "string",
  "AutoCreation.Enabled": true,
  "AutoCreation.StudioFlowSid": "string",
  "AutoCreation.StudioRetryCount": 42,
  "AutoCreation.Type": "webhook",
  "AutoCreation.WebhookFilters": [
    "string"
  ],
  "AutoCreation.WebhookMethod": "GET",
  "AutoCreation.WebhookUrl": "string",
  "FriendlyName": "string",
  "Type": "sms"
}
Response examples (201)
{
  "account_sid": "string",
  "address": "string",
  "date_created": "2023-05-04T09:42:00+00:00",
  "date_updated": "2023-05-04T09:42:00+00:00",
  "friendly_name": "string",
  "sid": "string",
  "type": "string",
  "url": "https://example.com"
}