Skip to content
Sign up

Schedule Agent Message

post/v1/agents/{agent_id}/schedule

Schedule a message to be sent by the agent at a specified time or on a recurring basis.

Path ParametersExpand Collapse
agent_id: string
Body ParametersExpand Collapse
messages: array of object { content, role, name, 3 more }
content: array of object { text, signature, type } or object { source, type } or string
Accepts one of the following:
UnionMember0 = array of object { text, signature, type } or object { source, type }
Accepts one of the following:
UnionMember0 = object { text, signature, type }
text: string
signature: optional string
type: optional "text"
UnionMember1 = object { source, type }
source: object { data, media_type, detail, type }
data: string
media_type: string
detail: optional string
type: optional "base64"
type: "image"
UnionMember1 = string
role: "user" or "assistant" or "system"
Accepts one of the following:
"user"
"assistant"
"system"
name: optional string
otid: optional string
sender_id: optional string
type: optional "message"
schedule: object { scheduled_at, type } or object { cron_expression, type }
Accepts one of the following:
UnionMember0 = object { scheduled_at, type }
scheduled_at: number
type: optional "one-time"
UnionMember1 = object { cron_expression, type }
cron_expression: string
type: "recurring"
callback_url: optional string
include_return_message_types: optional array of "system_message" or "user_message" or "assistant_message" or 6 more
Accepts one of the following:
"system_message"
"user_message"
"assistant_message"
"reasoning_message"
"hidden_reasoning_message"
"tool_call_message"
"tool_return_message"
"approval_request_message"
"approval_response_message"
max_steps: optional number
ReturnsExpand Collapse
id: string
next_scheduled_at: optional string
Schedule Agent Message
curl https://api.letta.com/v1/agents/$AGENT_ID/schedule \
    -H 'Content-Type: application/json' \
    -H "Authorization: Bearer $LETTA_API_KEY" \
    -d '{
          "messages": [
            {
              "content": [
                {
                  "text": "text"
                }
              ],
              "role": "user"
            }
          ],
          "schedule": {
            "scheduled_at": 0
          }
        }'
{
  "id": "id",
  "next_scheduled_at": "next_scheduled_at"
}
Returns Examples
{
  "id": "id",
  "next_scheduled_at": "next_scheduled_at"
}