curl -X POST "https://api.magpipe.ai/functions/v1/scheduled-actions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action_type": "send_sms",
"scheduled_at": "2026-01-15T10:00:00-08:00",
"parameters": {
"recipient_phone": "+14155551234",
"recipient_name": "John Smith",
"message": "Your appointment is in 1 hour!"
}
}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"action_type": "send_sms",
"scheduled_at": "2026-01-15T18:00:00.000Z",
"status": "pending",
"parameters": {
"recipient_phone": "+14155551234",
"recipient_name": "John Smith",
"message": "Your appointment is in 1 hour!",
"sender_number": "+16045559876"
},
"created_at": "2026-01-14T12:00:00.000Z",
"retry_count": 0
}
{
"error": "scheduled_at must be in the future"
}
Scheduled Actions
Create Scheduled Action
Schedule an SMS or call for future delivery
POST
/
scheduled-actions
curl -X POST "https://api.magpipe.ai/functions/v1/scheduled-actions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action_type": "send_sms",
"scheduled_at": "2026-01-15T10:00:00-08:00",
"parameters": {
"recipient_phone": "+14155551234",
"recipient_name": "John Smith",
"message": "Your appointment is in 1 hour!"
}
}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"action_type": "send_sms",
"scheduled_at": "2026-01-15T18:00:00.000Z",
"status": "pending",
"parameters": {
"recipient_phone": "+14155551234",
"recipient_name": "John Smith",
"message": "Your appointment is in 1 hour!",
"sender_number": "+16045559876"
},
"created_at": "2026-01-14T12:00:00.000Z",
"retry_count": 0
}
{
"error": "scheduled_at must be in the future"
}
Create a new scheduled action to be executed at a specific time.
Request Body
When to execute the action. Must be ISO 8601 format with timezone (e.g.,
2026-01-15T10:00:00-08:00)SMS Parameters
Response
curl -X POST "https://api.magpipe.ai/functions/v1/scheduled-actions" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"action_type": "send_sms",
"scheduled_at": "2026-01-15T10:00:00-08:00",
"parameters": {
"recipient_phone": "+14155551234",
"recipient_name": "John Smith",
"message": "Your appointment is in 1 hour!"
}
}'
{
"id": "123e4567-e89b-12d3-a456-426614174000",
"action_type": "send_sms",
"scheduled_at": "2026-01-15T18:00:00.000Z",
"status": "pending",
"parameters": {
"recipient_phone": "+14155551234",
"recipient_name": "John Smith",
"message": "Your appointment is in 1 hour!",
"sender_number": "+16045559876"
},
"created_at": "2026-01-14T12:00:00.000Z",
"retry_count": 0
}
{
"error": "scheduled_at must be in the future"
}