import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.scheduledMessages.updateScheduledMessage({
scheduled_id: '00000000-0000-0000-0000-000000000000',
message: 'Updated reminder: submit your report by EOD',
});
console.log(response);
}
main();curl -X PATCH 'https://api.periskope.app/v1/message/scheduled/00000000-0000-0000-0000-000000000000' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"message": "Updated reminder: submit your report by EOD"
}'{
"scheduled_id": "00000000-0000-0000-0000-000000000000",
"org_id": "00000000-0000-0000-0000-000000000000",
"org_phone": "911111111111@c.us",
"chat_id": "120363000000000000@g.us",
"message_payload": {
"message": "Weekly reminder: submit your report",
"media": {}
},
"scheduled_at": "2026-02-01T09:00:00.000Z",
"is_repeat": true,
"repeat_config": {
"repeat_interval": "week",
"repeat_value": 1,
"repeat_days": [
"monday",
"friday"
],
"repeat_ends": "2026-12-31T00:00:00Z"
},
"status": "scheduled",
"skip_next": false,
"paused_at": null,
"updated_at": null,
"performed_by": "api",
"created_at": "2026-01-15T09:30:00.000Z"
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "NOT_FOUND_ERROR",
"message": "Scheduled message not found",
"status": 404
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Update Scheduled Message
Updates a pending scheduled message — content, next run time, repetition, pause/resume or skip-next. Completed messages cannot be updated.
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.scheduledMessages.updateScheduledMessage({
scheduled_id: '00000000-0000-0000-0000-000000000000',
message: 'Updated reminder: submit your report by EOD',
});
console.log(response);
}
main();curl -X PATCH 'https://api.periskope.app/v1/message/scheduled/00000000-0000-0000-0000-000000000000' \
-H 'Authorization: Bearer YOUR_API_KEY' \
-H 'Content-Type: application/json' \
-d '{
"message": "Updated reminder: submit your report by EOD"
}'{
"scheduled_id": "00000000-0000-0000-0000-000000000000",
"org_id": "00000000-0000-0000-0000-000000000000",
"org_phone": "911111111111@c.us",
"chat_id": "120363000000000000@g.us",
"message_payload": {
"message": "Weekly reminder: submit your report",
"media": {}
},
"scheduled_at": "2026-02-01T09:00:00.000Z",
"is_repeat": true,
"repeat_config": {
"repeat_interval": "week",
"repeat_value": 1,
"repeat_days": [
"monday",
"friday"
],
"repeat_ends": "2026-12-31T00:00:00Z"
},
"status": "scheduled",
"skip_next": false,
"paused_at": null,
"updated_at": null,
"performed_by": "api",
"created_at": "2026-01-15T09:30:00.000Z"
}{
"code": "UNAUTHORIZED_ERROR",
"message": "Invalid bearer auth token",
"status": 401
}{
"code": "NOT_FOUND_ERROR",
"message": "Scheduled message not found",
"status": 404
}{
"code": "VALIDATION_ERROR",
"message": "Request validation failed",
"status": 422,
"fields": {
"body.chat_id": {
"message": "chat_id is required"
}
}
}{
"code": "RATE_LIMIT_ERROR",
"message": "You can only make 100 requests per second",
"status": 429
}{
"code": "UNKNOWN_ERROR",
"message": "Internal server error",
"status": 500
}Authorizations
Your Periskope API token, sent as Authorization: Bearer <token>. Generate one from the Periskope dashboard under Settings → API & Webhooks. API access requires an active Pro or Enterprise plan.
Path Parameters
Id of the scheduled message — the scheduled_id returned when it was created
1"00000000-0000-0000-0000-000000000000"
Body
New text content. The stored attachment is kept unless media is also sent.
"Updated reminder: submit your report by EOD"
New attachment. Pass null to remove the current attachment.
Show child attributes
Show child attributes
When to send (the first run for repeating messages), as an ISO 8601 timestamp in the future. Send it in UTC (e.g. 2026-02-01T09:00:00Z); recurrence for repeating messages is computed in UTC.
"2026-02-01T09:00:00Z"
Turn repetition on (requires a repeat_config with repeat_interval, sent now or already stored) or off (clears repeat_config).
true
New repeat configuration. Replaces the stored repeat_config as a whole — fields not included are cleared, not kept — so always send the complete desired config (repeat_interval plus any repeat_value, repeat_days or repeat_ends you want to retain). Pass null together with is_repeat false to stop the series.
Show child attributes
Show child attributes
true pauses the schedule (runs are skipped, the series keeps advancing); false resumes it.
true
true skips the next run once; the series then continues.
false
Response
The updated scheduled message
A scheduled message — content sent to a chat at scheduled_at, once or on a repeating series
Unique id of the scheduled message
"00000000-0000-0000-0000-000000000000"
Id of the organization the scheduled message belongs to
"00000000-0000-0000-0000-000000000000"
Org phone (WhatsApp account) the message is sent from, as country code + number suffixed with @c.us
"911111111111@c.us"
Chat the message is sent to — @c.us for 1-1 chats, @g.us for group chats
"120363000000000000@g.us"
Content sent on every run — same shape as POST /message/send
Show child attributes
Show child attributes
When the next run happens, as an ISO 8601 timestamp. For repeating messages this advances after every run.
"2026-02-01T09:00:00.000Z"
Whether the message repeats or sends once
true
How the message recurs. null for one-time messages.
Show child attributes
Show child attributes
Lifecycle status: 'scheduled' (waiting for the next run), 'paused' (runs are skipped) or 'completed'
scheduled, paused, completed "scheduled"
When true, the next run is skipped once and the series continues
false
When the schedule was paused, as an ISO 8601 timestamp. null while not paused.
When the schedule completed (one-time message sent, or series ended), as an ISO 8601 timestamp. null while pending.
Who created the schedule: a member email, or "api"
"api"
When the schedule was created, as an ISO 8601 timestamp
"2026-01-15T09:30:00.000Z"
Was this page helpful?