API reference/WhatsApp Messages/Send a service (24h window) message

postWhatsApp MessagesAPI key

Send a service (24h window) message

POST /client/v1/wp/message/service

Sends a free-form text, image, document or location message inside the WhatsApp 24-hour customer-service window - the contact must have messaged this workspace in the last 24 hours. Outside the window, use a template (/wp/message/send).

Requires a workspace API key. The message is stored like a live-chat reply, so your team sees it in the ScaleBiss inbox.

Request body

FieldTypeDetails
to
string
required
Recipient with country code (no +).
from
string
required
Sender - Meta phone number id or display phone.
type
string
optional
Message type. Defaults to `text`.
textimagedocumentlocation
message
string
optional
Text body (required for `text`, max 4096) or media caption (max 1024).
mediaUrl
string
optional
Public `https` URL. Required for `image` and `document`.
filename
string
optional
File name shown for a document.
mime
string
optional
Media MIME type, e.g. `application/pdf`.
latitude
number
optional
Required for `location`.
longitude
number
optional
Required for `location`.
name
string
optional
Location name.
address
string
optional
Location address.
contextMessageId
string
optional
wamid of the customer message you are replying to.

Content type: application/json

Responses

202Accepted and queued for sending
{
  "success": true,
  "message": "Service message accepted",
  "data": {
    "messageId": "5521",
    "to": "919876543210",
    "type": "text",
    "status": "pending"
  }
}
400Validation error, unknown `from`, WhatsApp not connected, or the 24-hour window is closed
{
  "success": false,
  "message": "The 24-hour messaging window is closed",
  "code": "WA_WINDOW_CLOSED"
}
401Missing or invalid API key - a Passport JWT is not accepted on this route
{
  "success": false,
  "message": "This endpoint requires a workspace API key (Authorization: Bearer sb_…)",
  "code": "API_KEY_REQUIRED"
}
429More than 60 requests per minute for this API key
{
  "success": false,
  "message": "Too many requests for this API key. Retry in a minute.",
  "code": "RATE_LIMITED"
}