Select your Region
Select Your Region
For an optimised experience, please select your most relevant region.

WhatsApp API

Expand your messaging horizons

WhatsApp Business API is a communication solution that provides media-rich white-label messaging via one of the world’s most prominent OTT messaging channels. Our clients now have the opportunity to reach WhatsApp’s 2 billion monthly active users through a sophisticated, easy-to-use integration.

SMSGlobal’s WhatsApp Business API provides a robust gateway for our clients to utilize enterprise messaging on WhatsApp. With the opportunity to reach WhatsApp’s notable 2 billion monthly active users, this API allows trusted businesses to connect with customers directly.

Integrate SMSGlobal’s WhatsApp Business API to established backend systems and enable all the possibilities of rich, contextual, business-grade communication on WhatsApp.

Message Object Types

The types of messages that can be sent include the following:

Template message

JSON object parameters:

Name Description JSON Type Default Constraints Required
type Constant value template. String N/A N/A Yes
template_name Name of the template. String N/A N/A Yes
params Parameters to inject into the template. String array N/A This parameter can only be used for template messages with only a body of text. No
Text message

JSON object parameters:

Name Description JSON Type Default Constraints Required
type Constant value text String N/A N/A Yes
preview_url Message object Boolean false true or false No
Text The text message content String N/A Valid URL Yes
Image message

Accepted content types can be found in the table below

JSON object parameters:

Name Description JSON Type Default Constraints Required
type Constant value image String N/A N/A Yes
url Public url of the image file. Should be either HTTP or HTTPS link. String N/A Accepted Content-Type header Yes
caption Optional caption that will be displayed underneath the image. String None N/A No
Video message

Accepted content types can be found in the table below

JSON object parameters:

Name Description JSON Type Default Constraints Required
type Constant value video String N/A N/A Yes
url Public url of the video file (mp4). Should be either HTTP or HTTPS link. String N/A Accepted Content-Type header Yes
caption Optional caption that will be displayed underneath the video. String None N/A No
Document message

Accepted content types can be found in the table below

JSON object parameters:

Name Description JSON Type Default Constraints Required
type Constant value document String N/A N/A Yes
url Public url of the document file. Should be either HTTP or HTTPS link. String N/A Accepted Content-Type header Yes
filename Optional parameter that describes the filename of the document. String None N/A No
caption Optional caption that will be displayed as the document title. String None N/A No
Audio message

Accepted content types can be found in the table below

JSON object parameters:

Name Description JSON Type Default Constraints Required
type Constant value audio String N/A N/A Yes
url Public url of the audio file. Should be either HTTP or HTTPS link. String N/A Accepted Content-Type header Yes
Location message

JSON object parameters:

Name Description JSON Type Default Constraints Required
type Constant value location String N/A N/A Yes
lat The latitude position as a float number. Number N/A [-90, 90] Yes
lng The longitude position as a float number. Number N/A [-180, 180] Yes
name The name for the location. Will be displayed in the message. String N/A N/A No
address The address for the location. Will be displayed in the message. String N/A N/A No
Accepted media types
Message Type Supported content types Post-processing size limit
document Any content type listed for other message types,
text/plain, text/csv, application/pdf, application/msword, application/x-tar, application/rtf.0, application/vnd.ms-powerpoint, application/vnd.openxmlformats-officedocument.presentationml.presentation, application/vnd.openxmlformats-officedocument.wordprocessingml.document, application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, application/vnd.oasis.opendocument.presentation, application/vnd.oasis.opendocument.spreadsheet, application/vnd.ms-excel, application/vnd.oasis.opendocument.text
100 MB
image image/jpeg, image/png 5 MB
audio audio/aac, audio/mp4, audio/amr, audio/mpeg, audio/ogg, audio/opus 16 MB
video video/mp4, video/3gpp 16 MB
sticker image/webp 100 KB

