Skip to main content
POST
/
v3
/
organizations
/
{org_id}
/
schedules
Create schedule
curl --request POST \
  --url https://api.devin.ai/v3/organizations/{org_id}/schedules \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "name": "<string>",
  "prompt": "<string>",
  "agent": "devin",
  "bypass_approval": false,
  "create_as_user_id": "<string>",
  "frequency": "<string>",
  "interval_count": 1,
  "notify_on": "failure",
  "platform": "<string>",
  "playbook_id": "<string>",
  "schedule_type": "recurring",
  "scheduled_at": "2023-11-07T05:31:56Z",
  "slack_channel_id": "<string>",
  "slack_team_id": "<string>",
  "tags": [
    "<string>"
  ],
  "target_devin_id": "<string>"
}
'
import requests

url = "https://api.devin.ai/v3/organizations/{org_id}/schedules"

payload = {
"name": "<string>",
"prompt": "<string>",
"agent": "devin",
"bypass_approval": False,
"create_as_user_id": "<string>",
"frequency": "<string>",
"interval_count": 1,
"notify_on": "failure",
"platform": "<string>",
"playbook_id": "<string>",
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": ["<string>"],
"target_devin_id": "<string>"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
prompt: '<string>',
agent: 'devin',
bypass_approval: false,
create_as_user_id: '<string>',
frequency: '<string>',
interval_count: 1,
notify_on: 'failure',
platform: '<string>',
playbook_id: '<string>',
schedule_type: 'recurring',
scheduled_at: '2023-11-07T05:31:56Z',
slack_channel_id: '<string>',
slack_team_id: '<string>',
tags: ['<string>'],
target_devin_id: '<string>'
})
};

fetch('https://api.devin.ai/v3/organizations/{org_id}/schedules', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://api.devin.ai/v3/organizations/{org_id}/schedules",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'prompt' => '<string>',
'agent' => 'devin',
'bypass_approval' => false,
'create_as_user_id' => '<string>',
'frequency' => '<string>',
'interval_count' => 1,
'notify_on' => 'failure',
'platform' => '<string>',
'playbook_id' => '<string>',
'schedule_type' => 'recurring',
'scheduled_at' => '2023-11-07T05:31:56Z',
'slack_channel_id' => '<string>',
'slack_team_id' => '<string>',
'tags' => [
'<string>'
],
'target_devin_id' => '<string>'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"strings"
"net/http"
"io"
)

func main() {

url := "https://api.devin.ai/v3/organizations/{org_id}/schedules"

payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"agent\": \"devin\",\n \"bypass_approval\": false,\n \"create_as_user_id\": \"<string>\",\n \"frequency\": \"<string>\",\n \"interval_count\": 1,\n \"notify_on\": \"failure\",\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"schedule_type\": \"recurring\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\"\n}")

req, _ := http.NewRequest("POST", url, payload)

req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://api.devin.ai/v3/organizations/{org_id}/schedules")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"agent\": \"devin\",\n \"bypass_approval\": false,\n \"create_as_user_id\": \"<string>\",\n \"frequency\": \"<string>\",\n \"interval_count\": 1,\n \"notify_on\": \"failure\",\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"schedule_type\": \"recurring\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\"\n}")
.asString();
require 'uri'
require 'net/http'

url = URI("https://api.devin.ai/v3/organizations/{org_id}/schedules")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"prompt\": \"<string>\",\n \"agent\": \"devin\",\n \"bypass_approval\": false,\n \"create_as_user_id\": \"<string>\",\n \"frequency\": \"<string>\",\n \"interval_count\": 1,\n \"notify_on\": \"failure\",\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"schedule_type\": \"recurring\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\"\n}"

response = http.request(request)
puts response.read_body
{
  "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>",
  "org_id": "<string>",
  "playbook": {
    "playbook_id": "<string>",
    "title": "<string>"
  },
  "prompt": "<string>",
  "scheduled_session_id": "<string>",
  "updated_at": "2023-11-07T05:31:56Z",
  "bypass_approval": false,
  "interval_count": 1,
  "last_edited_by": "<string>",
  "platform": "<string>",
  "schedule_type": "recurring",
  "scheduled_at": "2023-11-07T05:31:56Z",
  "slack_channel_id": "<string>",
  "slack_team_id": "<string>",
  "tags": [
    "<string>"
  ],
  "target_devin_id": "<string>"
}
{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>"
}
]
}

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_)

Path Parameters

org_id
string
required

Organization ID (prefix: org-)

Example:

"org-abc123def456"

Body

application/json
name
string
required
prompt
string
required
agent
enum<string>
default:devin
Available options:
devin,
data_analyst
bypass_approval
boolean
default:false
create_as_user_id
string | null
frequency
string | null
interval_count
integer
default:1
notify_on
enum<string>
default:failure
Available options:
always,
failure,
never
platform
string | null

VM platform for sessions spawned by this schedule (e.g. 'windows'). When omitted, sessions fall back to the org's default platform at trigger time. Value must match a platform configured for the organization (case-insensitive); unknown values are rejected with a 400 that lists the available platform labels.

playbook_id
string | null
schedule_type
enum<string>
default:recurring
Available options:
recurring,
one_time
scheduled_at
string<date-time> | null
slack_channel_id
string | null
slack_team_id
string | null
tags
string[] | null
target_devin_id
string | null

Response

Successful Response

agent
enum<string>
required
Available options:
devin,
data_analyst
consecutive_failures
integer
required
created_at
string<date-time>
required
created_by
string | null
required
enabled
boolean
required
frequency
string | null
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 | null
required
prompt
string
required
scheduled_session_id
string
required
updated_at
string<date-time>
required
bypass_approval
boolean
default:false
interval_count
integer
default:1
last_edited_by
string | null
platform
string | null
schedule_type
enum<string>
default:recurring
Available options:
recurring,
one_time
scheduled_at
string<date-time> | null
slack_channel_id
string | null
slack_team_id
string | null
tags
string[] | null
target_devin_id
string | null