Skip to main content
The WhatsApp API allows you to send WhatsApp messages using the Telepie API. You can send WhatsApp messages to a specific number or a group of numbers.

Allowed HTTP Request

  1. GET
  2. POST

Allowed Data Format

  1. Plain/Text
  2. JSON

Description of usual server responses

  • 200 OK - the request was successful.
  • 201 Created - the request was successful and a resource was created.
  • 204 No Content - the request was successful but there is no representation to return(i.e. the response is empty).
  • 400 Bad Request - the request could not be understood or was missing required parameters.
  • 401 Unauthorized - authentication failed or user doesn’t have permissions for requested operation.
  • 403 Forbidden - access denied.
  • 404 Not Found - resource was not found.
  • 405 Method Not Allowed - requested method is not supported for resources.

Error Codes & Descriptions

API TypeError CodeError Description
Send Media API200SUCCESS
Send Media API131009Parameter value is invalid
Send Media API100Invalid Parameter
Send Media API133010Phone number is not registered with WhatsApp business platform.
Send Media API133004Server is temporarily unavailable.
Send Media API132015Template parameters invalid or missing.
Send Media API132001The template does not exist in the specified language or the template has not been approved.
Send Media API132000The number of variable parameter values included in the request did not match the number of variable parameters defined in the template.
Send Media API131051Unsupported message type.
Send Media API131000Message failed to send due to an unknown error.
Send Media API131021Sender and recipient phone number is the same.
Send Media API131016A service is temporarily unavailable.

Supported Countries

Currently address messages are supported in India & Singapore . Below table outlines which fields are supported in which country specifically.
Field NameDisplay LabelInput TypeSupported CountriesLimitations
nameNametextIndia, SingaporeNone
phone_numberPhone NumbertelIndia, SingaporeValid phone numbers only
in_pin_codePin CodetextIndiaMax length: 6
sg_post_codePost CodenumberSingaporeMax length: 6
house_numberFlat/House NumbertextIndiaNone
floor_numberFloor NumbertextIndiaNone
tower_numberTower NumbertextIndiaNone
building_nameBuilding/Apartment NametextIndiaNone
addressAddresstextIndiaNone
landmark_areaLandmark/AreatextIndia, SingaporeNone
unit_numberUnit NumbertextIndiaNone
cityCitytextIndiaNone
stateStatetextIndiaNone

The Interactive Object of Type List

The Interactive object generally contains 4 main components: header, body, footer, and action.
The interactive object of type list must have minimum 1 and maximum 10 section objects should be nested with the unique ids.
NameDescription
listRequired Use it for List Messages.
headerOptional Header content displayed on top of a message.
bodyRequired The body of the message. There’s a maximum of 1024 characters. Emojis and markdown are supported.
footerOptional The footer of the message. There’s a maximum of 60 characters. Emojis and markdown are supported.
actionRequired Action you want the user to perform after reading the message.

The Interactive Object of Type Button

The interactive object generally contains 4 main components: header, body, footer, and action.
The interactive object of type button must have minimum 1 and maximum 3 buttons should be nested with the unique ids.
NameDescription
typeRequired Supported values: button (Use it for Reply Buttons).
headerOptional Header content displayed on top of a message.
bodyRequired The body of the message. There’s a maximum of 1024 characters. Emojis and markdown are supported.
footerOptional The footer of the message. There’s a maximum of 60 characters. Emojis and markdown are supported.
actionRequired Action you want the user to perform after reading the message. You must add at least one button, and include type, title, and id for your buttons. You cannot add more than 3 buttons.

Example action object

{
  "action": {
    "buttons": [
      {
        "type": "reply",
        "reply": {
          "id": "unique-postback-id-1",
          "title": "First Button’s Title"
        }
      },
      {
        "type": "reply",
        "reply": {
          "id": "unique-postback-id-2",
          "title": "Second Button’s Title"
        }
      }
    ]
  }
}

The Header Object

NameDescription
typeRequired The header type you would like to use.
textRequired if type is set to text. Text for the header. Maximum of 60 characters. Formatting allows emojis, but not markdown.
videoRequired if type is set to video. Contains the media object for this video.
imageRequired if type is set to image. Contains the media object for this image.
documentRequired if type is set to document. Contains the media object for this document.
Supported Values are :
  1. text : Used for Reply Buttons.
  2. video : Used for Reply Buttons.
  3. image : Used for Reply Buttons.
  4. document : Used for Reply Buttons.

Example header object

{
  "header": {
    "type": "text",
    "text": "your text"
  }
  // OR
  ,
  {
    "document": {
      "id": "your-media-id",
      "filename": "some-file-name"
    }
  }
  // OR
  ,
  {
    "document": {
      "link": "the-provider-name/protocol://the-url",
      "provider": {
        "name": "provider-name"
      },
      "filename": "some-file-name"
    }
  }
  // OR
  ,
  {
    "video": {
      "id": "your-media-id"
    }
  }
  // OR
  ,
  {
    "video": {
      "link": "the-provider-name/protocol://the-url",
      "provider": {
        "name": "provider-name"
      }
    }
  }
  // OR
  ,
  {
    "image": {
      "id": "your-media-id"
    }
  }
  // OR
  ,
  {
    "image": {
      "link": "http(s)://the-url",
      "provider": {
        "name": "provider-name"
      }
    }
  }
}

The Body Object

NameDescription
textRequired The body content of the message. Maximum of 1024 characters.
NameDescription
textRequired if the footer Object is present The footer content of the message. Maximum of 60 characters.

The Action Object

NameDescription
buttonRequired for Reply Button Messages.
A button can contain the following parameters:
  1. type : only supported type is reply (for Reply Button Messages)
  2. title : Button title. It cannot be an empty string and must be unique within
  3. the message : Maximum of 20 characters. Does not allow emojis or markdown.
  4. id : Unique identifier for your button. Maximum of 256 characters. This ID is returned in the webhook when the button is clicked by the user.