Cancel scheduled message
Cancel a message that is still `pending` so it will not be sent.
The message is removed from the queue and a cancellation is recorded in its delivery log.
The response is the message as it now stands: the public status enum has no cancelled value, so it reads status: "failed" with failureReason: "cancelled by user".
404— no pending message with this id is owned by the caller (this includes a message that was already dispatched).400— the message is past the cancellable window (its status is no longerpending).409— the message was dispatched while the cancel was in flight; nothing was cancelled.
Requires messages:write. DELETE /v1/scheduled-messages/{id} is different: it hard-deletes the message in any status except in flight (delivered and failed messages included), returns 409 only while the message is in flight, and responds { id, deleted: true }.
Request
curl -X POST "https://api.blueticks.co/v1/scheduled-messages//cancel"{
"success": true,
"data": {
"id": "string",
"waMessageKey": {
"fromMe": true,
"remote": "string",
"id": "string",
"_serialized": "string",
"participant": "string"
},
"to": "string",
"recipientName": "string",
"type": "text",
"text": "string",
"mediaUrl": "string",
"mediaKind": "image",
"pollQuestion": "string",
"pollOptions": [
"string"
],
"pollAllowMultiple": true,
"status": "pending",
"sendAt": "2019-08-24T14:15:22Z",
"recurrence": {
"frequency": "daily",
"interval": 0,
"byWeekday": [
"MO"
],
"endsAfter": 0,
"endsOn": "2019-08-24T14:15:22Z",
"timezone": "string"
},
"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",
"secret": "string",
"linkPreview": {
"title": "string",
"description": "string",
"canonicalUrl": "string",
"thumbnail": "string"
},
"waLabels": {
"requested": 0,
"applied": true,
"error": "string"
},
"warning": {
"code": "no_engine_connected",
"message": "string"
}
}
}{
"success": false,
"error": {
"code": "string",
"message": "string",
"request_id": "string",
"requestId": "string",
"details": [
{
"path": "string",
"code": "string",
"message": "string"
}
],
"candidates": [
{
"numberId": "string",
"phoneNumber": "string"
}
],
"upgrade": {
"url": "string",
"text": "string",
"reset_time": "string",
"seconds_remaining": 0,
"plan": {}
}
}
}Path Parameters
Response
Response Body
application/json
application/json
Schedule message
Send or schedule a WhatsApp message to the chat named in the URL path (`{chatId}` — a phone number in E.164 format, e.g. `+15551234567`, or a WhatsApp chat id like `12345@c.us` / `1234567890@g.us` / `12345@newsletter`).
List chats
List the chats (conversations) the connected WhatsApp engine sees, most-recent first.