Skip to main content
POST
Create messages

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

multipart/form-data

Send a single WhatsApp message. Scramble reads these rules to document the request body. Supports text, media (by URL), location and Baileys interactive buttons; template/bulk sends use the /templates + /broadcasts endpoints.

to
string
required

Recipient phone in international format (digits, E.164). Required.

Maximum string length: 32
device_id
string | null

Sending sender (optional — defaults to the workspace's primary). Accepts a Baileys device id (57), a WABA/Twilio provider-config id ("cfg_20" or a bare 20), or an "engine:id" key — resolved across both the devices + wa_provider_configs tables. String, not int, so the "cfg_20" form from /api/v1/devices is accepted.

Maximum string length: 40
type
enum<string> | null

Message type. Defaults to "text".

Available options:
text,
image,
video,
document,
audio,
location,
interactive
text
string | null

Text body (required for text; used as caption for media).

Maximum string length: 4096
media
file | null

Image / video / document / audio sends — EITHER way: media — attach the file directly (multipart upload, max 16 MB), OR media_url — a public URL we download for you. No need to host the file first; just send media in the same call.

Maximum string length: 16384
media_url
string<uri> | null
Maximum string length: 2048
latitude
number | null

Location (when type=location).

Required range: -90 <= x <= 90
longitude
number | null
Required range: -180 <= x <= 180
Maximum string length: 60
title
string | null
Maximum string length: 256
subtitle
string | null
Maximum string length: 256
buttons
object[] | null

Baileys-only interactive message. The API deliberately exposes this as a first-class type so Scramble documents it publicly.

Required array length: 1 - 3 elements
delay
boolean
default:true

Response

Successful response.

The response is of type string.