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",
}

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 channel status

WhatsApp Business API client connection status.

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
{ }

Get MM Lite availability and status

Returns whether Marketing Messages Lite (MM Lite) is available for the channel and the current status.

Authorizations:
JWT token

Responses

Request samples

curl -X GET 'https://api.1msg.io/{instanceId}/mmLiteStatus?token=TOKEN'

Response samples

Content type
application/json
{
  • "available": true,
  • "status": "string",
  • "message": "string"
}

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 conversational automation

Get WhatsApp conversational components (welcome message, prompts, commands). Proxies GET /conversational_automation.

When enable_welcome_message is true and a user opens chat for the first time, Meta delivers a webhook message with type: request_welcome. The inbound formatter exposes that as type: "request_welcome" and meta.request_welcome: true so your webhook can send a custom welcome reply.

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
{
  • "enable_welcome_message": true,
  • "prompts": [
    ],
  • "commands": [
    ]
}

Set conversational automation

Update conversational components. Allowed fields: enable_welcome_message (boolean), prompts (string[]), commands ({command_name, command_description}[]).

Authorizations:
JWT token
Request Body schema: application/json
enable_welcome_message
boolean

Enable automatic welcome message

prompts
Array of strings <= 4 items [ items <= 80 characters ]

Ice-breaker prompts (max 4)

Array of objects
property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "enable_welcome_message": true,
  • "prompts": [
    ],
  • "commands": [
    ]
}

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 URL

Configure the client webhook URL for inbound events.

WhatsApp Calling events (field=calls) are forwarded as passthrough payloads with type: "calls" and instanceId (connect / status / terminate). Call permission replies arrive on the normal messages path (call_permission_reply). Details: Calling tag.

Authorizations:
JWT token
Request Body schema: application/json
webhookUrl
string
property name*
additional property
any

Responses

Callbacks

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Callback payload samples

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

Get webhook URL

Returns configured client webhook URL.

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
{ }

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 destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

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 and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

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 and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

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 and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 WhatsApp Flow Message

Send Interactive WhatsApp Flow message to an existing chat. (Only if the dialogue has an Open Session). Only one destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

Use this method to send a published WhatsApp Flow as a service (interactive) message. If the 24-hour window is closed, send a template with a FLOW button via /sendTemplate.

Authorizations:
JWT token
Request Body schema:
body
required
string

Flow message body text

string or object

Flow header (string or text header object)

footer
string

Footer text

flowId
required
string

Published Flow ID

flowToken
required
string

Flow token generated by the business

flowCta
required
string

CTA button text

flowAction
string
Enum: "navigate" "data_exchange"

Flow action type

object

Required for flowAction=navigate (screen is required). Ignored for data_exchange. If data is provided, it must be a non-empty object.

flowMessageVersion
string

Flow message version (default "3")

mode
string
Enum: "draft" "published"

Flow mode (draft or published). If omitted, provider default applies

object

Shortcut for flowActionPayload.data (optional)

flowActionScreen
string

Shortcut for flowActionPayload.screen (optional)

quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 one destination parameter: chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately. 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 and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

Two modes:

  • URL / base64: pass body + filename (legacy).
  • By mediaId: pass numeric WABA mediaId from /uploadMedia together with mediaType (image|video|audio|document). Do not send body and mediaId together.

For a native WhatsApp voice note, send audio (preferably OGG/OPUS) with voice: true (works with URL/base64 or mediaId + mediaType=audio).

Stickers: use /sendSticker instead of /sendFile.

Authorizations:
JWT token
Request Body schema:
body
string

