---
title: "Schedule a message"
method: POST
path: "/schedule_msg/"
tags: ["Messages"]
---

# Schedule a message

`POST /schedule_msg/`

## Request

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

Queue a text, image or file to a phone number or group for a date and time (`dd/mm/yyyy`, `HH:MM`, `timezone`). A time in the past is sent straight away. Until it is sent the message has status `0` and can be cancelled. Images and files by URL only (downloaded at send time). Most errors come back with HTTP 200 and `status: 0`. The JSON body is served with `Content-Type: text/html`; parse it as JSON whatever the header says.

## Request body

- union
  - object: 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.
  - object: 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.

## Response `200`

Scheduled (`status: 1`) or refused (`status: 0`). Failure messages include `Auth Error`, `Either phone or group_name parameter is required`, `Please provide either phone OR group_name, not both`, `Invalid phone number`, `Invalid Contact Number "…"`, `Msg cant be null`, `Image Url Can't be null`, `File Url Can't be null`, `Scheduled date & time is not in valid format…`, `Unknown timezone "…": …`, `Invalid msg_type: use 0 (text), 1 (image) or 2 (file)`, `Invalid whatsapp client …`, `Not enough credits`, `Demo Account can not access apis`, `Invalid JSON format: …`.

- union
  - 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.
  - ApiError: A failed request. `status` is `0` and `message` says why. (`Account Disabled` has no `status` field.)
    - `status` 0
    - `message` string, required

## Other responses

- `400`: Invalid API key.
- `403`: `client_id` is not a whole number.
- `429`: Daily fair-use limit reached for this number (1,000 messages in 24 hours).
- `500`: Server error; nothing was scheduled. Try again.

---

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