TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.scheduledMessages.deleteScheduledMessage({
scheduled_id: '00000000-0000-0000-0000-000000000000',
});
console.log(response);
}
main();curl -X DELETE 'https://api.periskope.app/v1/message/scheduled/00000000-0000-0000-0000-000000000000' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"success": true,
"message": "Scheduled message deleted",
"scheduled_id": "00000000-0000-0000-0000-000000000000"
}{
"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
}Scheduled Message APIs
Delete Scheduled Message
Permanently deletes a scheduled message — no further runs happen. Its run history stays available via the occurrences endpoint.
TypeScript
import { PeriskopeApi } from '@periskope/periskope-client';
const client = new PeriskopeApi({
authToken: 'YOUR_API_KEY',
});
async function main() {
const response = await client.scheduledMessages.deleteScheduledMessage({
scheduled_id: '00000000-0000-0000-0000-000000000000',
});
console.log(response);
}
main();curl -X DELETE 'https://api.periskope.app/v1/message/scheduled/00000000-0000-0000-0000-000000000000' \
-H 'Authorization: Bearer YOUR_API_KEY'{
"success": true,
"message": "Scheduled message deleted",
"scheduled_id": "00000000-0000-0000-0000-000000000000"
}{
"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
Minimum string length:
1Example:
"00000000-0000-0000-0000-000000000000"
Was this page helpful?