Skip to navigation

Create schedule

Create a new scheduled session.

Authentication

AuthorizationBearer

Personal API Key (apk_user_) or Service API Key (apk_)

Path parameters

org_idstringRequired

Request

This endpoint expects an object.
namestringRequired
Display name for the schedule.
promptstringRequired

The prompt / instructions to send when the schedule triggers.

agentenumOptionalDefaults to devin
Agent configuration for the scheduled session.
Allowed values:
bypass_approvalbooleanOptionalDefaults to false

When true, skip safe-mode approval prompts for scheduled sessions.

create_as_user_idstring or nullOptional

Create sessions on behalf of another user (requires admin).

frequencystring or nullOptional

How often the schedule repeats: once, hourly, daily, weekly, monthly, or cron.

interval_countintegerOptionalDefaults to 1

Repeat every N intervals (e.g. every 2 weeks).

notify_onenumOptionalDefaults to failure

Notification triggers: all, failure, or none.

Allowed values:
playbook_idstring or nullOptional
Playbook to run in the scheduled session.
schedule_typeenumOptionalDefaults to recurring

Schedule type: scheduled or event_driven.

Allowed values:
scheduled_atdatetime or nullOptional

ISO 8601 datetime for the first (or one-time) trigger.

slack_channel_idstring or nullOptional
Slack channel to post session results to.
slack_team_idstring or nullOptional
Slack workspace ID for notifications.
tagslist of strings or nullOptional
Tags to apply to sessions created by this schedule.
target_devin_idstring or nullOptional

Devin ID to target (for event-driven schedules).

Response

Successful Response
agentenum
Allowed values:
consecutive_failuresinteger
Number of consecutive failed executions.
created_atdatetime
ISO 8601 timestamp when the schedule was created.
created_bystring or null
User ID of the schedule creator.
enabledboolean
Whether the schedule is currently active.
frequencystring or null
How often the schedule repeats.
last_error_atdatetime or null
ISO 8601 timestamp of the most recent error.
last_error_messagestring or null
Error message from the most recent failed execution.
last_executed_atdatetime or null
ISO 8601 timestamp of the last execution.
namestring
Display name of the schedule.
notify_onenum
Allowed values:
org_idstring

Organization that owns this schedule (prefix org-).

playbookobject or null
promptstring
scheduled_session_idstring
updated_atdatetime
bypass_approvalbooleanOptionalDefaults to false
interval_countintegerOptionalDefaults to 1
last_edited_bystring or nullOptional
User ID of the last person to edit the schedule.
schedule_typeenumOptionalDefaults to recurring
Allowed values:
scheduled_atdatetime or nullOptional
slack_channel_idstring or nullOptional
slack_team_idstring or nullOptional
tagslist of strings or nullOptional
target_devin_idstring or nullOptional

Errors

422
Unprocessable Entity Error