API Endpoints Scroll to Top ▲

  • whatsapp
    /v2/whatsapp/blacklist
    • POST /v2/whatsapp/blacklist beta since v2

      Documentation

      Block messages from number(s)

      Parameters

      ParameterTypeRequired?FormatDescription
      numbers[]array of stringstrueList of numbers

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    /v2/whatsapp/capabilities
    • POST /v2/whatsapp/capabilities beta since v2

      Documentation

      Check capability of number(s) to receive messages

      Parameters

      ParameterTypeRequired?FormatDescription
      numbers[]array of stringstrueList of numbers

      Return

      ParameterTypeVersionsDescription
      capabilities[]array of objects (WhatsappOptIn)>=v2A collection of opt-in objects
      capabilities[][name]string>=v2Name
      capabilities[][number]string>=v2Number
      capabilities[][capable]boolean>=v2Capability
      capabilities[][blacklist]boolean>=v2Notification blacklist

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    /v2/whatsapp/incoming
    • GET /v2/whatsapp/incoming beta since v2

      Documentation

      Get list of incoming messages

      Filters

      NameInformation
      offsetRequirement \d+
      Description Pagination offset (default 1, maximum offset + limit = 10,000)
      Default 1
      limitRequirement \d+
      Description Number of items to return (default 20, maximum 1000)
      Default 20
      startDateRequirement
      Description Start date of the date range filter. Date format <Y-m-d H:i:s> in account timezone
      endDateRequirement
      Description End date of the date range filter. Date format <Y-m-d H:i:s> in account timezone
      destinationRequirement \d+
      Description The shared pool or dedicated number which the sms was sent to
      originRequirement \d+
      Description The number where the SMS appears to come from
      searchRequirement
      Description Search string in source, destination and message

      Return

      ParameterTypeVersionsDescription
      messages[]array of objects (WhatsappIncoming)>=v2A collection of message objects
      messages[][id]integer>=v2Message id
      messages[][from]string>=v2From
      messages[][to]string>=v2To
      messages[][message]string>=v2Message
      messages[][createdDate]DateTime>=v2Create date

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    /v2/whatsapp/incoming/read
    • POST /v2/whatsapp/incoming/read beta since v2

      Documentation

      Update incoming message(s) to read status

      Parameters

      ParameterTypeRequired?FormatDescription
      ids[]array of stringstrueList of ids

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    /v2/whatsapp/incoming/{id}
    • GET /v2/whatsapp/incoming/{id} beta since v2

      Documentation

      Get an incoming message

      Requirements

      NameRequirementTypeDescription
      id

      Return

      ParameterTypeVersionsDescription
      idinteger>=v2Message id
      fromstring>=v2From
      tostring>=v2To
      messagestring>=v2Message
      createdDateDateTime>=v2Created date

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    /v2/whatsapp/message
    • GET /v2/whatsapp/message beta since v2

      Documentation

      Get list of outgoing messages

      Filters

      NameInformation
      offsetRequirement \d+
      Description Pagination offset (default 1, maximum offset + limit = 10,000)
      Default 1
      limitRequirement \d+
      Number of items to return (default 20, maximum 1000)
      Default 20
      startDateRequirement
      Description Start date of the date range filter. Date format <Y-m-d H:i:s> in account timezone
      endDateRequirement
      Description End date of the date range filter. Date format <Y-m-d H:i:s> in account timezone
      destinationRequirement \d+
      Description The shared pool or dedicated number which the sms was sent to
      originRequirement \d+
      Description The number where the SMS appears to come from
      searchRequirement
      Description Search string in source, destination and message

      Return

      ParameterTypeVersionsDescription
      messages[]array of objects (WhatsappMessage)>=v2A collection of message objects
      messages[][id]integer>=v2Message id
      messages[][recipient]string>=v2Recipient
      messages[][status]string>=v2Status
      messages[][state]string>=v2State
      messages[][message]string>=v2Message
      messages[][createdDate]DateTime>=v2Created date

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    • POST /v2/whatsapp/message beta since v2

      Documentation

      Send a message

      Parameters

      ParameterTypeRequired?FormatDescription
      to[]array of stringstrueList of destination
      messagestringtrue

      Return

      ParameterTypeVersionsDescription
      idinteger>=v2Message id
      recipientstring>=v2Recipient
      statusstring>=v2Status
      statestring>=v2State
      messagestring>=v2Message
      createdDateDateTime>=v2Created date

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    /v2/whatsapp/message/{id}
    • GET /v2/whatsapp/message/{id} beta since v2

      Documentation

      Get an outgoing message

      Requirements

      NameRequirementTypeDescription
      id

      Return

      ParameterTypeVersionsDescription
      idinteger>=v2Message id
      recipientstring>=v2Recipient
      statusstring>=v2Status
      statestring>=v2State
      messagestring>=v2Message
      createdDateDateTime>=v2Created date

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    /v2/whatsapp/opt-in
    • GET /v2/whatsapp/opt-in beta since v2

      Documentation

      Show opted in numbers

      Return

      ParameterTypeVersionsDescription
      optIn[]array of objects (WhatsappOptIn)>=v2A collection of opt-in objects
      optIn[][name]string>=v2Name
      optIn[][number]string>=v2Number
      optIn[][capable]boolean>=v2Capability
      optIn[][blacklist]boolean>=v2Notification blacklist

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    • POST /v2/whatsapp/opt-in beta since v2

      Documentation

      Opt in numbers

      Parameters

      ParameterTypeRequired?FormatDescription
      opt-in[]array of objects (WhatsappOptInExtendedType)trueA collection of opt in
      opt-in[][name]stringfalse
      opt-in[][number]stringtrue

      Return

      ParameterTypeVersionsDescription
      optIn[]array of objects (WhatsappOptIn)>=v2A collection of opt-in objects
      optIn[][name]string>=v2Name
      optIn[][number]string>=v2Number
      optIn[][capable]boolean>=v2Capability
      optIn[][blacklist]boolean>=v2Notification blacklist

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
    /v2/whatsapp/opt-out
    • POST /v2/whatsapp/opt-out beta since v2

      Documentation

      Opt out numbers

      Parameters

      ParameterTypeRequired?FormatDescription
      numbers[]array of stringstrueList of numbers

      Status Codes

      Status CodeDescription
      200
      • Returned when successful
      403
      • Returned when the user is not authorized
      405
      • Method not allowed
Early Access

WhatsApp Business API

Loading Form