Skip to content

Schedules

GET /api/orgs/{org_id}/agents/{agent_id}/schedules

Section titled “GET /api/orgs/{org_id}/agents/{agent_id}/schedules”

List Agent Schedules

List all schedules for one agent, oldest first.

Parameters

NameInTypeRequiredDescription
agent_idpathstring (uuid)yes
org_idpathstring (uuid)yes

Responses

StatusDescriptionBody
200Successful ResponseScheduleResponse[]
422Validation ErrorHTTPValidationError

POST /api/orgs/{org_id}/agents/{agent_id}/schedules

Section titled “POST /api/orgs/{org_id}/agents/{agent_id}/schedules”

Create Schedule

Create a recurring cron schedule that fires this agent.

Requires ADMIN or OWNER role. cron_expr (standard 5-field) and timezone (IANA) are validated together; an invalid combination returns 422.

Parameters

NameInTypeRequiredDescription
agent_idpathstring (uuid)yes
org_idpathstring (uuid)yes

Request body (required)

FieldTypeRequiredDescription
cron_exprstringyes
enabledbooleanno
overlap_policyScheduleOverlapPolicyno
promptstringyes
timezonestringno

Responses

StatusDescriptionBody
201Successful ResponseScheduleResponse
422Validation ErrorHTTPValidationError

List Org Schedules

List schedules in the org, each annotated with its agent’s name/slug.

Omit limit to get every schedule; total is the full count either way.

Parameters

NameInTypeRequiredDescription
limitqueryintegernoMax rows to return (1-100). Omit to return every row.
offsetqueryintegernoRows to skip — pass the previous response’s next_offset.
org_idpathstring (uuid)yes

Responses

StatusDescriptionBody
200Successful ResponsePage_ScheduleWithAgentResponse_
422Validation ErrorHTTPValidationError

GET /api/orgs/{org_id}/schedules/{schedule_id}

Section titled “GET /api/orgs/{org_id}/schedules/{schedule_id}”

Get Schedule

Get a single schedule’s detail.

Parameters

NameInTypeRequiredDescription
org_idpathstring (uuid)yes
schedule_idpathstring (uuid)yes

Responses

StatusDescriptionBody
200Successful ResponseScheduleResponse
422Validation ErrorHTTPValidationError

PATCH /api/orgs/{org_id}/schedules/{schedule_id}

Section titled “PATCH /api/orgs/{org_id}/schedules/{schedule_id}”

Update Schedule

Update any of prompt/cron_expr/timezone/enabled/overlap_policy.

Requires ADMIN or OWNER role. Recomputes next_run_at when cron_expr/timezone/enabled change; an invalid cron/timezone combination returns 422.

Parameters

NameInTypeRequiredDescription
org_idpathstring (uuid)yes
schedule_idpathstring (uuid)yes

Request body (required)

FieldTypeRequiredDescription
cron_exprstringno
enabledbooleanno
overlap_policyScheduleOverlapPolicyno
promptstringno
timezonestringno

Responses

StatusDescriptionBody
200Successful ResponseScheduleResponse
422Validation ErrorHTTPValidationError

DELETE /api/orgs/{org_id}/schedules/{schedule_id}

Section titled “DELETE /api/orgs/{org_id}/schedules/{schedule_id}”

Delete Schedule

Soft-delete a schedule. Requires ADMIN or OWNER role.

Parameters

NameInTypeRequiredDescription
org_idpathstring (uuid)yes
schedule_idpathstring (uuid)yes

Responses

StatusDescriptionBody
204Successful Response
422Validation ErrorHTTPValidationError

GET /api/orgs/{org_id}/schedules/{schedule_id}/runs

Section titled “GET /api/orgs/{org_id}/schedules/{schedule_id}/runs”

List Schedule Runs

List the chats this schedule has fired (the correlation query), newest first.

Parameters

NameInTypeRequiredDescription
org_idpathstring (uuid)yes
schedule_idpathstring (uuid)yes

Responses

StatusDescriptionBody
200Successful ResponseScheduleRunResponse[]
422Validation ErrorHTTPValidationError