Whatsapp Business API documentation (2.39)

Download OpenAPI specification:Download

E-mail: hello@1msg.io

1MSG.IO is the perfect WhatsApp management tool for your business. With us you get full access to the official Whatsapp API/webhooks.

Every API request must contain an Authorize HTTP header with a token. This is your channel token, which can be found in your channel project on your profile page. Please do not give the token to anyone or post it publicly.

The authorization token must be added to each request in the GET parameter 'token' and always passed to query string (?token={jwtToken}). Parameters in GET queries pass query string. Parameters in POST requests — through the JSON-encoded request body.

All 'send' methods (except /sendTemplate) will only work when the dialog session with the user is open. Some of our solutions simplify and avoid such limitations, but we urge you to pay more attention to this detail

Updates from 20 May (all changes are relevant for Cloud API version:

  • added reference to quoted message (quotedMsgId) to methods: sendMessage, sendButton, sendLocation, sendFile, sendLocation, sendContact.
  • added description for creating new Carousel and Catalogue templates to the /addTemplate method.
  • added description for sending new Carousel and Catalogue templates to the /sendTemplate method.

Channel

Manage your WhatsApp Business API channel

Get Profile Info

Use this edge to retrieve your profile's About info

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
{
  • "about": "Some about info",
  • "address": "Neverland, Unexpected st.",
  • "description": "Some company description",
  • "email": "john@neverland.play",
  • "phone": "12020721369",
  • "vertical": "Other",
}

Change user info

Change user info

Authorizations:
JWT token
Request Body schema:
about
string

Profile`s About section.

address
string

Address of the business

description
string

Description of the business. Max 256 characters

email
string

Business email

phone
string

Linked phone number

vertical
string
Enum: "Automotive" "Beauty, Spa and Salon" "Clothing and Apparel" "Education" "Entertainment" "Event Planning and Service" "Finance and Banking" "Food and Grocery" "Public Service" "Hotel and Lodging" "Medical and Health" "Non-profit" "Professional Services" "Shopping and Retail" "Travel and Transportation" "Restaurant" "Other"

Industry of the business

photo
string

HTTP link https://...

Or base64-encoded file with mime data, for example data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...

File in form-data input field

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "result": "success"
}

Get Channel statistics

Get channel usage statistics

Authorizations:
JWT token
query Parameters
date
string
Example: date=03.2022

Month and year in format mm.YYYY.

Responses

Response samples

Content type
application/json
{
  • "date": "03.2022",
  • "templates_cost": 400.0313
}

Get Extended Channel statistics

Get channel usage extended statistics

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get Status

Returns the status of your WhatsApp Business API client. Channel statuses:

connected/connecting - everything is ok.

disconnected - The Coreapp is not connected to the WhatsApp servers.

uninitialized - The application could be in the process of upgrading or initializing the database schema. Try again in a few minutes and contact Support if you continue to see this status.

unregistered - You need to register your WhatsApp Business API client. Either you have been blocked and need to take some action (contact Support)

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
{
  • "status": "connected"
}

Get Settings

webhookUrl - Http or https URL for receiving notifications.

Authorizations:
JWT token

Responses

Response samples

Content type
application/json

Set settings

webhookUrl - Http or https URL for receiving notifications.

Authorizations:
JWT token
Request Body schema:
webhookUrl
string or null

Responses

Request samples

Content type
{ }

Response samples

Content type
application/json
{}

Get Commerce Settings

is_catalog_visible - Set to true to show catalog storefront icon or false to hide it. is_cart_enabled - Set to true to enable cart or false to disable it.

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Get channel server IP

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
{
  • "result": "213.74.84.72"
}

Webhooks

How to setup webhooks for the WhatsApp Business API

Set webhook

Sets the URL for receiving webhook notifications of new messages and message delivery events (ack).

API responses in "Callbacks" tab

Authorizations:
JWT token
Request Body schema:
webhookUrl
required
string

Http or https URL for receiving notifications. For testing, we recommend using our RequestBin.

Responses

Callbacks

Request samples

Content type
No sample

Response samples

Content type
application/json
{}

Callback payload samples

Callback
Content type
application/json
{
  • "messages": [
    ]
}

Check ACKs

Authorizations:
JWT token
query Parameters
messageId
required
string
Example: messageId=0XzkmGNn4prUAQlzsHApGNRXQ0U

Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U

Responses

Response samples

Content type
application/json
{
  • "hooks": [
    ]
}

Messaging

This part of the documentation describes how to send and receive messages using the WhatsApp Business API

Send List Message

Send Interactive List Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.

Authorizations:
JWT token
Request Body schema:
body
required
string

Main message text

header
string

Header will be located above message text

footer
string

Footer will be placed under message text

action
required
string

Action for open list

required
Array of objects

Up to 10 sections from which the client can choose.

Each section is object with fields:

title - Title of section, up to 24 symbols. Required if there are more then 1 section

rows - available options. Required

Each option is object with fields:

id - Unique id for option, up to 200 symbols. Required

title - Title of option, up to 24 symbols. Required

description - Description of option, up to 72 symbols

Example:

[{"title":"Section 1","rows":[{"id":"1","title":"Option 1","description":"Description 1"}]},{"title":"Section 2","rows":[{"id":"2","title":"Option 2","description":"Description 2"}]}]

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Send Reply Buttons Message

Send Interactive Reply Buttons Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.

Authorizations:
JWT token
Request Body schema:
body
required
string

Main message text

object or object or object or object
footer
string

Footer will be placed under message text

required
Array of objects

Up to 3 sections inclusive.

Each section is an object with a fields:

type - always "reply" Required

reply – reply button objects Required

Each button response is an object with fields:

id - a unique identifier of the button, up to 200 characters. Required

title — Button title, up to 20 characters. Required

Example:

"sections": [{"type": "reply","reply": {"id ": "1","title": "1 Button's Title"}},{"type": "reply", "reply": {"id": "2", "title": "2 Button's Title"}}]

quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Send Location Request Message

Send Interactive Location Request Message to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.

Authorizations:
JWT token
Request Body schema:
body
required
string

Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026

quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Send Reaction

Send a reaction (emoji) to a specific message in an existing chat. Use a single emoji character to add/update reaction, or an empty string to remove reaction. Provide either chatId or phone. Reference the target message via quotedMsgId.

Authorizations:
JWT token
Request Body schema:
body
required
string

One emoji to add/update or empty string to remove

quotedMsgId
required
string

Quoted message ID (Cloud API)

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
body=%F0%9F%91%8D&quotedMsgId=wamid.HBgLdemo-text-001&chatId=12020721369%40c.us

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Send a File

Send a file to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.

Authorizations:
JWT token
Request Body schema:
body
required
string

HTTP link https://...

Or base64-encoded file with mime data, for example data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...

File in form-data input field

filename
required
string

File name, for example 1.jpg or hello.xlsx

caption
string

Text under the file. When sending an image сan be used with mentionedPhones, example: this image for @556123122026

quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Send a Message

Send a message to an existing chat. (Only if the dialogue has an Open Session). The message will be added to the queue for sending and delivered even if the phone is disconnected from the Internet or authorization is not passed.

Only one of two parameters is needed to determine the destination - chatId or phone.

Authorizations:
JWT token
Request Body schema:
body
required
string

Message text, UTF-8 or UTF-16 string with emoji 🍏. Can be used with mentionedPhones, example: this text for @556123122026

quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Send a Location

Send a location to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.

Authorizations:
JWT token
Request Body schema:
lat
required
string

Latitude of the location. Example: 45.018337

lng
required
string

Longitude of the location. Example: -73.968285

address
string

Address of the location. Only displayed if name is present. Example: 9766 Valley View St., New York, NY 10024

name
string

Name of the location. Example: Facebook HQ

quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Send a Contact

Send a contact to an existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.

Authorizations:
JWT token
Request Body schema:
contacts
Array of objects

Array containing contact objects.

Contact object parameters:

name - full contact name. Required. Object with properties:

  • formatted_name - Full name, as it normally appears. Example: Lord Adam John Smith Junior. You have to use at least one additional parameter (first_name, last_name, middle_name, suffix, prefix)

  • first_name - First name. Example: Adam

  • last_name - Last name. Example: Smith

  • middle_name - Middle name. Example: John

  • suffix - Name suffix. Example: Junior

  • prefix - Name prefix. Example: Lord

birthday - YYYY-MM-DD formatted string. Example: 2012-08-18

addresses - array containing address objects with parameters:

  • street - Street number and name. Example: 1 Hacker Way

  • city - City name. Example: Menlo Park

  • state - State abbreviation. Example: CA

  • zip - ZIP code. Example: 94025

  • country - Full country name. Example: United States

  • country_code - Two-letter country abbreviation. Example: us

  • type - Standard Values: HOME, WORK. Example: HOME

emails - array containing email objects with parameters:

  • email - Email address. Example: test@fb.com

  • type - Standard Values: HOME, WORK. Example: WORK

org - object containing parameters:

  • company - Name of the contact's company. Example: WhatsApp

  • department - Name of the contact's department. Example: Design

  • title - Contact's business title. Example: Manager

phones - array containing phone objects with parameters:

  • phone - Automatically populated with the wa_id value as a formatted phone number. Example: +1 (940) 555-1234

  • type - Standard Values: CELL, MAIN, IPHONE, HOME, WORK. Example: HOME

  • wa_id - WhatsApp ID. Example: 19405551234

urls - array containing url objects with parameters:

Example: [{"addresses":[{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"1 Hacker Way","type":"HOME","zip":"94025"},{"city":"Menlo Park","country":"United States","country_code":"us","state":"CA","street":"200 Jefferson Dr","type":"WORK","zip":"94025"}],"birthday":"2012-08-18","emails":[{"email":"test@fb.com","type":"WORK"},{"email":"test@whatsapp.com","type":"WORK"}],"name":{"first_name":"John","formatted_name":"John Smith","last_name":"Smith"},"org":{"company":"WhatsApp","department":"Design","title":"Manager"},"phones":[{"phone":"+1 (940) 555-1234","type":"HOME"},{"phone":"+1 (650) 555-1234","type":"WORK","wa_id":"16505551234"}],"urls":[{"url":"https://www.facebook.com","type":"WORK"}]}]

quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Get messages list

By default, the message history is not saved for output in the method. To enable the method, write to technical support

Authorizations:
JWT token
query Parameters
last
boolean
Example: last=true

Displays the last messages. If this parameter is passed, then lastMessageNumber is ignored.

lastMessageNumber
integer
Example: lastMessageNumber=100

The lastMessageNumber parameter from the last response. Example: 100

firstMessageNumber
integer
Example: firstMessageNumber=1

The firstMessageNumber parameter from the last response. Example: 1

limit
integer
Example: limit=200

Sets length of the message list. Default 100. With value 0 returns all messages.

chatId
string
Example: chatId=556123122026@c.us

Filter messages by chatId

Chat ID from the message list. Example: 556123122026@c.us

min_time
integer
Example: min_time=1665396610

Filter messages received after specified time. Example: 1665396610

max_time
integer
Example: max_time=1665396610

Filter messages received before specified time. Example: 1665396610

msgId
string
Example: msgId=0XzkmGNn4prUAQlzsHApGNRXQ0U

Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U

Responses

Response samples

Content type
application/json
{
  • "messages": [
    ]
}

Mark message as read

Authorizations:
JWT token
Request Body schema:
messageId
string

Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "result": "success"
}

Templates

Template messaging via WhatsApp Business API

Send Template Message

Send Template Message to a new or existing chat. Only one of two parameters is needed to determine the destination - chatId or phone.

Example №1:

{"template":"template_name","language":{"policy":"deterministic","code":"en"},"namespace":"namespace_id","params":[{"type":"header","parameters":[{"type":"image","image": {"link":"https://..."}}]},{"type":"body","parameters":[{"type":"text","text":"test"}]}],"phone":"556123122026"}

Example №2 - sending the 'Carousel' template (available only on the Cloud API version):

{"template": "test_carousel", "language": {"policy": "deterministic", "code": "en_US"}, "namespace": "41123797_o98r_4f06_fi44_443b27c6f5ec","params": [{"type": "body", "parameters": [{"type": "text", "text": "b1"}, {"type": "text", "text": "b2"}]}, {"type": "CAROUSEL", "cards": [{"card_index": 0, "components": [{"type": "header", "parameters": [{"type": "video", "video": {"link": "https://test.com/video.mp4"}}]}, {"type": "button", "sub_type": "url", "index": "0", "parameters": [{"type": "text", "text": "1"}]}, {"type": "button", "sub_type": "url", "index": "1", "parameters": [{"type": "text", "text": "2"}]}, {"type": "body", "parameters": [{"type": "text", "text": "b3"}, {"type": "text", "text": "b4"}]}]}]}], "phone": "556123122026"}

Example №3 catalog

{ "token": "jxL4WBheceYEVvMd32Hwuk2h5Cvn1qpm", "namespace": "", "template": "catalog", "language": {"policy": "deterministic","code": "en_US" }, "params": [{ "type": "button", "sub_type": "CATALOG", "index": 0, "parameters": [ {"type": "action","action": { "thumbnail_product_retailer_id": "001"} } ]},{ "type": "body", "parameters": [ {"type": "text","text": "Check out the products in our store" } ]} ], "chatId": "" }

Authorizations:
JWT token
Request Body schema:
namespace
required
string

Can be found by method /templates

template
required
string

Name of template

required
object

Object, containing fields "policy" and "code".

policy - now "deterministic" is only available option;

code - one of supported language codes

Array of objects

Array of localizable parameters to be substituted into the template. Each parameter is object contains the following field:

type - section of parameters - header, body, footer, button

parameters - variables for section.

Each variable is an object that can contain the following fields:

type - can be text, currency, date_time, image, document or video

video- id (mediaId)

document

  • id (mediaId)

  • filename(optional)

image - object with field link (image url)

currency - object containing parameters currency_code and amount_1000.

  • currency_code - Currency code as defined in ISO 4217.

  • amount_1000 - Amount multiplied by 1000.

  • fallback_value - Default text if localization fails.

date_time - If the date_time object is used, further definition of the date and time is required.

  • component - The time is assembled from components (i.e., day of the week, month, hour, etc.) The time specified will be the same, regardless of the time zone the client is in.

  • unix_epoch - The time to be displayed is dependent on the time zone the client is in.

  • fallback_value - Default text if localization fails.

button - if button has parameter

  • sub_type (url/quick_reply)

  • parameters (array to fill button variable)

  • index - button position.

cards - filled in if you need to send the Carousel template

  • card_index - card number

  • components - array of card data

    type -  header, body, footer, button 
    
    parameters - variables for the section. 
    
    sub_type - subtype for buttons 
    
    index - button number
    

The number of parameters passed must match the number of parameters in the template

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Create template

Create new template for sending.

Example №1:

     [{"type": "HEADER", "format": "IMAGE", "example": {"header_handle": ["https://test.net/v.jpg"]}}, {"text": "We remind you that you have an appointment at {{1}} with the dentist tomorrow. Are you confirming your appointment with the doctor?", "type": "BODY", "example": {"body_text": [["9:00"]]}}, {"text": "white", "type": "FOOTER"}, {"type": "BUTTONS", "buttons": [{"text": "Yes", "type": "QUICK_REPLY"}, {"text": "No", "type": "QUICK_REPLY"}]}]

Example №2 - create a Carousel template (available on Cloud API):

      [{"text": "Test body text","type": "BODY"},{"type": "CAROUSEL","cards":[{"components":[{"type": "HEADER","format": "VIDEO","example":{"header_handle":["4::aW..."]}},{"text": "Carousel body {{1}}","type": "BODY"},{"type": "BUTTONS","buttons":[{"text": "Send more like this","type": "QUICK_REPLY"},{"url": "https://www.test.com/shop?promo={{1}}","text": "Buy now","type": "URL","example": ["https://www.test.com/shop?promo=summer_lemons_2023"]}]}]}]}]
Authorizations:
JWT token
Request Body schema:
name
string

Name of template

category
string (TemplateCategoryProp)
Enum: "MARKETING" "UTILITY" "AUTHENTICATION"

Template category

Array of objects (TemplateComponentsProp)

Array of template components

language
string (TemplateLanguageProp)
Enum: "af" "sq" "ar" "az" "bn" "bg" "ca" "zh_CN" "zh_HK" "zh_TW" "hr" "cs" "da" "nl" "en" "en_GB" "en_US" "et" "fil" "fi" "fr" "de" "el" "gu" "he" "hi" "hu" "id" "ga" "it" "ja" "kn" "kk" "ko" "lo" "lv" "lt" "mk" "ms" "mr" "nb" "fa" "pl" "pt_BR" "pt_PT" "pa" "ro" "ru" "sr" "sk" "sl" "es" "es_AR" "es_ES" "es_MX" "sw" "sv" "ta" "te" "th" "tr" "uk" "ur" "uz" "vi"

Template language

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{ }

Remove template

Deleted template can not be restored.

Authorizations:
JWT token
Request Body schema:
name
string

Template name

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "result": "success"
}

Get templates list

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
{
  • "total": 3,
  • "templates": [
    ]
}

Products & Catalogs

How to build and send messages with single and multiple products

Set Commerce Settings

is_catalog_visible - Set to true to show catalog storefront icon or false to hide it. is_cart_enabled - Set to true to enable cart or false to disable it.

Authorizations:
JWT token
Request Body schema:
object

Responses

Request samples

Content type
{ }

Response samples

Content type
application/json
{
  • "success": true
}

Send a Product

Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one of two parameters is needed to determine the destination - chatId or phone.

First, you need to upload your inventory to Facebook. You can use the API or Facebook’s Commerce Manager to do that. If you already have a Facebook catalog set up, we suggest that you leverage that catalog for WhatsApp commerce use cases.

You can not send products to Business WhatsApp clients.

Authorizations:
JWT token
Request Body schema:
required
object

Object containing info about product or catalog. Can contain the following fields:

catalog_id - id of catalog

product_retailer_id - id of product. Only for sending single product.

sections - used for sending multiply products. It`s array containing objects with catalog info. See example below.

Example: {"catalog_id":"{{catalog_id}}","sections":[{"title":"the-section-title","product_items":[{"product_retailer_id":"{{SKU-1}}"},{"product_retailer_id":"{{SKU-2}}"}]},{"title":"the-section-title2","product_items":[{"product_retailer_id":"{{SKU-1}}"}]}]}

body
string

Text of message. Example: Some text.

footer
string

Located under the message text. Example: Footer.

header
string

Header of catalog. Example: Header.

Required when sending the catalog.

chatId
string

Required if phone is not set

Chat ID from the message list. Examples: 12020721369@c.us . Used instead of the phone parameter.

phone
integer

Required if chatId is not set

A phone number starting with the country code. You do not need to add your number.

USA example: 12020721369.

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "sent": true,
  • "id": "gBGGeRhGZTEfAgkJCh2wAz4ZH-8",
  • "message": "Sent to 556123122026@c.us",
  • "description": "Message has been sent to the provider"
}

Media

Use the media node to upload, retrieve, or delete media

Upload media & get mediaId

Upload media and get mediaId. Uploaded media can be sent in template

Authorizations:
JWT token
Request Body schema:
body
required
string

HTTP link https://...

Or base64-encoded file with mime data, for example data:image/jpeg;base64,/9j/4AAQSkZJRgABAQ...

File in form-data input field

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "mediaId": "ed2c7be7-b779-4ba8-a17c-6722f37be2a7"
}