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 '
{
"name": "<string>",
"triggers": [
{
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"managed_webhook_id": "<string>",
"replies": []
}
],
"actions": [
{
"type": "start_session",
"prompt": "<string>",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
},
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"enabled": true,
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"tools": {
"mcp_servers": [],
"slack_channels": [],
"teams_channels": [],
"teams_dm_scope": "installed_users",
"linear_enabled": true,
"jira_projects": [
"<string>"
]
},
"metadata": {},
"limits": {
"max_acu_limit": 500,
"invocations": {
"max_per_window": 2,
"window_seconds": 61
}
},
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"session_settings": {
"devin_mode": "<string>",
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"security_profile": {
"profile_id": "<string>"
},
"run_as": {
"type": "organization"
}
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}"
payload = {
"name": "<string>",
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"managed_webhook_id": "<string>",
"replies": []
}
],
"actions": [
{
"type": "start_session",
"prompt": "<string>",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": False,
"notifications": {
"slack": { "channel_id": "<string>" },
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"enabled": True,
"notifications": {
"email": { "recipients": ["<string>"] },
"slack": { "channel_id": "<string>" }
},
"tools": {
"mcp_servers": [],
"slack_channels": [],
"teams_channels": [],
"teams_dm_scope": "installed_users",
"linear_enabled": True,
"jira_projects": ["<string>"]
},
"metadata": {},
"limits": {
"max_acu_limit": 500,
"invocations": {
"max_per_window": 2,
"window_seconds": 61
}
},
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"session_settings": {
"devin_mode": "<string>",
"net_policy": { "allow": [{ "hostname": "<string>" }] }
},
"security_profile": { "profile_id": "<string>" },
"run_as": { "type": "organization" }
}
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({
name: '<string>',
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
managed_webhook_id: '<string>',
replies: []
}
],
actions: [
{
type: 'start_session',
prompt: '<string>',
session: {
repos: [],
tags: [],
playbook_id: '<string>',
platform: '<string>',
bypass_approval: false,
notifications: {
slack: {channel_id: '<string>'},
teams: {team_id: '<string>', channel_id: '<string>'}
}
}
}
],
enabled: true,
notifications: {email: {recipients: ['<string>']}, slack: {channel_id: '<string>'}},
tools: {
mcp_servers: [],
slack_channels: [],
teams_channels: [],
teams_dm_scope: 'installed_users',
linear_enabled: true,
jira_projects: ['<string>']
},
metadata: {},
limits: {max_acu_limit: 500, invocations: {max_per_window: 2, window_seconds: 61}},
concurrency: {max_concurrent_runs: 2, max_queue_depth: 1},
session_settings: {devin_mode: '<string>', net_policy: {allow: [{hostname: '<string>'}]}},
security_profile: {profile_id: '<string>'},
run_as: {type: 'organization'}
})
};
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([
'name' => '<string>',
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'managed_webhook_id' => '<string>',
'replies' => [
]
]
],
'actions' => [
[
'type' => 'start_session',
'prompt' => '<string>',
'session' => [
'repos' => [
],
'tags' => [
],
'playbook_id' => '<string>',
'platform' => '<string>',
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
],
'teams' => [
'team_id' => '<string>',
'channel_id' => '<string>'
]
]
]
]
],
'enabled' => true,
'notifications' => [
'email' => [
'recipients' => [
'<string>'
]
],
'slack' => [
'channel_id' => '<string>'
]
],
'tools' => [
'mcp_servers' => [
],
'slack_channels' => [
],
'teams_channels' => [
],
'teams_dm_scope' => 'installed_users',
'linear_enabled' => true,
'jira_projects' => [
'<string>'
]
],
'metadata' => [
],
'limits' => [
'max_acu_limit' => 500,
'invocations' => [
'max_per_window' => 2,
'window_seconds' => 61
]
],
'concurrency' => [
'max_concurrent_runs' => 2,
'max_queue_depth' => 1
],
'session_settings' => [
'devin_mode' => '<string>',
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
]
],
'security_profile' => [
'profile_id' => '<string>'
],
'run_as' => [
'type' => 'organization'
]
]),
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 \"name\": \"<string>\",\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"managed_webhook_id\": \"<string>\",\n \"replies\": []\n }\n ],\n \"actions\": [\n {\n \"type\": \"start_session\",\n \"prompt\": \"<string>\",\n \"session\": {\n \"repos\": [],\n \"tags\": [],\n \"playbook_id\": \"<string>\",\n \"platform\": \"<string>\",\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"team_id\": \"<string>\",\n \"channel_id\": \"<string>\"\n }\n }\n }\n }\n ],\n \"enabled\": true,\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"tools\": {\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": [],\n \"teams_dm_scope\": \"installed_users\",\n \"linear_enabled\": true,\n \"jira_projects\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"limits\": {\n \"max_acu_limit\": 500,\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n }\n },\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"session_settings\": {\n \"devin_mode\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"run_as\": {\n \"type\": \"organization\"\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 \"name\": \"<string>\",\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"managed_webhook_id\": \"<string>\",\n \"replies\": []\n }\n ],\n \"actions\": [\n {\n \"type\": \"start_session\",\n \"prompt\": \"<string>\",\n \"session\": {\n \"repos\": [],\n \"tags\": [],\n \"playbook_id\": \"<string>\",\n \"platform\": \"<string>\",\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"team_id\": \"<string>\",\n \"channel_id\": \"<string>\"\n }\n }\n }\n }\n ],\n \"enabled\": true,\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"tools\": {\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": [],\n \"teams_dm_scope\": \"installed_users\",\n \"linear_enabled\": true,\n \"jira_projects\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"limits\": {\n \"max_acu_limit\": 500,\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n }\n },\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"session_settings\": {\n \"devin_mode\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"run_as\": {\n \"type\": \"organization\"\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 \"name\": \"<string>\",\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"managed_webhook_id\": \"<string>\",\n \"replies\": []\n }\n ],\n \"actions\": [\n {\n \"type\": \"start_session\",\n \"prompt\": \"<string>\",\n \"session\": {\n \"repos\": [],\n \"tags\": [],\n \"playbook_id\": \"<string>\",\n \"platform\": \"<string>\",\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"team_id\": \"<string>\",\n \"channel_id\": \"<string>\"\n }\n }\n }\n }\n ],\n \"enabled\": true,\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"tools\": {\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": [],\n \"teams_dm_scope\": \"installed_users\",\n \"linear_enabled\": true,\n \"jira_projects\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"limits\": {\n \"max_acu_limit\": 500,\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n }\n },\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"session_settings\": {\n \"devin_mode\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"run_as\": {\n \"type\": \"organization\"\n }\n}"
response = http.request(request)
puts response.read_body{
"automation_id": "<string>",
"name": "<string>",
"enabled": true,
"triggers": [
{
"trigger_id": "<string>",
"event_type": "<string>",
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"operator": "eq",
"value": "<string>"
}
]
}
]
},
"managed_webhook_id": "<string>",
"replies": [],
"webhook": {
"url": "<string>",
"secret": "<string>"
}
}
],
"actions": [
{
"prompt": "<string>",
"type": "start_session",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": false,
"notifications": {
"slack": {
"mode": "post_updates",
"channel_id": "<string>"
},
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"created_by": {
"type": "user",
"id": "<string>",
"name": "<string>"
},
"created_at": 123,
"updated_at": 123,
"notifications": {
"email": {
"when": "always",
"recipients": [
"<string>"
]
},
"slack": {
"when": "always",
"channel_id": "<string>"
}
},
"tools": {
"mcp_servers": [],
"slack_channels": [],
"slack_dm_scope": "org_members",
"teams_channels": [],
"teams_dm_scope": "installed_users",
"linear_enabled": true,
"jira_projects": [
"<string>"
]
},
"metadata": {},
"limits": {
"max_acu_limit": 500,
"invocations": {
"max_per_window": 2,
"window_seconds": 61
}
},
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"session_settings": {
"devin_mode": "<string>",
"fallback_devin_mode": "normal",
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"security_profile": {
"selection": "inherit",
"profile_id": "<string>",
"warnings": []
},
"run_as": {
"type": "organization"
},
"slack_reply_access": "slack_users",
"teams_reply_access": "teams_users",
"template_id": "<string>",
"last_edited_by": {
"type": "user",
"id": "<string>",
"name": "<string>"
},
"last_invocation": {
"fired_at": 123,
"status": "<string>"
},
"next_run_at": 123
}{
"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>"
}自動化を更新する
自動化を更新します。
指定されたグループは、デフォルトでメンバー単位でマージされます(RFC 7396)。省略したメンバーは 保存されている値を保持し、明示的に null を指定するとその値がクリアされます。リストのメンバーシップは 全体が置き換えられ、送信された各要素は、その型が両方にちょうど1つずつ存在する場合、 同じ型の保存済み要素にマージされます。
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 '
{
"name": "<string>",
"triggers": [
{
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"managed_webhook_id": "<string>",
"replies": []
}
],
"actions": [
{
"type": "start_session",
"prompt": "<string>",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
},
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"enabled": true,
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"tools": {
"mcp_servers": [],
"slack_channels": [],
"teams_channels": [],
"teams_dm_scope": "installed_users",
"linear_enabled": true,
"jira_projects": [
"<string>"
]
},
"metadata": {},
"limits": {
"max_acu_limit": 500,
"invocations": {
"max_per_window": 2,
"window_seconds": 61
}
},
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"session_settings": {
"devin_mode": "<string>",
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"security_profile": {
"profile_id": "<string>"
},
"run_as": {
"type": "organization"
}
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations/{automation_id}"
payload = {
"name": "<string>",
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"managed_webhook_id": "<string>",
"replies": []
}
],
"actions": [
{
"type": "start_session",
"prompt": "<string>",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": False,
"notifications": {
"slack": { "channel_id": "<string>" },
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"enabled": True,
"notifications": {
"email": { "recipients": ["<string>"] },
"slack": { "channel_id": "<string>" }
},
"tools": {
"mcp_servers": [],
"slack_channels": [],
"teams_channels": [],
"teams_dm_scope": "installed_users",
"linear_enabled": True,
"jira_projects": ["<string>"]
},
"metadata": {},
"limits": {
"max_acu_limit": 500,
"invocations": {
"max_per_window": 2,
"window_seconds": 61
}
},
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"session_settings": {
"devin_mode": "<string>",
"net_policy": { "allow": [{ "hostname": "<string>" }] }
},
"security_profile": { "profile_id": "<string>" },
"run_as": { "type": "organization" }
}
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({
name: '<string>',
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
managed_webhook_id: '<string>',
replies: []
}
],
actions: [
{
type: 'start_session',
prompt: '<string>',
session: {
repos: [],
tags: [],
playbook_id: '<string>',
platform: '<string>',
bypass_approval: false,
notifications: {
slack: {channel_id: '<string>'},
teams: {team_id: '<string>', channel_id: '<string>'}
}
}
}
],
enabled: true,
notifications: {email: {recipients: ['<string>']}, slack: {channel_id: '<string>'}},
tools: {
mcp_servers: [],
slack_channels: [],
teams_channels: [],
teams_dm_scope: 'installed_users',
linear_enabled: true,
jira_projects: ['<string>']
},
metadata: {},
limits: {max_acu_limit: 500, invocations: {max_per_window: 2, window_seconds: 61}},
concurrency: {max_concurrent_runs: 2, max_queue_depth: 1},
session_settings: {devin_mode: '<string>', net_policy: {allow: [{hostname: '<string>'}]}},
security_profile: {profile_id: '<string>'},
run_as: {type: 'organization'}
})
};
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([
'name' => '<string>',
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'managed_webhook_id' => '<string>',
'replies' => [
]
]
],
'actions' => [
[
'type' => 'start_session',
'prompt' => '<string>',
'session' => [
'repos' => [
],
'tags' => [
],
'playbook_id' => '<string>',
'platform' => '<string>',
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
],
'teams' => [
'team_id' => '<string>',
'channel_id' => '<string>'
]
]
]
]
],
'enabled' => true,
'notifications' => [
'email' => [
'recipients' => [
'<string>'
]
],
'slack' => [
'channel_id' => '<string>'
]
],
'tools' => [
'mcp_servers' => [
],
'slack_channels' => [
],
'teams_channels' => [
],
'teams_dm_scope' => 'installed_users',
'linear_enabled' => true,
'jira_projects' => [
'<string>'
]
],
'metadata' => [
],
'limits' => [
'max_acu_limit' => 500,
'invocations' => [
'max_per_window' => 2,
'window_seconds' => 61
]
],
'concurrency' => [
'max_concurrent_runs' => 2,
'max_queue_depth' => 1
],
'session_settings' => [
'devin_mode' => '<string>',
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
]
],
'security_profile' => [
'profile_id' => '<string>'
],
'run_as' => [
'type' => 'organization'
]
]),
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 \"name\": \"<string>\",\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"managed_webhook_id\": \"<string>\",\n \"replies\": []\n }\n ],\n \"actions\": [\n {\n \"type\": \"start_session\",\n \"prompt\": \"<string>\",\n \"session\": {\n \"repos\": [],\n \"tags\": [],\n \"playbook_id\": \"<string>\",\n \"platform\": \"<string>\",\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"team_id\": \"<string>\",\n \"channel_id\": \"<string>\"\n }\n }\n }\n }\n ],\n \"enabled\": true,\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"tools\": {\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": [],\n \"teams_dm_scope\": \"installed_users\",\n \"linear_enabled\": true,\n \"jira_projects\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"limits\": {\n \"max_acu_limit\": 500,\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n }\n },\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"session_settings\": {\n \"devin_mode\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"run_as\": {\n \"type\": \"organization\"\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 \"name\": \"<string>\",\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"managed_webhook_id\": \"<string>\",\n \"replies\": []\n }\n ],\n \"actions\": [\n {\n \"type\": \"start_session\",\n \"prompt\": \"<string>\",\n \"session\": {\n \"repos\": [],\n \"tags\": [],\n \"playbook_id\": \"<string>\",\n \"platform\": \"<string>\",\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"team_id\": \"<string>\",\n \"channel_id\": \"<string>\"\n }\n }\n }\n }\n ],\n \"enabled\": true,\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"tools\": {\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": [],\n \"teams_dm_scope\": \"installed_users\",\n \"linear_enabled\": true,\n \"jira_projects\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"limits\": {\n \"max_acu_limit\": 500,\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n }\n },\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"session_settings\": {\n \"devin_mode\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"run_as\": {\n \"type\": \"organization\"\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 \"name\": \"<string>\",\n \"triggers\": [\n {\n \"conditions\": {\n \"any\": [\n {\n \"all\": [\n {\n \"field\": \"<string>\",\n \"value\": \"<string>\"\n }\n ]\n }\n ]\n },\n \"managed_webhook_id\": \"<string>\",\n \"replies\": []\n }\n ],\n \"actions\": [\n {\n \"type\": \"start_session\",\n \"prompt\": \"<string>\",\n \"session\": {\n \"repos\": [],\n \"tags\": [],\n \"playbook_id\": \"<string>\",\n \"platform\": \"<string>\",\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n },\n \"teams\": {\n \"team_id\": \"<string>\",\n \"channel_id\": \"<string>\"\n }\n }\n }\n }\n ],\n \"enabled\": true,\n \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"tools\": {\n \"mcp_servers\": [],\n \"slack_channels\": [],\n \"teams_channels\": [],\n \"teams_dm_scope\": \"installed_users\",\n \"linear_enabled\": true,\n \"jira_projects\": [\n \"<string>\"\n ]\n },\n \"metadata\": {},\n \"limits\": {\n \"max_acu_limit\": 500,\n \"invocations\": {\n \"max_per_window\": 2,\n \"window_seconds\": 61\n }\n },\n \"concurrency\": {\n \"max_concurrent_runs\": 2,\n \"max_queue_depth\": 1\n },\n \"session_settings\": {\n \"devin_mode\": \"<string>\",\n \"net_policy\": {\n \"allow\": [\n {\n \"hostname\": \"<string>\"\n }\n ]\n }\n },\n \"security_profile\": {\n \"profile_id\": \"<string>\"\n },\n \"run_as\": {\n \"type\": \"organization\"\n }\n}"
response = http.request(request)
puts response.read_body{
"automation_id": "<string>",
"name": "<string>",
"enabled": true,
"triggers": [
{
"trigger_id": "<string>",
"event_type": "<string>",
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"operator": "eq",
"value": "<string>"
}
]
}
]
},
"managed_webhook_id": "<string>",
"replies": [],
"webhook": {
"url": "<string>",
"secret": "<string>"
}
}
],
"actions": [
{
"prompt": "<string>",
"type": "start_session",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": false,
"notifications": {
"slack": {
"mode": "post_updates",
"channel_id": "<string>"
},
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"created_by": {
"type": "user",
"id": "<string>",
"name": "<string>"
},
"created_at": 123,
"updated_at": 123,
"notifications": {
"email": {
"when": "always",
"recipients": [
"<string>"
]
},
"slack": {
"when": "always",
"channel_id": "<string>"
}
},
"tools": {
"mcp_servers": [],
"slack_channels": [],
"slack_dm_scope": "org_members",
"teams_channels": [],
"teams_dm_scope": "installed_users",
"linear_enabled": true,
"jira_projects": [
"<string>"
]
},
"metadata": {},
"limits": {
"max_acu_limit": 500,
"invocations": {
"max_per_window": 2,
"window_seconds": 61
}
},
"concurrency": {
"max_concurrent_runs": 2,
"max_queue_depth": 1
},
"session_settings": {
"devin_mode": "<string>",
"fallback_devin_mode": "normal",
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"security_profile": {
"selection": "inherit",
"profile_id": "<string>",
"warnings": []
},
"run_as": {
"type": "organization"
},
"slack_reply_access": "slack_users",
"teams_reply_access": "teams_users",
"template_id": "<string>",
"last_edited_by": {
"type": "user",
"id": "<string>",
"name": "<string>"
},
"last_invocation": {
"fired_at": 123,
"status": "<string>"
},
"next_run_at": 123
}{
"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>"
}権限
組織レベルのManageOrgAutomations 権限を持つサービスユーザーまたはパーソナルアクセストークンが必要です。
マージのセマンティクス
デフォルトのmerge_patch セマンティクスでは、PATCH フィールドはメンバーごとにマージされます (RFC 7396 形式) 。省略したメンバーは保存済みの値が維持され、明示的な null はクリアされ、空のグループは no-op です。メタデータはキーごとにマージされ、null 値はキーを削除します。リストは全体が置き換えられますが、各送信要素は、その型が送信側と保存済み側の両方でちょうど 1 回ずつ出現する場合、同じ型の保存済み要素にマージされます。
replace_groups セマンティクスでは、マージは行われません。送信されたオブジェクトグループは保存済みのグループ全体を置き換え、送信された triggers または actions リストは、要素ごとのマージを行わずに保存済みリスト全体を置き換えます。保持したいメンバーはすべて再送信してください。省略したメンバーはクリアされるか、デフォルト値にリセットされます。metadata も完全な置換セットとなるため、キーを削除するには、そのキーを含めないセットを再送信します。null のメタデータ値はキーを削除するのではなく、400 エラーで拒否されます。省略したトップレベルフィールドは引き続き変更されません。
いずれの動作に依存する前にも、イベントスキーマエンドポイントの update_semantics フィールドで、組織でアクティブなセマンティクスを確認してください。これをオープンな列挙型として扱い、上記の 2 つ以外の値も許容してください。
Webhook トリガー
webhook:incoming トリガーを再追加すると、新しいシークレットが生成され、更新レスポンスで返されます。シークレットが表示されるのはこのときだけなので、受け取ったら控えておいてください。既存の webhook トリガーを置き換える場合やそのまま保持する場合は、既存のシークレットが維持されます。ボディ
PATCH フィールドはデフォルトでメンバー単位にマージされます。省略したメンバーは保持され、明示的に null を指定するとクリアされ、空のグループは no-op です。メタデータはキーごとにマージされ、null 値はキーを削除します。リストは完全に置き換えられます(削除するには、その要素を除いたリストを再送信します)。送信された各要素は、その型が両方にそれぞれ1つだけ存在する場合、同じ型の保存済み要素にマージされます。作成時に必須の要素メンバー(prompt、setup_prompt、monitor/triage の Slack 設定、scan_id)は、対応する保存済み要素が存在する場合は省略できます。他のメンバーと同様に引き継がれます。明示的な null は拒否されます。
生成されたセッションの run に使用する ID。organization: 組織の自動化 ID。組織に自動化用のデフォルトのサービスユーザーが設定されている場合、セッションはそのサービスユーザーとして run され、レスポンスには run_as の値として service_user が、そのサービスユーザーの id とともに返されます。保存するには、そのサービスユーザーが持つすべての権限が必要です。設定されていない場合、自動化の作成や有効な自動化の保存は拒否されます。個人用(user-scoped)の接続でインストールされた MCPサーバーのうち、そのサービスユーザーが接続していないものは選択できません。自動化を organization に切り替えると、それらは選択肢から除外されます。creator: 個人用自動化 — 作成者自身の権限で run され、作成者と org 管理者にのみ表示されます。サービスユーザーが作成した自動化では拒否されます。service_user: 指定されたサービスユーザーとして、そのユーザーのロール、付与された権限、ACU上限に従って run されます。そのサービスユーザーを管理する権限が必要です。作成時に必須です。更新時に null を指定すると organization にリセットされます。
- AutomationRunAsOrganization
- AutomationRunAsCreator
- AutomationRunAsServiceUser
Show child attributes
Show child attributes
レスポンス
成功レスポンス
生成されたセッションの run に使用する ID。organization: 組織の自動化 ID。組織に自動化用のデフォルトのサービスユーザーが設定されている場合、セッションはそのサービスユーザーとして run され、レスポンスの run_as は service_user となり、その id も返されます。保存には、そのサービスユーザーが持つすべての権限が必要です。デフォルトのサービスユーザーが設定されていない場合、自動化の作成や有効な自動化の保存は拒否されます。そのサービスユーザーが未接続の個人用(user-scoped)接続でインストールされた MCPサーバーは選択できません。また、自動化を organization に切り替えると、それらは選択肢から削除されます。creator: 個人用自動化 — 作成者自身の権限で run され、作成者と org 管理者にのみ表示されます。サービスユーザーが作成した自動化では使用できません。service_user: 指定したサービスユーザーとして、そのロール、付与された権限、ACU上限に従って run されます。そのサービスユーザーを管理する権限が必要です。作成時は必須です。更新時に null を指定すると organization にリセットされます。
- AutomationRunAsOrganization
- AutomationRunAsCreator
- AutomationRunAsServiceUser
Show child attributes
Show child attributes

