curl -X PATCH "https://api.magpipe.ai/functions/v1/scheduled-actions/123e4567-e89b-12d3-a456-426614174000" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "cancelled"}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"action_type": "send_sms",
"scheduled_at": "2026-01-15T18:00:00.000Z",
"status": "cancelled",
"parameters": {
"recipient_phone": "+14155551234",
"recipient_name": "John Smith",
"message": "Your appointment is in 1 hour!"
},
"created_at": "2026-01-14T12:00:00.000Z"
}
{
"error": "Cannot cancel action with status: processing"
}
{
"error": "Scheduled action not found"
}
Scheduled Actions
Cancel Scheduled Action
Cancel a pending scheduled action
PATCH
/
scheduled-actions
/
{id}
curl -X PATCH "https://api.magpipe.ai/functions/v1/scheduled-actions/123e4567-e89b-12d3-a456-426614174000" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "cancelled"}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"action_type": "send_sms",
"scheduled_at": "2026-01-15T18:00:00.000Z",
"status": "cancelled",
"parameters": {
"recipient_phone": "+14155551234",
"recipient_name": "John Smith",
"message": "Your appointment is in 1 hour!"
},
"created_at": "2026-01-14T12:00:00.000Z"
}
{
"error": "Cannot cancel action with status: processing"
}
{
"error": "Scheduled action not found"
}
Cancel a scheduled action before it executes. Only actions with
pending status can be cancelled.
Path Parameters
string
required
UUID of the scheduled action to cancel
Request Body
string
required
Must be
cancelledResponse
Returns the updated scheduled action object.curl -X PATCH "https://api.magpipe.ai/functions/v1/scheduled-actions/123e4567-e89b-12d3-a456-426614174000" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status": "cancelled"}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"action_type": "send_sms",
"scheduled_at": "2026-01-15T18:00:00.000Z",
"status": "cancelled",
"parameters": {
"recipient_phone": "+14155551234",
"recipient_name": "John Smith",
"message": "Your appointment is in 1 hour!"
},
"created_at": "2026-01-14T12:00:00.000Z"
}
{
"error": "Cannot cancel action with status: processing"
}
{
"error": "Scheduled action not found"
}
Once an action starts processing, it cannot be cancelled. Check the action status before attempting to cancel.
⌘I