File source when not using mediaId:

  • HTTP/HTTPS URL (https://...)
  • Base64 data URI, e.g. data:image/jpeg;base64,/9j/...
  • File in form-data input field

Required together with filename, unless mediaId + mediaType are used.

filename
string

File name with extension, e.g. 1.jpg or hello.xlsx. Required with body; not required when sending by mediaId.

caption
string

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

mediaId
string

Numeric WABA media id from /uploadMedia. Alternative to body/filename. Requires mediaType. Do not combine with body.

mediaType
string
Enum: "image" "video" "audio" "document"

Required when using mediaId. Not used for stickers — use /sendSticker.

voice
boolean
Default: false

If true and the media is audio, send as a native WhatsApp voice note. Prefer OGG/OPUS. Works with URL/base64 or mediaId + mediaType=audio.

quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 Sticker

Send a WhatsApp sticker to an existing chat. (Only if the dialogue has an Open Session). Only one destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

Provide exactly one of:

  • mediaId — numeric WABA media id from /uploadMedia (webp sticker)
  • link — public HTTPS URL to a webp sticker

Do not use /sendFile for stickers.

Authorizations:
JWT token
Request Body schema:
mediaId
string

Numeric WABA media id from /uploadMedia (webp). Mutually exclusive with link.

link
string

Public HTTPS URL to a webp sticker. Mutually exclusive with mediaId.

quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 CTA URL Button

Send an interactive message with a single Call-To-Action URL button. (Only if the dialogue has an Open Session). Only one destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

Required: body, displayText (button label), url (must be https://). Optional: header (same object shape as /sendButton), footer, quotedMsgId.

Outside the 24-hour customer service window use a template instead.

Authorizations:
JWT token
Request Body schema:
body
required
string

Main message text

displayText
required
string

CTA button label

url
required
string

Button URL (must use https://)

footer
string

Optional footer text

object or object or object or object
quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

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 and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

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 and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

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 and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 Carousel

You can send product cards via Carousel in two ways:

Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate.

Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel.

The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template.

In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons.

Authorizations:
JWT token
Request Body schema:
body
string

Text shown above the carousel. Optional. If omitted and params include a body component, the body will be taken from params.

params
required
Array of objects

Required. Template-like structure (same as sendTemplate params). Must include a CAROUSEL component and its cards.

Structure:

  • params[] item with type CAROUSEL and cards (2..10)
    • cards[] item:
      • card_index: number
      • components[] items:
        • header: parameters[0] with type image/video/product
          • image: {"image": {"link": "https://..."}}
          • video: {"video": {"link": "https://..."}}
          • product: {"product": {"catalog_id": "...", "product_retailer_id": "..."}}
        • body: parameters[] with {"type": "text", "text": "..."}
        • button: sub_type url or quick_reply
          • url: parameters {"text": "Button", "url": "https://..."}
          • quick_reply: parameters[] of {"id": "...", "text": "..."}
  • Optional params[] item with type body to set the text above the carousel.
quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 address request (India only)

Request shipping address from the user (WhatsApp interactive address_message).

India and Singapore only. Requires a WABA phone registered in that country and a recipient phone matching it (+91IN, +65SG).

Pass country: "IN" or country: "SG" (default IN). Eligibility is validated upstream; eligibility; mismatches return errors such as Unsupported Interactive Message type (HTTP 200 with sent: false).

Optional: values, saved_addresses, validation_errors.

Authorizations:
JWT token
Request Body schema: application/json
phone
integer
chatId
string
body
required
string
country
string
Enum: "IN" "SG"

Address form country (IN or SG). Defaults to IN.

object

Optional prefilled address fields

Array of objects

Optional saved addresses

object

Optional validation errors

property name*
additional property
any

Responses

Request samples

Content type
application/json
Example
{
  • "phone": 6531650115,
  • "body": "Thanks for your order!",
  • "country": "SG"
}

Response samples

Content type
application/json
{ }

Send order details (India payments template)

Send a WhatsApp order details payment / invoice message using a pre-approved Utility template that has an ORDER_DETAILS button.

India only (WhatsApp Payments India). Requires:

  • India WhatsApp Business number
  • Commerce enabled on the channel (GET/POST /commerce)
  • Approved template with an ORDER_DETAILS button

Use this method when you need structured fields (order, referenceId, currency, paymentSettings). The API appends a template button sub_type: order_details and sends via the same path as POST /sendTemplate.

Works outside the 24-hour session window (template message).

You can also send the same payload yourself with POST /sendTemplate by including a button component in params with sub_type: order_details.

Authorizations:
JWT token
Request Body schema: application/json
phone
integer

Recipient phone (India E.164 digits, no +). Use phone or chatId.

chatId
string

Recipient chatId (e.g. phone@c.us). Use phone or chatId.

template
required
string

Approved Utility template name that includes an ORDER_DETAILS button

namespace
required
string

Template namespace from the channel / template list

required
object

Template language

Array of objects

Extra template components (HEADER / BODY / etc.). If an order_details button is missing, the API appends one from order / referenceId / currency / paymentSettings.

referenceId
string

Unique order / payment reference id (maps to reference_id)

currency
string

Currency code for India payments

object

Optional payment settings (UPI / payment gateway / payment link). Forwarded as payment_settings on the order_details action.

required
object

Order payload for the ORDER_DETAILS button. Typical fields: status, items[], subtotal, tax, shipping, discount. Amount objects use { "offset": 100, "value": } (e.g. value 50000 with offset 100 = ₹500.00).

property name*
additional property
any

Responses

Request samples

Content type
application/json
{
  • "phone": 919876543210,
  • "template": "order_details_utility",
  • "namespace": "your_namespace_uuid",
  • "language": {
    },
  • "referenceId": "order-123",
  • "currency": "INR",
  • "order": {
    }
}

Response samples

Content type
application/json
{ }

Send payment request

Regional payment request (IN/SG/BR).

Authorizations:
JWT token
Request Body schema: application/json
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

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 (or RU.1504711984690866@lid).

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 (optional typing)

Mark an inbound message as read. Optionally show the WhatsApp typing indicator (up to ~25 seconds or until the customer replies) by setting typingIndicator: true. Typing cannot be sent without marking the message as read.

Authorizations:
JWT token
Request Body schema:
messageId
string

Message ID. Example: 0XzkmGNn4prUAQlzsHApGNRXQ0U

msgId
string

Alias for messageId (either messageId or msgId is required).

typingIndicator
boolean
Default: false

If true, also show the WhatsApp typing indicator after marking the message as read (max ~25s or until the customer replies).

Responses

Request samples

Content type
No sample

Response samples

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

Users

Block, unblock, and list blocked WhatsApp users

Block WhatsApp user

Block a WhatsApp user by phone number (WABA block_users).

Authorizations:
JWT token
Request Body schema: application/json
phone
required
integer

Phone number to block/unblock

Responses

Request samples

Content type
application/json
{
  • "phone": 79001234567
}

Response samples

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

Unblock WhatsApp user

Unblock a previously blocked WhatsApp user by phone number.

Authorizations:
JWT token
Request Body schema: application/json
phone
required
integer

Phone number to block/unblock

Responses

Request samples

Content type
application/json
{
  • "phone": 79001234567
}

Response samples

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

List blocked WhatsApp users

Returns users currently blocked on this WhatsApp channel (WABA GET /block_users). Same channel token auth as blockUser / unblockUser.

Authorizations:
JWT token

Responses

Request samples

curl -X GET 'https://api.1msg.io/{instanceId}/blockedUsers?token=TOKEN'

Response samples

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

Groups

Manage WhatsApp group chats

Create a Group

Create a WhatsApp group and return its invite link.

Beta test eligibility for group chats:

  • Limit of company-initiated messages: at least 100,000 within 24 hours.
  • Verified green check.
Authorizations:
JWT token
Request Body schema:
groupName
required
string

Group name

description
string

Group description

Responses

Request samples

Content type
No sample

Response samples

Content type
application/json
{
  • "created": true,
  • "groupID": "Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD",
  • "chatID": "Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD@g.us",
  • "name": "Group name",
  • "timestamp": 1675964377
}

Get Groups List

Get active groups for the account.

Authorizations:
JWT token
query Parameters
limit
integer
Example: limit=100

Limit number of groups returned

before
string
Example: before=MA==

Pagination cursor for groups list (before)

after
string
Example: after=MQ==

Pagination cursor for groups list (after)

Responses

Response samples

Content type
application/json
{
  • "groups": [
    ],
  • "paging": {
    }
}

Get Group Info

Get group metadata and participants.

Authorizations:
JWT token
path Parameters
group_id
required
string
Example: Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD

Group ID without @g.us suffix. Example: Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD

query Parameters
fields
string
Example: fields=subject,description,participants

Comma-separated list of fields to return for group info

Responses

Response samples

Content type
application/json
{
  • "id": "Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD",
  • "subject": "Group name",
  • "description": "Group description",
  • "participants": [
    ],
  • "chatId": "Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD@g.us"
}

Update Group

Update group name, description, or profile picture.

Authorizations:
JWT token
path Parameters
group_id
required
string
Example: Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD

Group ID without @g.us suffix. Example: Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD

Request Body schema:
subject
string

New group name

description
string

New group description

profile_picture_file
string

Profile picture file handle or media ID

Responses

Request samples

Content type
No sample

Response samples

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

Delete Group

Leave or delete the group (bot leaves).

Authorizations:
JWT token
path Parameters
group_id
required
string
Example: Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD

Group ID without @g.us suffix. Example: Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD

Responses

Response samples

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

Remove Participants

Remove participants from a group (admin only).

Authorizations:
JWT token
path Parameters
group_id
required
string
Example: Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD

Group ID without @g.us suffix. Example: Y2FwaV9ncm91cDoxNzA1NTU1MDEzOToxMjAzNjM0MDQ2OTQyMzM4MjAZD

Request Body schema:
participants
required
Array of strings

Array of participant phone numbers or objects like {"user":"..."}

Responses

Request samples

Content type
No sample

Response samples

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

Templates

Template messaging via WhatsApp Business API

Send Template Message

Send Template Message to a new or existing chat. Only one destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

Use this method for template messages (including Carousel/Catalog templates). If a 24-hour session method (e.g. /sendCarousel) fails because the 24-hour window is closed, send a template via /sendTemplate.

Cyrillic characters in file URLs are not supported. Use URL encoding for non-Latin characters.

Request examples are provided in the payload (requestBody/examples). Available variants:

  • basic template
  • Media Carousel (Cloud API)
  • Catalog Carousel (product cards, Cloud API)
  • Catalog template (catalog button)
  • Coupon Code template (Cloud API)
  • Limited-Time Offer template (Cloud API)
  • WhatsApp Flow template (Cloud API)

Optional MM Lite / TTL fields: useMMlite, messageActivitySharing, messageSendTtlSeconds. Check channel readiness via GET /mmLiteStatus.

Order details (India only): include a params button with sub_type: order_details to send an invoice/payment template outside the 24h window. See also POST /sendOrderDetails.

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, video or product

video- id (mediaId)

document

  • id (mediaId)

  • filename(optional)

image - object with field link (image url)

product - object with catalog_id and product_retailer_id (for catalog carousel product cards)

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/copy_code)

  • parameters (array to fill button variable)

  • index - button position.

coupon_code - for COPY_CODE buttons use parameters with type coupon_code and coupon_code value.

limited_time_offer - for limited-time offer templates:

  • parameters: [{type: limited_time_offer, limited_time_offer: {expiration_time_ms: }}]

  • If limited_time_offer.has_expiration is true, include limited_time_offer parameters and a copy code button first; URL button required.

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

useMMlite
boolean

Force Marketing Messages API (POST marketing_messages). If omitted: auto for MARKETING category when the channel has mm_lite_enabled and mm_lite_available service settings.

messageActivitySharing
boolean

Sets message_activity_sharing on the WABA payload (click tracking webhooks). Requires the MM Lite path. Ignored on Cloud API fallback.

messageSendTtlSeconds
integer

Template message TTL in seconds (message_send_ttl_seconds). MARKETING via MM Lite: 43200–2592000. AUTHENTICATION: 30–900. UTILITY: 30–43200. AUTH/UTILITY also accept -1 (30-day custom TTL).

chatId
string

Required if phone and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 message template

Create WABA message template.

Authorizations:
JWT token
Request Body schema: application/json
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

Remove message template

Delete WABA message template by name.

Authorizations:
JWT token
Request Body schema: application/json
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{ }

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.

You can send product cards via Carousel in two ways:

Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate.

Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel.

The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template.

In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons.

Send Carousel

You can send product cards via Carousel in two ways:

Template messages: do not require a 24-hour customer service window between you and the recipient. Use sendTemplate.

Free-form messages: can be sent only when a customer service window is open between you and the recipient. Use sendCarousel.

The message structure in /sendCarousel is largely similar to sending a template. However, in this case you must explicitly specify all elements that are created in advance when working with templates. This is because the message is sent without using a template.

In /sendCarousel, for sending a Catalog Carousel there can be either 1 URL button or one or more quick reply buttons.

Authorizations:
JWT token
Request Body schema:
body
string

Text shown above the carousel. Optional. If omitted and params include a body component, the body will be taken from params.

params
required
Array of objects

Required. Template-like structure (same as sendTemplate params). Must include a CAROUSEL component and its cards.

Structure:

  • params[] item with type CAROUSEL and cards (2..10)
    • cards[] item:
      • card_index: number
      • components[] items:
        • header: parameters[0] with type image/video/product
          • image: {"image": {"link": "https://..."}}
          • video: {"video": {"link": "https://..."}}
          • product: {"product": {"catalog_id": "...", "product_retailer_id": "..."}}
        • body: parameters[] with {"type": "text", "text": "..."}
        • button: sub_type url or quick_reply
          • url: parameters {"text": "Button", "url": "https://..."}
          • quick_reply: parameters[] of {"id": "...", "text": "..."}
  • Optional params[] item with type body to set the text above the carousel.
quotedMsgId
string

Quoted message ID (Cloud API)

chatId
string

Required if phone and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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 Product

Send a single product or product list to a new or existing chat. (Only if the dialogue has an Open Session). Only one destination parameter is needed - chatId, phone, or bsuid. In BSUID-centric routing, chatId can be phone@c.us, bsuid@lid, group@g.us, or username@username. The phone field accepts a phone number or BSUID; bsuid can be passed separately.

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 and bsuid are not set

Chat ID from the message list. Examples: 12020721369@c.us, RU.1504711984690866@lid, username@username, or 120363046942338209@g.us (group). Used instead of the phone parameter.

phone
string

Required if chatId and bsuid are not set

Recipient identifier. Accepts a phone number starting with the country code, or a BSUID such as RU.1504711984690866.

Use chatId for full chat IDs: phone@c.us, bsuid@lid, username@username, or group@g.us.

bsuid
string

Optional alternative to phone/chatId

Recipient BSUID without the @lid suffix. Example: RU.1504711984690866.

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"
}

Catalog

Catalog and cart commerce settings (GET/POST /commerce).

GET response fields: id (catalog id), is_cart_enabled, is_catalog_visible.

POST body: { "params": { "is_cart_enabled": boolean, "is_catalog_visible": boolean } }.

Get Commerce Settings

Returns catalog/cart commerce settings for the channel.

Response fields (array):

  • id — catalog id
  • is_catalog_visible — show catalog storefront icon (true/false)
  • is_cart_enabled — enable cart (true/false)

Responses

Response samples

Content type
application/json
[
  • {
    }
]

Set Commerce Settings

Update catalog/cart commerce settings.

POST body:

{ "params": { "is_cart_enabled": true, "is_catalog_visible": true } }
  • params.is_catalog_visible — show catalog storefront icon
  • params.is_cart_enabled — enable cart

Blocked when subscription limit exceeded.

Request Body schema:
object

Responses

Request samples

Content type
{ }

Response samples

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

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"
}

