Schedule message
Send a message via WhatsApp.
The body is a FLAT object — set the type field to one of text, media, or poll; type selects which top-level fields are relevant.
Variants:
type: "text"— requiredtext(1–4096 chars). A rich link-preview card is attached automatically when the text contains a URL. Example body:{"type":"text","to":"+15551234567","text":"hello"}type: "media"— provide the media asmediaUrl(HTTPS) ormediaBase64(base64 / data: URL);mediaUrlwins if both are sent. The bytes are uploaded server-side and only a URL is sent on to the engine. OptionalmediaKind(image·video·audio·document·sticker·voice·gif; auto-detected when omitted),text(caption),mediaFilename. Example:{"type":"media","to":"+15551234567","mediaUrl":"https://cdn.example.com/x.pdf","mediaKind":"document","mediaFilename":"receipt.pdf"}type: "poll"— requiredpollQuestionandpollOptions(2–12 items). OptionalpollAllowMultiple(default false). Example:{"type":"poll","to":"+15551234567","pollQuestion":"Pizza?","pollOptions":["Yes","No"]}
All variants accept optional sendAt (ISO 8601 ≥10s future, ≤365d) and replyTo (wire key of a prior message to quote).
See Sending messages for runnable Python / Node / PHP / cURL examples per variant.
Request
curl -X POST "https://api.blueticks.co/v1/scheduled-messages" \ -H "Content-Type: application/json" \ -d '{ "to": "+15555550100", "type": "text", "text": "Hello from Blueticks!" }'{
"success": true,
"data": {
"id": "string",
"key": "string",
"to": "string",
"type": "text",
"text": "string",
"mediaUrl": "string",
"mediaKind": "image",
"pollQuestion": "string",
"status": "pending",
"sendAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"confirmedAt": "2019-08-24T14:15:22Z",
"receivedAt": "2019-08-24T14:15:22Z",
"readAt": "2019-08-24T14:15:22Z",
"playedAt": "2019-08-24T14:15:22Z",
"failedAt": "2019-08-24T14:15:22Z",
"failureReason": "string",
"linkPreview": {
"title": "string",
"description": "string",
"canonicalUrl": "string",
"thumbnail": "string"
}
}
}{
"success": true,
"data": {
"id": "string",
"key": "string",
"to": "string",
"type": "text",
"text": "string",
"mediaUrl": "string",
"mediaKind": "image",
"pollQuestion": "string",
"status": "pending",
"sendAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"confirmedAt": "2019-08-24T14:15:22Z",
"receivedAt": "2019-08-24T14:15:22Z",
"readAt": "2019-08-24T14:15:22Z",
"playedAt": "2019-08-24T14:15:22Z",
"failedAt": "2019-08-24T14:15:22Z",
"failureReason": "string",
"linkPreview": {
"title": "string",
"description": "string",
"canonicalUrl": "string",
"thumbnail": "string"
}
}
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"request_id": "string",
"details": [
{
"path": "string",
"code": "string",
"message": "string"
}
]
}
}Header Parameters
Optional key for safe retries. Identical bodies with the same key return the original response; differing bodies return 409.
length <= 64Request Body
application/json
Response
Response Body
application/json
application/json
application/json