---
title: "Send a message to a group"
method: POST
path: "/send_msg/group/"
tags: ["Messages"]
---

# Send a message to a group

`POST /send_msg/group/`

## Request

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

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).

## Request body

- SendGroupMessageRequest: Your API credentials, sent in the request body (JSON or form fields) of every request that uses them. Both come from Settings → API keys in the dashboard. The API key decides which workspace the request acts on.
  - `client_id` integer, required: Your API Client ID from Settings → API keys.
  - `api_key` string, required: One of your API keys from the same page. Keep it secret.
  - `whatsapp_client` integer: 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_name` string, required: Name of the WhatsApp group exactly as WhatsApp shows it. Send it as a string.
  - `msg_type` 0 | 1 | 2: `0` text (default), `1` image, `2` file or document.
  - `msg` string: 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_url` string, uri: Public `http`/`https` URL of the image. Required when `msg_type` is 1 (and no file is uploaded).
  - `file_url` string, uri: Public `http`/`https` URL the file can be downloaded from directly. Required when `msg_type` is 2 (and no file is uploaded).
  - `file_name` string: 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_seconds` integer: 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.
  - `webhook` string, 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.

## Response `200`

Message queued.

- MessageCreated
  - `status` 1, required: `1`: the message was queued (not yet sent).
  - `message` 'Created', required
  - `msg_id` integer, required: ID of the queued message. Save it to check the status or cancel it.

## Other responses

- `400`: Request refused. Examples of `message`: `Group Name cant be null`, `Msg cant be null`, `Image Url Can't be null`, `File Url Can't be null`, `Invalid whatsapp client …`, `Invalid whatsapp client id.`, `Not enough credits`, `Auth Error: invalid api key`, `Account Disabled`, `Invalid JSON format: …`.
- `403`: `client_id` is not a whole number.
- `429`: Daily fair-use limit reached for this number (1,000 messages in 24 hours).
- `500`: HTML error page instead of JSON (see the operation description).

---

[API](https://skmtc.dev/wbiztool/apis/wbiztool-api.md) · [All operations](https://skmtc.dev/wbiztool/apis/wbiztool-api/llms.txt) · [OpenAPI document](https://skmtc.dev/wbiztool/apis/wbiztool-api/revisions/bc7380bb5684?raw)