Retrieve uploaded media metadata

Get WABA media URL and metadata by mediaId (from /uploadMedia). The returned url is temporary and typically expires within ~5 minutes.

Authorizations:
JWT token
query Parameters
mediaId
required
string

Numeric WABA media id

Responses

Request samples

curl -X GET 'https://api.1msg.io/{instanceId}/retrieveMedia?token=TOKEN&mediaId=123456789012345'

Response samples

Content type
application/json
{
  • "url": "string",
  • "mimeType": "string",
  • "sha256": "string",
  • "fileSize": 0,
  • "id": "string"
}

Delete media from WABA storage

Delete previously uploaded media by numeric mediaId (from /uploadMedia).

This is the canonical deletion endpoint and uses the REST DELETE verb on the media resource path. The older POST /deleteMedia is a deprecated alias.

Authorizations:
JWT token
path Parameters
mediaId
required
string

Numeric WABA media id

Responses

Request samples

curl -X DELETE 'https://api.1msg.io/{instanceId}/media/123456789012345?token=TOKEN'

Response samples

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

Delete media from WABA storage (deprecated alias) Deprecated

Deprecated. Use DELETE /media/{mediaId} instead.

This POST alias is kept for backward compatibility with earlier integrations. New integrations should call DELETE /media/{mediaId}: 1msg follows REST conventions for resource deletion going forward.

