Skip to main content
POST
/
v3beta1
/
organizations
/
{org_id}
/
schedules
Create schedule
curl --request POST \
  --url https://api.devin.ai/v3beta1/organizations/{org_id}/schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "frequency": "<string>",
  "name": "<string>",
  "prompt": "<string>",
  "agent": "devin",
  "create_as_user_id": "<string>",
  "notify_on": "failure",
  "playbook_id": "<string>"
}
'
{
  "agent": "devin",
  "consecutive_failures": 123,
  "created_at": "2023-11-07T05:31:56Z",
  "created_by": "<string>",
  "enabled": true,
  "frequency": "<string>",
  "last_error_at": "2023-11-07T05:31:56Z",
  "last_error_message": "<string>",
  "last_executed_at": "2023-11-07T05:31:56Z",
  "name": "<string>",
  "notify_on": "always",
  "org_id": "<string>",
  "playbook": {
    "playbook_id": "<string>",
    "title": "<string>"
  },
  "prompt": "<string>",
  "scheduled_session_id": "<string>",
  "updated_at": "2023-11-07T05:31:56Z"
}

Permissions

Requires a service user with the ManageOrgSchedules permission at the organization level.

Schedule type

The schedule_type field controls whether the schedule is recurring or one-time:
  • recurring (default) — Requires the frequency field with a cron expression
  • one_time — Requires the scheduled_at field with an ISO 8601 datetime in the future

Frequency

For recurring schedules, the frequency field accepts a standard cron expression (e.g., 0 9 * * 1-5 for weekdays at 9 AM UTC).

Scheduled at

For one-time schedules, the scheduled_at field accepts an ISO 8601 datetime with timezone (e.g., 2026-03-01T09:00:00Z). The datetime must be in the future. After execution, the schedule is automatically disabled.

Agent types

AgentDescription
devinStandard Devin agent (default)
data_analystData analyst agent
advancedAdvanced agent

User impersonation

The create_as_user_id parameter allows creating a schedule on behalf of another user. This requires:
  1. The service user must have ImpersonateOrgSessions permission
  2. The target user must be a member of the organization
  3. The target user must have UseDevinSessions permission

Authorizations

Authorization
string
header
required

Service User credential (prefix: cog_)

Body

application/json
frequency
string
required
name
string
required
prompt
string
required
agent
enum<string>
default:devin
Available options:
devin,
data_analyst,
advanced
create_as_user_id
string | null
notify_on
enum<string>
default:failure
Available options:
always,
failure,
never
playbook_id
string | null

Response

Successful Response

agent
enum<string>
required
Available options:
devin,
data_analyst,
advanced
consecutive_failures
integer
required
created_at
string<date-time>
required
created_by
string | null
required
enabled
boolean
required
frequency
string
required
last_error_at
string<date-time> | null
required
last_error_message
string | null
required
last_executed_at
string<date-time> | null
required
name
string
required
notify_on
enum<string>
required
Available options:
always,
failure,
never
org_id
string
required
playbook
PlaybookInfo · object
required
prompt
string
required
scheduled_session_id
string
required
updated_at
string<date-time>
required