Skip to main content
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
}
Create a new scheduled action to be executed at a specific time.

Request Body

action_type
string
required
Type of action to schedule. Currently supported: send_sms
scheduled_at
string
required
When to execute the action. Must be ISO 8601 format with timezone (e.g., 2026-01-15T10:00:00-08:00)
parameters
object
required
Action-specific parameters (see below)

SMS Parameters

parameters.recipient_phone
string
required
Recipient phone number in E.164 format
parameters.recipient_name
string
Recipient name for reference
parameters.message
string
required
Message content to send
parameters.sender_number
string
Your Magpipe number to send from. Defaults to your primary number.

Response

id
string
UUID of the scheduled action
action_type
string
Type of action
scheduled_at
string
Scheduled execution time
status
string
Current status: pending
parameters
object
Action parameters
created_at
string
When the action was created
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
}