Authorizations:
JWT token
Request Body schema: application/json
mediaId
required
string

Numeric WABA media id from /uploadMedia

Responses

Request samples

Content type
application/json
{
  • "mediaId": "123456789012345"
}

Response samples

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

Template Analytics

Limitations

  • Button click analytics are available only for MARKETING and UTILITY template categories.
  • WhatsApp Business accounts owned by or shared with Meta Business Accounts in the European Union (EU), United Kingdom (UK), and Japan, as well as accounts with a business phone number containing the country code of the UK, Japan, or an EU country/region, are not supported.
  • Read and click event data for WhatsApp template messages is available only for 7 days from the date the message was sent. After this 7-day period, the respective read and click counters are zeroed out, and no further updates are recorded for those messages.

Get Template Analytics Settings

Returns WABA-level template analytics settings.

  • enable: enable/disable template analytics on the WABA.
Authorizations:
JWT token

Responses

Request samples

curl -X GET 'https://api.1msg.io/{instanceId}/settings/templateAnalytics?token={token}'

Response samples

Content type
application/json
{
  • "enable": true,
  • "cta_url_link_tracking_opted_out": false,
  • "external_id": "external_id"
}

Update Template Analytics Settings

Enable/disable template analytics on the WABA.

Authorizations:
JWT token
Request Body schema:
enable
boolean

