curl --request PATCH \
--url https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
},
"teams": {
"channel_id": "<string>",
"team_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"enabled": true,
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"name": "<string>",
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"profile_id": "<string>"
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"tools": {
"jira_projects": [
"<string>"
],
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": [],
"teams_channels": []
},
"triggers": [
{
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"replies": []
}
]
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}"
payload = {
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": False,
"notifications": {
"slack": { "channel_id": "<string>" },
"teams": {
"channel_id": "<string>",
"team_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"enabled": True,
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"name": "<string>",
"notifications": {
"email": { "recipients": ["<string>"] },
"slack": { "channel_id": "<string>" }
},
"run_as": { "type": "organization" },
"security_profile": { "profile_id": "<string>" },
"session_settings": { "net_policy": { "allow": [{ "hostname": "<string>" }] } },
"tools": {
"jira_projects": ["<string>"],
"linear_enabled": True,
"mcp_servers": [],
"slack_channels": [],
"teams_channels": []
},
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"replies": []
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actions: [
{
prompt: '<string>',
session: {
bypass_approval: false,
notifications: {
slack: {channel_id: '<string>'},
teams: {channel_id: '<string>', team_id: '<string>'}
},
platform: '<string>',
playbook_id: '<string>',
repos: [],
tags: []
},
type: 'start_session'
}
],
concurrency: {max_concurrent_runs: 2, max_queue_depth: 1},
enabled: true,
limits: {invocations: {max_per_window: 2, window_seconds: 61}, max_acu_limit: 500},
metadata: {},
name: '<string>',
notifications: {email: {recipients: ['<string>']}, slack: {channel_id: '<string>'}},
run_as: {type: 'organization'},
security_profile: {profile_id: '<string>'},
session_settings: {net_policy: {allow: [{hostname: '<string>'}]}},
tools: {
jira_projects: ['<string>'],
linear_enabled: true,
mcp_servers: [],
slack_channels: [],
teams_channels: []
},
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
replies: []
}
]
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}', 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}/automations/{automation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'actions' => [
[
'prompt' => '<string>',
'session' => [
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
],
'teams' => [
'channel_id' => '<string>',
'team_id' => '<string>'
]
],
'platform' => '<string>',
'playbook_id' => '<string>',
'repos' => [
],
'tags' => [
]
],
'type' => 'start_session'
]
],
'concurrency' => [
'max_concurrent_runs' => 2,
'max_queue_depth' => 1
],
'enabled' => true,
'limits' => [
'invocations' => [
'max_per_window' => 2,
'window_seconds' => 61
],
'max_acu_limit' => 500
],
'metadata' => [
],
'name' => '<string>',
'notifications' => [
'email' => [
'recipients' => [
'<string>'
]
],
'slack' => [
'channel_id' => '<string>'
]
],
'run_as' => [
'type' => 'organization'
],
'security_profile' => [
'profile_id' => '<string>'
],
'session_settings' => [
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
]
],
'tools' => [
'jira_projects' => [
'<string>'
],
'linear_enabled' => true,
'mcp_servers' => [
],
'slack_channels' => [
],
'teams_channels' => [
]
],
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'replies' => [
]
]
]
]),
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}/automations/{automation_id}"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"jira_projects\": [\n \"<string>\"\n ],\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"jira_projects\": [\n \"<string>\"\n ],\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"jira_projects\": [\n \"<string>\"\n ],\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>",
"mode": "post_updates"
},
"teams": {
"channel_id": "<string>",
"team_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"automation_id": "<string>",
"created_at": 123,
"created_by": {
"id": "<string>",
"type": "user",
"name": "<string>"
},
"enabled": true,
"name": "<string>",
"triggers": [
{
"event_type": "<string>",
"trigger_id": "<string>",
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"operator": "eq",
"value": "<string>"
}
]
}
]
},
"replies": [],
"webhook": {
"url": "<string>",
"secret": "<string>"
}
}
],
"updated_at": 123,
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"last_edited_by": {
"id": "<string>",
"type": "user",
"name": "<string>"
},
"last_invocation": {
"fired_at": 123,
"status": "<string>"
},
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"next_run_at": 123,
"notifications": {
"email": {
"when": "always",
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>",
"when": "always"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"selection": "inherit",
"profile_id": "<string>",
"warnings": []
},
"session_settings": {
"devin_mode": "normal",
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"slack_reply_access": "slack_users",
"teams_reply_access": "teams_users",
"template_id": "<string>",
"tools": {
"jira_projects": [
"<string>"
],
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": [],
"slack_dm_scope": "org_members",
"teams_channels": []
}
}{
"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"
}Mettre à jour l’automatisation
Mettre à jour une automatisation.
Les groupes présents sont fusionnés membre par membre par défaut (RFC 7396) : les membres omis conservent leur valeur enregistrée et les valeurs nulles explicites les effacent. L’appartenance aux listes est entièrement remplacée, et chaque élément envoyé est fusionné avec l’élément enregistré du même type lorsque ce type apparaît exactement une fois de chaque côté.
curl --request PATCH \
--url https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
},
"teams": {
"channel_id": "<string>",
"team_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"enabled": true,
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"name": "<string>",
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"profile_id": "<string>"
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"tools": {
"jira_projects": [
"<string>"
],
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": [],
"teams_channels": []
},
"triggers": [
{
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"replies": []
}
]
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}"
payload = {
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": False,
"notifications": {
"slack": { "channel_id": "<string>" },
"teams": {
"channel_id": "<string>",
"team_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"enabled": True,
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"name": "<string>",
"notifications": {
"email": { "recipients": ["<string>"] },
"slack": { "channel_id": "<string>" }
},
"run_as": { "type": "organization" },
"security_profile": { "profile_id": "<string>" },
"session_settings": { "net_policy": { "allow": [{ "hostname": "<string>" }] } },
"tools": {
"jira_projects": ["<string>"],
"linear_enabled": True,
"mcp_servers": [],
"slack_channels": [],
"teams_channels": []
},
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"replies": []
}
]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
actions: [
{
prompt: '<string>',
session: {
bypass_approval: false,
notifications: {
slack: {channel_id: '<string>'},
teams: {channel_id: '<string>', team_id: '<string>'}
},
platform: '<string>',
playbook_id: '<string>',
repos: [],
tags: []
},
type: 'start_session'
}
],
concurrency: {max_concurrent_runs: 2, max_queue_depth: 1},
enabled: true,
limits: {invocations: {max_per_window: 2, window_seconds: 61}, max_acu_limit: 500},
metadata: {},
name: '<string>',
notifications: {email: {recipients: ['<string>']}, slack: {channel_id: '<string>'}},
run_as: {type: 'organization'},
security_profile: {profile_id: '<string>'},
session_settings: {net_policy: {allow: [{hostname: '<string>'}]}},
tools: {
jira_projects: ['<string>'],
linear_enabled: true,
mcp_servers: [],
slack_channels: [],
teams_channels: []
},
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
replies: []
}
]
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}', 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}/automations/{automation_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'actions' => [
[
'prompt' => '<string>',
'session' => [
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
],
'teams' => [
'channel_id' => '<string>',
'team_id' => '<string>'
]
],
'platform' => '<string>',
'playbook_id' => '<string>',
'repos' => [
],
'tags' => [
]
],
'type' => 'start_session'
]
],
'concurrency' => [
'max_concurrent_runs' => 2,
'max_queue_depth' => 1
],
'enabled' => true,
'limits' => [
'invocations' => [
'max_per_window' => 2,
'window_seconds' => 61
],
'max_acu_limit' => 500
],
'metadata' => [
],
'name' => '<string>',
'notifications' => [
'email' => [
'recipients' => [
'<string>'
]
],
'slack' => [
'channel_id' => '<string>'
]
],
'run_as' => [
'type' => 'organization'
],
'security_profile' => [
'profile_id' => '<string>'
],
'session_settings' => [
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
]
],
'tools' => [
'jira_projects' => [
'<string>'
],
'linear_enabled' => true,
'mcp_servers' => [
],
'slack_channels' => [
],
'teams_channels' => [
]
],
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'replies' => [
]
]
]
]),
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}/automations/{automation_id}"
payload := strings.NewReader("{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"jira_projects\": [\n \"<string>\"\n ],\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"jira_projects\": [\n \"<string>\"\n ],\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"channel_id\": \"<string>\",\n \"team_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"enabled\": true,\n \"limits\": {\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n },\n \"max_acu_limit\": 500\n },\n \"metadata\": {},\n \"name\": \"<string>\",\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"run_as\": {\n \"type\": \"organization\"\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"session_settings\": {\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"tools\": {\n \"jira_projects\": [\n \"<string>\"\n ],\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": []\n },\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"replies\": []\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>",
"mode": "post_updates"
},
"teams": {
"channel_id": "<string>",
"team_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"automation_id": "<string>",
"created_at": 123,
"created_by": {
"id": "<string>",
"type": "user",
"name": "<string>"
},
"enabled": true,
"name": "<string>",
"triggers": [
{
"event_type": "<string>",
"trigger_id": "<string>",
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"operator": "eq",
"value": "<string>"
}
]
}
]
},
"replies": [],
"webhook": {
"url": "<string>",
"secret": "<string>"
}
}
],
"updated_at": 123,
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"last_edited_by": {
"id": "<string>",
"type": "user",
"name": "<string>"
},
"last_invocation": {
"fired_at": 123,
"status": "<string>"
},
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"next_run_at": 123,
"notifications": {
"email": {
"when": "always",
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>",
"when": "always"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"selection": "inherit",
"profile_id": "<string>",
"warnings": []
},
"session_settings": {
"devin_mode": "normal",
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"slack_reply_access": "slack_users",
"teams_reply_access": "teams_users",
"template_id": "<string>",
"tools": {
"jira_projects": [
"<string>"
],
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": [],
"slack_dm_scope": "org_members",
"teams_channels": []
}
}{
"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"
}Autorisations
Nécessite un utilisateur de service ou un jeton d’accès personnel disposant de l’autorisationManageOrgAutomations au niveau de l’organisation.
Sémantique de fusion
Avec la sémantiquemerge_patch par défaut, les champs PATCH sont fusionnés membre par membre (selon le style de la RFC 7396) : les membres omis conservent leur valeur enregistrée, les valeurs null explicites les effacent et les groupes vides sont sans effet. Les métadonnées sont fusionnées par clé, les valeurs null supprimant les clés. Les listes sont remplacées dans leur intégralité, tandis que chaque élément envoyé est fusionné avec l’élément enregistré du même type lorsque ce type apparaît exactement une fois de chaque côté.
Avec la sémantique replace_groups, aucune fusion n’a lieu : un groupe d’objets envoyé remplace intégralement le groupe enregistré, et une liste triggers ou actions envoyée remplace intégralement la liste enregistrée, sans fusion élément par élément. Renvoyez chaque membre que vous souhaitez conserver : les membres omis sont effacés ou réinitialisés à leur valeur par défaut. metadata constitue également un remplacement complet ; pour supprimer une clé, renvoyez l’ensemble sans cette clé ; les valeurs null dans les métadonnées sont rejetées avec une erreur 400 au lieu de supprimer les clés. Les champs de niveau supérieur omis restent toutefois inchangés.
Vérifiez le champ update_semantics de l’endpoint des schémas d’événements afin de connaître la sémantique active pour votre organisation avant de vous appuyer sur l’un ou l’autre comportement. Traitez-le comme une énumération ouverte et acceptez des valeurs autres que les deux ci-dessus.
Déclencheurs de webhook
Réajouter un déclencheurwebhook:incoming génère un nouveau secret et le renvoie dans la réponse de mise à jour. Le secret n’est affiché qu’à ce moment-là : veillez donc à le récupérer dès réception. Le remplacement ou la conservation d’un déclencheur de webhook existant préserve le secret existant.Autorisations
Identifiant de compte de service (préfixe : cog_)
Paramètres de chemin
ID d’organisation (préfixe : org-)
"org-abc123def456"
Corps
Par défaut, les champs PATCH sont fusionnés membre par membre : les membres omis sont conservés,
les null explicites les effacent et les groupes vides n'ont aucun effet. Les métadonnées sont fusionnées par clé,
les valeurs null supprimant les clés. Les listes sont entièrement remplacées (suppression = renvoyer
la liste sans l'élément), tandis que chaque élément envoyé est fusionné avec l'élément
enregistré du même type lorsque ce type apparaît exactement une fois des deux
côtés. Les membres d'éléments obligatoires à la création (prompt,
setup_prompt, les configurations Slack de surveillance/triage, scan_id) peuvent être
omis lorsqu'un équivalent existe — ils sont conservés comme tout autre membre ;
un null explicite est refusé.
- AutomationStartSessionActionUpdate
- AutomationMessageSessionActionUpdate
- AutomationMonitorSessionActionUpdate
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
1 - 500Show child attributes
Show child attributes
Identité sous laquelle les sessions générées s’exécutent. organization : l’identité d’automatisation de l’organisation (l’utilisateur système dans l’application) — les sessions utilisent les autorisations système ; les serveurs MCP installés avec une connexion personnelle (limitée à l’utilisateur) ne peuvent donc pas être sélectionnés, et le passage d’une automatisation à organization les retire de sa sélection. creator : automatisation personnelle — s’exécute avec les propres autorisations du créateur et n’est visible que par le créateur et les administrateurs de l’organisation ; refusée pour les automatisations créées par un utilisateur de service. service_user : s’exécute sous l’identité de l’utilisateur de service indiqué, avec ses rôles, ses autorisations et ses limites d’ACU ; nécessite l’autorisation de gérer cet utilisateur de service. Obligatoire à la création ; null lors d’une mise à jour réinitialise à organization.
- AutomationRunAsOrganization
- AutomationRunAsCreator
- AutomationRunAsServiceUser
Show child attributes
Show child attributes
La liaison de l’automatisation à son profil de sécurité : un profile_id verrouille ce profil, {"profile_id": null} enregistre une désactivation explicite, et un null explicite rétablit l’héritage depuis l’organisation/l’Enterprise. Nécessite l’autorisation de gérer les profils de sécurité.
Show child attributes
Show child attributes
Appliqué à chaque session créée par cette automatisation (y compris les sessions de surveillance).
Show child attributes
Show child attributes
null rétablit la valeur slack_users.
devin_users, slack_users, external_slack_users null rétablit la valeur teams_users.
devin_users, teams_users Show child attributes
Show child attributes
Show child attributes
Show child attributes
Réponse
Réponse réussie
- AutomationStartSessionAction
- AutomationMessageSessionAction
- AutomationMonitorSessionAction
Show child attributes
Show child attributes
Un principal d’utilisateur ou d’utilisateur de service associé à une action ou une ressource.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Un principal d’utilisateur ou d’utilisateur de service associé à une action ou une ressource.
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Date du prochain déclenchement planifié de l’automatisation. null si elle n’a aucun déclencheur de planification, si elle est désactivée ou si toutes les planifications ont dépassé leur date de fin.
Show child attributes
Show child attributes
Identité sous laquelle s’exécutent les sessions générées. organization: l’identité d’automatisation de l’organisation (l’utilisateur système dans l’application) — les sessions utilisent les autorisations système ; les serveurs MCP installés avec une connexion personnelle (limitée à l’utilisateur) ne peuvent donc pas être sélectionnés, et le passage d’une automatisation à organization les retire de sa sélection. creator: automatisation personnelle — s’exécute avec les autorisations propres au créateur et n’est visible que par celui-ci et les administrateurs de l’organisation ; refusée pour les automatisations créées par un utilisateur de service. service_user : s’exécute sous l’identité de l’utilisateur de service indiqué, avec ses rôles, ses autorisations et ses limites d’ACU ; nécessite l’autorisation de gérer cet utilisateur de service. Obligatoire à la création ; null lors d’une mise à jour réinitialise la valeur sur organization.
- AutomationRunAsOrganization
- AutomationRunAsCreator
- AutomationRunAsServiceUser
Show child attributes
Show child attributes
La liaison au profil de sécurité de l’automatisation et les profils directeurs résolus. null lorsque les profils de sécurité ne sont pas activés pour l’organisation.
Show child attributes
Show child attributes
Appliqué à chaque session créée par cette automatisation (y compris les sessions de surveillance).
Show child attributes
Show child attributes
Personnes autorisées à répondre dans les sessions existantes depuis des threads Slack : devin_users (uniquement les comptes Devin liés), slack_users (toute personne dans les espaces de travail Slack connectés à l’organisation) ou external_slack_users (également les utilisateurs de Slack Connect). Ce paramètre ne détermine pas qui peut déclencher l’automatisation.
devin_users, slack_users, external_slack_users Personnes autorisées à répondre dans les sessions existantes depuis des fils de discussion Microsoft Teams : devin_users (uniquement les comptes Devin liés) ou teams_users (toute personne dans le tenant Microsoft connecté à l’organisation ; valeur par défaut). Ce paramètre ne détermine pas qui peut déclencher l’automatisation.
devin_users, teams_users Show child attributes
Show child attributes

