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{
"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",
"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>"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}Crear una programación
Crear una nueva sesión programada.
Deprecado. Las programaciones han sido sustituidas por las Automatizaciones: en su lugar, cree una automatización con un trigger schedule:recurring mediante POST /v3/organizations/{org_id}/automations. Para las organizaciones que han migrado a Automatizaciones, este endpoint devuelve 403; las programaciones existentes se pueden seguir consultando, actualizando y eliminando.
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{
"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",
"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>"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"error_code": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}schedule:recurring mediante POST /v3/organizations/{org_id}/automations. A partir del 24 de septiembre de 2026, este endpoint devolverá 403 para las organizaciones migradas a automatizaciones; las organizaciones que sigan en proceso de migración podrán seguir creando programaciones hasta que esta finalice.Permisos
Requiere un usuario de servicio o un token de acceso personal con el permisoManageOrgSchedules a nivel de la organización.
Tipo de programación
El camposchedule_type controla si la programación es recurrente o única:
recurring(predeterminado): requiere el campofrequencycon una expresión cronone_time: requiere el camposcheduled_atcon una fecha y hora en formato ISO 8601 en el futuro
Frecuencia
Para programaciones recurrentes, el campofrequency acepta una expresión cron estándar (por ejemplo, 0 9 * * 1-5 para los días laborables a las 9:00 UTC).
Programado para
Para programaciones únicas, el camposcheduled_at acepta una fecha y hora en formato ISO 8601 con zona horaria (por ejemplo, 2026-03-01T09:00:00Z). La fecha y hora deben estar en el futuro. Después de ejecutarse, la programación se deshabilita automáticamente.
Tipos de agentes
| Agente | Descripción |
|---|---|
devin | Agente Devin estándar (predeterminado) |
data_analyst | Agente analista de datos |
agent se rechazan con un error de validación 422.
Suplantación de usuario
El parámetrocreate_as_user_id permite crear una planificación en nombre de otro usuario. Para ello se requiere:
- El usuario de servicio debe tener el permiso
ImpersonateOrgSessions - El usuario de destino debe ser miembro de la organización
- El usuario de destino debe tener el permiso
UseDevinSessions
Autorizaciones
Credencial de usuario de servicio (prefijo: cog_)
Parámetros de ruta
ID de la organización (prefijo: org-)
"org-abc123def456"
Cuerpo
devin, data_analyst always, failure, never Plataforma de VM para las sesiones generadas por esta programación (p. ej., 'windows'). Si se omite, las sesiones usarán la plataforma predeterminada de la organización en el momento de la activación. El valor debe coincidir con una plataforma configurada para la organización (sin distinguir mayúsculas de minúsculas); los valores desconocidos se rechazan con un 400 que enumera las etiquetas de plataforma disponibles.
recurring, one_time Respuesta
Respuesta satisfactoria
devin, data_analyst always, failure, never Show child attributes
Show child attributes
recurring, one_time 