Enable template analytics on the WABA

cta_url_link_tracking_opted_out
boolean

Disable URL button click tracking for a specific template

external_id
string

Template external_id (required when setting cta_url_link_tracking_opted_out)

Responses

Request samples

Content type
{ }

Response samples

Content type
application/json
{
  • "enable": true,
  • "cta_url_link_tracking_opted_out": false,
  • "external_id": "external_id"
}

Get Template Analytics Opt-Out

Returns per-template URL button click tracking opt-out settings.

Authorizations:
JWT token
path Parameters
template_external_id
required
string
Example: external_id

Template external_id for per-template analytics setting (cta_url_link_tracking_opted_out).

Responses

Request samples

curl -X GET 'https://api.1msg.io/{instanceId}/settings/templateAnalyticsOptOut/<template_id>?token={token}'

Response samples

Content type
application/json
{
  • "enable": true,
  • "cta_url_link_tracking_opted_out": false,
  • "external_id": "external_id"
}

Update Template Analytics Opt-Out

Enable/disable URL button click tracking for a specific template.

Authorizations:
JWT token
path Parameters
template_external_id
required
string
Example: external_id

Template external_id for per-template analytics setting (cta_url_link_tracking_opted_out).

Request Body schema:
enable
boolean

Enable template analytics on the WABA

