Skip to content

Update WhatsApp SMS Config

With the Update WhatsApp SMS Config API, you can update the WhatsApp SMS configuration details in Engagement Services.

URL

The HTTP URL for Update WhatsApp SMS Config API is:

http://<<host>>:<<port>>/api/v1/whatsappconfig

This service implements ‘Gateway Filter for Authentication’ to authenticate access of the service by a user.

Method

POST

The payload's request header includes Content-Type as application/json;charset=UTF-8.

Input Parameters

The following fields are input parameters:

TWILIO

Input Parameter Level – Two Required Type Description
protocol   Yes string A protocol about a standard method used at each end of a communication channel. You must use a mail client to access a mail server. The mail client and mail server can exchange information with each other using protocols. HTTP is the standard input for this field.
provider   Yes string WhatsApp SMS service provider, for example: TWILIO_WHATSAPP
properties       An array of service provider properties
  key - value pair (user authentication) Yes   The key value pair for user authentication. For Twilio, it is account SID and auth token.
  key - value pair (From) Yes NA The WhatsApp number or client identifier that initiated the call. WhatsApp numbers are formatted with a + sign and a country code, such as +91xxxxxxxxxx
  key - value pair (Header Content Type) Yes URL This field is set with the header content type as application/x-www-form-urlencoded. The application/x-www-form-urlencoded is the content-type headers for HTTP POST requests that browsers must support. This request sends a list of name/value pairs to the server
  key - value pair (Maximum Character Limit) Yes long Maximum number of characters allowed in an WhatsApp message

TWILIO

{
  "protocol" : "HTTP",
  "inboundSecurityEnabled" : false,
  "provider" : "TWILIO_WHATSAPP",
  "properties" : [ {
    "key" : "Account SID",
    "value" : "xxxxx"
  }, {
    "key" : "Auth Token",
    "value" : "xxxxx"
  }, {
    "key" : "From",
    "value" : "xxxxx"
  }, {
    "key" : "Header Content Type",
    "value" : "application/x-www-form-urlencoded"
  }, {
    "key" : "Maximum Character Limit",
    "value" : "140"
  } ]
}

Sample Response

{
"message" : "Details updated successfully",
"id" :
}

Response Status

Code Description
Status 200 Details updated successfully.
Status 400 Unable to connect to the SMS provider with the given credentials. Value is required for mobile originated. Invalid keys provided.
Status 401 Unauthorized request.
Status 500 Server failure to process request.