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>",
"playbook_id": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"frequency": "<string>",
"interval_count": 1,
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"notify_on": "failure",
"agent": "devin",
"bypass_approval": false,
"create_as_user_id": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>",
"platform": "<string>"
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/schedules"
payload = {
"name": "<string>",
"prompt": "<string>",
"playbook_id": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"frequency": "<string>",
"interval_count": 1,
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"notify_on": "failure",
"agent": "devin",
"bypass_approval": False,
"create_as_user_id": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": ["<string>"],
"target_devin_id": "<string>",
"platform": "<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>',
playbook_id: '<string>',
skill_ref: {plugin_identity: '<string>', skill_name: '<string>'},
frequency: '<string>',
interval_count: 1,
schedule_type: 'recurring',
scheduled_at: '2023-11-07T05:31:56Z',
notify_on: 'failure',
agent: 'devin',
bypass_approval: false,
create_as_user_id: '<string>',
slack_channel_id: '<string>',
slack_team_id: '<string>',
tags: ['<string>'],
target_devin_id: '<string>',
platform: '<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>',
'playbook_id' => '<string>',
'skill_ref' => [
'plugin_identity' => '<string>',
'skill_name' => '<string>'
],
'frequency' => '<string>',
'interval_count' => 1,
'schedule_type' => 'recurring',
'scheduled_at' => '2023-11-07T05:31:56Z',
'notify_on' => 'failure',
'agent' => 'devin',
'bypass_approval' => false,
'create_as_user_id' => '<string>',
'slack_channel_id' => '<string>',
'slack_team_id' => '<string>',
'tags' => [
'<string>'
],
'target_devin_id' => '<string>',
'platform' => '<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 \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 1,\n \"schedule_type\": \"recurring\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"notify_on\": \"failure\",\n \"agent\": \"devin\",\n \"bypass_approval\": false,\n \"create_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<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 \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 1,\n \"schedule_type\": \"recurring\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"notify_on\": \"failure\",\n \"agent\": \"devin\",\n \"bypass_approval\": false,\n \"create_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<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 \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 1,\n \"schedule_type\": \"recurring\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"notify_on\": \"failure\",\n \"agent\": \"devin\",\n \"bypass_approval\": false,\n \"create_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"scheduled_session_id": "<string>",
"org_id": "<string>",
"created_by": "<string>",
"name": "<string>",
"prompt": "<string>",
"playbook": {
"playbook_id": "<string>",
"title": "<string>"
},
"frequency": "<string>",
"enabled": true,
"last_executed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_error_at": "2023-11-07T05:31:56Z",
"last_error_message": "<string>",
"consecutive_failures": 123,
"notify_on": "always",
"agent": "devin",
"last_edited_by": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"interval_count": 1,
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"bypass_approval": false,
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>",
"platform": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}Zeitplan erstellen
Eine neue geplante Sitzung erstellen.
Veraltet. Zeitpläne wurden durch Automatisierung ersetzt: Erstellen Sie stattdessen über POST /v3/organizations/{org_id}/automations eine Automatisierung mit einem schedule:recurring-Auslöser. Für Organisationen, die auf Automatisierung umgestellt wurden, gibt dieser Endpunkt 403 zurück; bestehende Zeitpläne können weiterhin gelesen, aktualisiert und gelöscht werden.
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>",
"playbook_id": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"frequency": "<string>",
"interval_count": 1,
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"notify_on": "failure",
"agent": "devin",
"bypass_approval": false,
"create_as_user_id": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>",
"platform": "<string>"
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/schedules"
payload = {
"name": "<string>",
"prompt": "<string>",
"playbook_id": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"frequency": "<string>",
"interval_count": 1,
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"notify_on": "failure",
"agent": "devin",
"bypass_approval": False,
"create_as_user_id": "<string>",
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": ["<string>"],
"target_devin_id": "<string>",
"platform": "<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>',
playbook_id: '<string>',
skill_ref: {plugin_identity: '<string>', skill_name: '<string>'},
frequency: '<string>',
interval_count: 1,
schedule_type: 'recurring',
scheduled_at: '2023-11-07T05:31:56Z',
notify_on: 'failure',
agent: 'devin',
bypass_approval: false,
create_as_user_id: '<string>',
slack_channel_id: '<string>',
slack_team_id: '<string>',
tags: ['<string>'],
target_devin_id: '<string>',
platform: '<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>',
'playbook_id' => '<string>',
'skill_ref' => [
'plugin_identity' => '<string>',
'skill_name' => '<string>'
],
'frequency' => '<string>',
'interval_count' => 1,
'schedule_type' => 'recurring',
'scheduled_at' => '2023-11-07T05:31:56Z',
'notify_on' => 'failure',
'agent' => 'devin',
'bypass_approval' => false,
'create_as_user_id' => '<string>',
'slack_channel_id' => '<string>',
'slack_team_id' => '<string>',
'tags' => [
'<string>'
],
'target_devin_id' => '<string>',
'platform' => '<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 \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 1,\n \"schedule_type\": \"recurring\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"notify_on\": \"failure\",\n \"agent\": \"devin\",\n \"bypass_approval\": false,\n \"create_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<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 \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 1,\n \"schedule_type\": \"recurring\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"notify_on\": \"failure\",\n \"agent\": \"devin\",\n \"bypass_approval\": false,\n \"create_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<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 \"playbook_id\": \"<string>\",\n \"skill_ref\": {\n \"plugin_identity\": \"<string>\",\n \"skill_name\": \"<string>\"\n },\n \"frequency\": \"<string>\",\n \"interval_count\": 1,\n \"schedule_type\": \"recurring\",\n \"scheduled_at\": \"2023-11-07T05:31:56Z\",\n \"notify_on\": \"failure\",\n \"agent\": \"devin\",\n \"bypass_approval\": false,\n \"create_as_user_id\": \"<string>\",\n \"slack_channel_id\": \"<string>\",\n \"slack_team_id\": \"<string>\",\n \"tags\": [\n \"<string>\"\n ],\n \"target_devin_id\": \"<string>\",\n \"platform\": \"<string>\"\n}"
response = http.request(request)
puts response.read_body{
"scheduled_session_id": "<string>",
"org_id": "<string>",
"created_by": "<string>",
"name": "<string>",
"prompt": "<string>",
"playbook": {
"playbook_id": "<string>",
"title": "<string>"
},
"frequency": "<string>",
"enabled": true,
"last_executed_at": "2023-11-07T05:31:56Z",
"created_at": "2023-11-07T05:31:56Z",
"updated_at": "2023-11-07T05:31:56Z",
"last_error_at": "2023-11-07T05:31:56Z",
"last_error_message": "<string>",
"consecutive_failures": 123,
"notify_on": "always",
"agent": "devin",
"last_edited_by": "<string>",
"skill_ref": {
"plugin_identity": "<string>",
"skill_name": "<string>"
},
"interval_count": 1,
"schedule_type": "recurring",
"scheduled_at": "2023-11-07T05:31:56Z",
"bypass_approval": false,
"slack_channel_id": "<string>",
"slack_team_id": "<string>",
"tags": [
"<string>"
],
"target_devin_id": "<string>",
"platform": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}{
"title": "<string>",
"status": 123,
"type": "about:blank",
"detail": "<string>",
"instance": "<string>",
"errors": [
{}
],
"error_code": "<string>"
}POST /v3/organizations/{org_id}/automations als Automatisierung mit einem schedule:recurring-Trigger an. Ab dem 24. September 2026 gibt dieser Endpunkt für Organisationen, die zu Automatisierungen migriert wurden, 403 zurück; Organisationen, deren Migration noch läuft, können bis zum Abschluss der Migration weiterhin Zeitpläne erstellen.Berechtigungen
Erfordert einen Servicebenutzer oder ein persönliches Zugriffstoken mit der BerechtigungManageOrgSchedules auf Organisationsebene.
Zeitplantyp
Das Feldschedule_type gibt an, ob der Zeitplan wiederkehrend oder einmalig ist:
recurring(Standard) — Erfordert das Feldfrequencymit einem Cron-Ausdruckone_time— Erfordert das Feldscheduled_atmit einem zukünftigen Datum/Uhrzeitwert im ISO-8601-Format
Frequency
Für wiederkehrende Zeitpläne akzeptiert das Feldfrequency einen Standard-Cron-Ausdruck (z. B. 0 9 * * 1-5 für Werktage um 9:00 Uhr UTC).
Ausführungszeitpunkt
Für einmalige Zeitpläne akzeptiert das Feldscheduled_at einen ISO-8601-Datum-Uhrzeit-Wert mit Zeitzone (z. B. 2026-03-01T09:00:00Z). Dieser Zeitpunkt muss in der Zukunft liegen. Nach der Ausführung wird der Zeitplan automatisch deaktiviert.
Agententypen
| Agent | Beschreibung |
|---|---|
devin | Standard-Devin-Agent (Standardagent) |
data_analyst | Datenanalyse-Agent |
agent-Werte werden mit einem 422-Validierungsfehler abgelehnt.
Benutzer-Impersonation
Der Parametercreate_as_user_id ermöglicht es, einen Zeitplan im Namen eines anderen Benutzers zu erstellen. Dafür müssen folgende Voraussetzungen erfüllt sein:
- Der Servicebenutzer muss die Berechtigung
ImpersonateOrgSessionshaben - Der Zielbenutzer muss Mitglied der Organisation sein
- Der Zielbenutzer muss die Berechtigung
UseDevinSessionshaben
Autorisierungen
Body
VM-Plattform für Sitzungen, die durch diesen Zeitplan gestartet werden (z. B. „windows“). Wenn sie weggelassen wird, verwenden Sitzungen beim Auslösen die Standardplattform der Org. Der Wert muss mit einer für die Organisation konfigurierten Plattform übereinstimmen (Groß-/Kleinschreibung wird nicht beachtet); unbekannte Werte werden mit einem 400-Fehler abgelehnt, der die verfügbaren Plattformbezeichnungen auflistet.
Antwort
Erfolgreiche Antwort