cta_url_link_tracking_opted_out
boolean

Disable URL button click tracking for a specific template

external_id
string

Template external_id (required when setting cta_url_link_tracking_opted_out)

Responses

Request samples

Content type
{ }

Response samples

Content type
application/json
{
  • "enable": true,
  • "cta_url_link_tracking_opted_out": false,
  • "external_id": "external_id"
}

Get Template Analytics

Template analytics are reported with daily granularity. Data is returned in UTC by default, or in the WABA timezone when use_waba_timezone=true.

Limitations:

  • Button click analytics are available only for MARKETING or UTILITY templates.
  • Maximum 10 template_ids per request.

If template analytics is disabled for the channel, the API returns an error: Template analytics is disabled for this channel.

Authorizations:
JWT token
query Parameters
start
required
string
Example: start=2024-01-01

Start time for the date range. Unix timestamp or YYYY-MM-DD. If using use_waba_timezone=true, use YYYY-MM-DD.

end
required
string
Example: end=2024-01-07

End time for the date range. Unix timestamp or YYYY-MM-DD. If using use_waba_timezone=true, use YYYY-MM-DD.

granularity
required
string
Value: "DAILY"
Example: granularity=DAILY

Analytics granularity. Only DAILY is supported.

template_ids
required
Array of strings
Example: template_ids=1156697826259690&template_ids=1309207764213383

Array of template IDs to retrieve analytics for. Maximum 10.

metric_types
Array of strings
Items Enum: "COST" "CLICKED" "DELIVERED" "READ" "SENT" "APP_ACTIVATIONS" "APP_ADD_TO_CART" "APP_CHECKOUTS_INITIATED" "APP_PURCHASES" "APP_PURCHASES_CONVERSION_VALUE" "WEBSITE_ADD_TO_CART" "WEBSITE_CHECKOUTS_INITIATED" "WEBSITE_PURCHASES" "WEBSITE_PURCHASES_CONVERSION_VALUE"
Example: metric_types=SENT&metric_types=DELIVERED&metric_types=READ

Types of metrics to retrieve. If omitted, all metric types are returned.

product_type
string
Enum: "CLOUD_API" "MARKETING_MESSAGES_LITE_API"
Example: product_type=CLOUD_API

Filter metrics by product type. If omitted, only Cloud API metrics are returned.

use_waba_timezone
boolean
Example: use_waba_timezone=true

Show metrics in the WABA timezone. If true, start and end must be YYYY-MM-DD.

Responses

Request samples

curl -X GET 'https://api.1msg.io/{instanceId}/templateAnalytics?start=2024-01-01&end=2024-01-07&granularity=DAILY&template_ids=<template_id>&metric_types=SENT&product_type=CLOUD_API&token={token}'

Response samples

Content type
application/json
{
  • "data": [
    ],
  • "paging": {
    }
}

WhatsApp Flows

Manage WhatsApp Flow lifecycle: create, preview, publish, deprecate.

Create WhatsApp Flow

Create a new WhatsApp Flow in draft state. Supports optional flow.json upload and immediate publish.

Authorizations:
JWT token
Request Body schema: multipart/form-data
name
required
string

Flow name

categories
required
Array of strings (FlowCategory)
Items Enum: "SIGN_UP" "SIGN_IN" "APPOINTMENT_BOOKING" "LEAD_GENERATION" "CONTACT_US" "CUSTOMER_SUPPORT" "SURVEY" "OTHER"

