Messages

Send a message to a group

Queue a WhatsApp text, image or file to a group your connected number is a member of. The group is matched by its exact name when the message is sent, so group problems (Group not found) only show in Message status or the webhook. Upload a file with multipart/form-data and the field file. A group_name sent as a JSON number, or a msg_type that is not a whole number, returns an HTML error page (HTTP 500).

post/send_msg/group/

Request

  • Base URL: https://wbiztool.com/api/v1
  • URL: https://wbiztool.com/api/v1/send_msg/group/
  • Auth: none required

Request body

client_idinteger required

Your API Client ID from Settings → API keys.

api_keystring required

One of your API keys from the same page. Keep it secret.

whatsapp_clientinteger

ID of the WhatsApp number (or Telegram account) to send from, shown as "ID …" on the number's card on WhatsApp numbers in the dashboard.

group_namestring required

Name of the WhatsApp group exactly as WhatsApp shows it. Send it as a string.

msg_type0 | 1 | 2

0 text (default), 1 image, 2 file or document.

msgstring

Message text; required when msg_type is 0. For images and files it is the caption and can be empty. WhatsApp formatting works (*bold*, _italic_, ~strikethrough~). message is accepted as an alias.

img_urlstring uri

Public http/https URL of the image. Required when msg_type is 1 (and no file is uploaded).

file_urlstring uri

Public http/https URL the file can be downloaded from directly. Required when msg_type is 2 (and no file is uploaded).

file_namestring

File name the recipient sees, such as invoice-4821.pdf. Sent in lower case, characters such as & : ? * $ ; become _, cut to 150 characters. With msg_type 2, .pdf is added when the extension is missing or not supported.

expire_after_secondsinteger

Mark the message as expired (status 4) if it has not been sent within this many seconds. Checked by a background job at least 30 seconds after the deadline.

webhookstring uri

Public URL that receives a form-encoded POST (msg_id, status) when the message is sent, fails, is cancelled or expires. See the messageStatus webhook.

Example request

{
  "client_id": 12345,
  "api_key": "YOUR_API_KEY",
  "whatsapp_client": 678,
  "expire_after_seconds": 3600
}

Response

Message queued.

status1 required

1: the message was queued (not yet sent).

message'Created' required
msg_idinteger required

ID of the queued message. Save it to check the status or cancel it.

Changes

No recorded changes to this operation across all 1 revision of this API.