Skip to main content
POST
/
threads
/
{thread_id}
/
runs
/
crons
Create Cron For Thread
curl --request POST \
  --url https://api.example.com/threads/{thread_id}/runs/crons \
  --header 'Content-Type: application/json' \
  --data '
{
  "assistant_id": "<string>",
  "schedule": "<string>",
  "input": {},
  "metadata": {},
  "config": {},
  "context": {},
  "interrupt_before": "<string>",
  "interrupt_after": "<string>",
  "webhook": "<string>",
  "multitask_strategy": "<string>",
  "end_time": "2023-11-07T05:31:56Z",
  "enabled": true,
  "stream_mode": "<string>",
  "stream_subgraphs": true,
  "timezone": "<string>"
}
'
{
  "run_id": "<string>",
  "thread_id": "<string>",
  "assistant_id": "<string>",
  "user_id": "<string>",
  "created_at": "2023-11-07T05:31:56Z",
  "updated_at": "2023-11-07T05:31:56Z",
  "status": "pending",
  "input": {},
  "output": {},
  "error_message": "<string>",
  "config": {},
  "context": {}
}

Documentation Index

Fetch the complete documentation index at: https://docs.aegra.dev/llms.txt

Use this file to discover all available pages before exploring further.

Path Parameters

thread_id
string
required

Body

application/json

Request body for creating a cron job (stateless or thread-bound).

assistant_id
string
required
Maximum string length: 256
schedule
string
required
Maximum string length: 256
input
Input · object
metadata
Metadata · object
config
Config · object
context
Context · object
interrupt_before
Allowed value: "*"
interrupt_after
Allowed value: "*"
webhook
string | null
Maximum string length: 2048
on_run_completed
enum<string> | null
Available options:
delete,
keep
multitask_strategy
string | null
Maximum string length: 256
end_time
string<date-time> | null
enabled
boolean | null
stream_mode
stream_subgraphs
boolean | null
timezone
string | null
Maximum string length: 64

Response

Successful Response

Run entity model

Status values: pending, running, error, success, timeout, interrupted

run_id
string
required

Unique identifier for the run.

thread_id
string
required

Thread this run belongs to.

assistant_id
string
required

Assistant that is executing this run.

user_id
string
required

Identifier of the user who owns this run.

created_at
string<date-time>
required

Timestamp when the run was created.

updated_at
string<date-time>
required

Timestamp when the run was last updated.

status
string
default:pending

Current run status: pending, running, error, success, timeout, or interrupted.

input
Input · object

Input data provided to the run. None for checkpoint-only resume.

output
Output · object

Final output produced by the run, or null if not yet complete.

error_message
string | null

Error message if the run failed.

config
Config · object

Configuration passed to the graph at runtime.

context
Context · object

Context variables available during execution.