Categories (comma or array)

endpointUri
string <uri>

Data endpoint URL

cloneFlowId
string

Clone existing flow id

publish
boolean

Publish immediately

string or object

Flow JSON definition (string or object)

file
string <binary>

Optional flow.json upload

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "success": true,
  • "flowJson": {
    },
  • "publish": { }
}

Get WhatsApp Flows List

Returns all flows for the instance.

Authorizations:
JWT token
query Parameters
fields
string

Comma list of fields to return (id,name,status,categories,preview,validation_errors,json_version,data_api_version,endpoint_uri,data_channel_uri,whatsapp_business_account)

Responses

Response samples

Content type
application/json
{
  • "items": [
    ],
  • "paging": { },
  • "count": 0,
  • "total": 0
}

Get WhatsApp Flow Details

Authorizations:
JWT token
path Parameters
flowId
required
string

Flow identifier

query Parameters
fields
string

Comma list of fields to return (id,name,status,categories,preview,validation_errors,json_version,data_api_version,endpoint_uri,data_channel_uri,whatsapp_business_account)

Responses

Response samples

Content type
application/json
{
  • "id": "string",
  • "name": "string",
  • "status": "DRAFT",
  • "categories": [
    ],
  • "validationErrors": [
    ],
  • "jsonVersion": "string",
  • "dataApiVersion": "string",
  • "endpointUri": "http://example.com",
  • "dataChannelUri": "http://example.com",
  • "preview": {},
  • "whatsappBusinessAccount": { }
}

Delete WhatsApp Flow (draft only)

Authorizations:
JWT token
path Parameters
flowId
required
string

Flow identifier

Responses

Response samples

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

Update WhatsApp Flow Metadata

Authorizations:
JWT token
path Parameters
flowId
required
string

Flow identifier

Request Body schema: application/json
name
string
categories
Array of strings (FlowCategory)
Items Enum: "SIGN_UP" "SIGN_IN" "APPOINTMENT_BOOKING" "LEAD_GENERATION" "CONTACT_US" "CUSTOMER_SUPPORT" "SURVEY" "OTHER"
endpointUri
string <uri>

Responses

Request samples

Content type
application/json
{ }

Response samples

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

Update WhatsApp Flow JSON

Authorizations:
JWT token
path Parameters
flowId
required
string

Flow identifier

Request Body schema: multipart/form-data
required
string or object

Flow JSON definition

file
string <binary>

flow.json upload

Responses

Response samples

Content type
application/json
{
  • "success": true,
  • "validationErrors": [
    ]
}

Get WhatsApp Flow Preview

Authorizations:
JWT token
path Parameters
flowId
required
string

Flow identifier

query Parameters
invalidate
boolean

Force regenerate preview

Responses

Response samples

Content type
application/json
{}

Publish WhatsApp Flow

Authorizations:
JWT token
path Parameters
flowId
required
string

Flow identifier

Responses

Response samples

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

Deprecate WhatsApp Flow

Authorizations:
JWT token
path Parameters
flowId
required
string

Flow identifier

Responses

Response samples

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

Calling

WhatsApp Calling API (beta) — VoIP signaling proxy.

1msg does not host media, store call history, or store recordings. You need your own WebRTC or SIP stack.

Prerequisites

  • Meta Calling enabled on the number (Cloud API; not COEX)
  • Paid channel — trial / subscriptionBlocked403 plain text
  • Webhook URL configured (POST /webhook) for calls events

Inbound (user → business)

  1. Webhook type=calls, event=connect — take call_id + SDP offer
  2. Optional: POST /initiateCall action=pre_accept + WebRTC answer SDP
  3. action=accept + WebRTC answer SDP, or action=reject
  4. Later event=terminate, or action=terminate to hang up

Answer within ~30–60s or Meta ends as unanswered.

Critical: accept / pre_accept need a WebRTC-generated SDP answer. Do not echo Meta's offer. Postman/curl alone cannot establish real media.

Outbound (business → user)

  1. Send Call Permission Request (CPR) — template or interactive
  2. Wait for permission reply on the messages webhook (call_permission_reply)
  3. POST /initiateCall action=connect + business SDP offer
  4. Apply Meta's SDP answer from the calls connect webhook

Meta limits (summary): permission ~7 days; up to 5 calls / 24h / user; max 2 CPR / 7 days; auto-revoke after 4 unanswered.

Webhooks (type=calls)

Passthrough of Meta field=calls plus type, instanceId. Events: connect (offer or answer SDP), statuses (RINGING / ACCEPTED / REJECTED), terminate. CPR replies use the messages path, not type=calls.

See operations below for request bodies and examples.

Get calling settings

Return WhatsApp Calling API settings for this channel (beta).

Proxies upstream GET /calling/settings.

Prerequisites

  • Number must be eligible for Meta Calling (Cloud API; not COEX)
  • Trial / subscriptionBlocked channels receive 403 plain text
  • You need your own WebRTC or SIP stack; 1msg is a signaling proxy only and does not store call history or recordings

See the Calling tag overview for inbound/outbound flows and webhooks.

Authorizations:
JWT token

Responses

Response samples

Content type
application/json
{
  • "calling": {
    }
}

Update calling settings

Enable, disable, or update WhatsApp Calling settings (beta).

Proxies upstream POST /calling/settings. Body is forwarded as-is (1msg does not validate fields).

Common fields under calling

  • status (ENABLED | DISABLED) — required to turn calling on/off
  • call_icon_visibility (DEFAULT | DISABLE_ALL) — optional
  • callback_permission_status (ENABLED | DISABLED) — optional; when enabled, inbound user calls grant callback permission
  • call_hours — optional hours / timezone object
  • sip — optional SIP trunk; when SIP is ENABLED, Graph call actions and calling webhooks are not used
  • srtp_key_exchange_protocol (DTLS | SDES) — SDES only with SIP
  • video.status — optional

Meta may accept only one feature group per request — prefer focused updates (e.g. enable status first, then SIP).

Trial / subscriptionBlocked403 plain text.

Authorizations:
JWT token
Request Body schema: application/json
object

Calling feature configuration for the business phone number

property name*
additional property
any

Responses

Request samples

Content type
application/json
Example
{
  • "calling": {
    }
}

Response samples

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

Call action (connect / pre_accept / accept / reject / terminate)

Perform a WhatsApp Calling action (beta).

Proxies upstream POST /calling/calls. Despite the historical path name /initiateCall, this endpoint handles all call actions:

action Use Required
connect Outbound business → user to + session (sdp_type: offer)
pre_accept Inbound (optional, reduces audio clipping) call_id + session (sdp_type: answer)
accept Inbound answer call_id + session (sdp_type: answer)
reject Decline inbound call_id
terminate Hang up call_id

SDP / media (critical)

  • accept / pre_accept require a WebRTC-generated SDP answer.
  • Do not send Meta's offer SDP back as the answer.
  • Postman (or curl) alone cannot establish real media — you need a WebRTC or SIP stack. 1msg only proxies signaling.

Answer within ~30–60 seconds of an inbound connect webhook or Meta terminates as unanswered. Common Meta errors include Calling not enabled (138000), no permission (138006), SDP validation failures.

Outbound requires a prior Call Permission Request (CPR) acceptance. See the Calling tag overview for the full outbound flow and CPR limits.

Trial / subscriptionBlocked403 plain text. Upstream failures often return HTTP 200 with { "response": { "error": "..." } }.

Authorizations:
JWT token
Request Body schema: application/json
messaging_product
required
string
Value: "whatsapp"

Must be whatsapp

action
required
string
Enum: "connect" "pre_accept" "accept" "reject" "terminate"

Call control action

call_id
string

WhatsApp call id from the inbound/outbound calls webhook (calls[].id). Required for pre_accept, accept, reject, terminate.

to
string

Recipient WhatsApp user phone (digits, country code, no +). Required for outbound connect.

biz_opaque_callback_data
string <= 512 characters

Optional opaque string echoed on later call webhooks for correlation

object

WebRTC SDP session (required for connect / pre_accept / accept)

property name*
additional property
any

Responses

Request samples

Content type
application/json
Example
{
  • "messaging_product": "whatsapp",
  • "to": "12185552828",
  • "action": "connect",
  • "biz_opaque_callback_data": "order-123",
  • "session": {
    }
}

Response samples

Content type
application/json
Example
{
  • "messaging_product": "whatsapp",
  • "success": true
}

Profile

Update profile info

Update WhatsApp Business Account profile fields. At least one updatable field required. Blocked when subscription limit exceeded.

Request Body schema: application/json
about
string
address
string
description
string
email
string
vertical
string
photo
string
websites
Array of strings
property name*
additional property
any

Responses

Request samples

Content type
application/json
{ }

Response samples

Content type
application/json
{
  • "error": "Wrong token \"xxx7i1crxjxpkxxx\" for channel \"123\". Please provide token as a GET parameter."
}