curl --request POST \
--url https://api.devin.ai/v3/organizations/{org_id}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"name": "<string>",
"run_as": {
"type": "organization"
},
"triggers": [
{
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"replies": []
}
],
"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": {},
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"security_profile": {
"profile_id": "<string>"
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"template_id": "<string>",
"tools": {
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": []
}
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations"
payload = {
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": False,
"notifications": { "slack": { "channel_id": "<string>" } },
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"name": "<string>",
"run_as": { "type": "organization" },
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"replies": []
}
],
"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": {},
"notifications": {
"email": { "recipients": ["<string>"] },
"slack": { "channel_id": "<string>" }
},
"security_profile": { "profile_id": "<string>" },
"session_settings": { "net_policy": { "allow": [{ "hostname": "<string>" }] } },
"template_id": "<string>",
"tools": {
"linear_enabled": True,
"mcp_servers": [],
"slack_channels": []
}
}
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({
actions: [
{
prompt: '<string>',
session: {
bypass_approval: false,
notifications: {slack: {channel_id: '<string>'}},
platform: '<string>',
playbook_id: '<string>',
repos: [],
tags: []
},
type: 'start_session'
}
],
name: '<string>',
run_as: {type: 'organization'},
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
replies: []
}
],
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: {},
notifications: {email: {recipients: ['<string>']}, slack: {channel_id: '<string>'}},
security_profile: {profile_id: '<string>'},
session_settings: {net_policy: {allow: [{hostname: '<string>'}]}},
template_id: '<string>',
tools: {linear_enabled: true, mcp_servers: [], slack_channels: []}
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/automations', 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",
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([
'actions' => [
[
'prompt' => '<string>',
'session' => [
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
]
],
'platform' => '<string>',
'playbook_id' => '<string>',
'repos' => [
],
'tags' => [
]
],
'type' => 'start_session'
]
],
'name' => '<string>',
'run_as' => [
'type' => 'organization'
],
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'replies' => [
]
]
],
'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' => [
],
'notifications' => [
'email' => [
'recipients' => [
'<string>'
]
],
'slack' => [
'channel_id' => '<string>'
]
],
'security_profile' => [
'profile_id' => '<string>'
],
'session_settings' => [
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
]
],
'template_id' => '<string>',
'tools' => [
'linear_enabled' => true,
'mcp_servers' => [
],
'slack_channels' => [
]
]
]),
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"
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 },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"name\": \"<string>\",\n \"run_as\": {\n \"type\": \"organization\"\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 \"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 \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\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 \"template_id\": \"<string>\",\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n }\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}/automations")
.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 },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"name\": \"<string>\",\n \"run_as\": {\n \"type\": \"organization\"\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 \"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 \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\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 \"template_id\": \"<string>\",\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/automations")
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 \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"name\": \"<string>\",\n \"run_as\": {\n \"type\": \"organization\"\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 \"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 \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\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 \"template_id\": \"<string>\",\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"automation_id": "<string>",
"created_at": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
},
"enabled": true,
"name": "<string>",
"triggers": [
{
"event_type": "<string>",
"trigger_id": "<string>",
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"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>",
"name": "<string>"
},
"last_invocation": {
"fired_at": 123,
"status": "<string>"
},
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"profile_id": "<string>",
"warnings": []
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"template_id": "<string>",
"tools": {
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": []
}
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}自動化を作成
トリガーとアクションを含む新しい自動化を作成します。
curl --request POST \
--url https://api.devin.ai/v3/organizations/{org_id}/automations \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"name": "<string>",
"run_as": {
"type": "organization"
},
"triggers": [
{
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"value": "<string>"
}
]
}
]
},
"replies": []
}
],
"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": {},
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"security_profile": {
"profile_id": "<string>"
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"template_id": "<string>",
"tools": {
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": []
}
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations"
payload = {
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": False,
"notifications": { "slack": { "channel_id": "<string>" } },
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"name": "<string>",
"run_as": { "type": "organization" },
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"replies": []
}
],
"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": {},
"notifications": {
"email": { "recipients": ["<string>"] },
"slack": { "channel_id": "<string>" }
},
"security_profile": { "profile_id": "<string>" },
"session_settings": { "net_policy": { "allow": [{ "hostname": "<string>" }] } },
"template_id": "<string>",
"tools": {
"linear_enabled": True,
"mcp_servers": [],
"slack_channels": []
}
}
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({
actions: [
{
prompt: '<string>',
session: {
bypass_approval: false,
notifications: {slack: {channel_id: '<string>'}},
platform: '<string>',
playbook_id: '<string>',
repos: [],
tags: []
},
type: 'start_session'
}
],
name: '<string>',
run_as: {type: 'organization'},
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
replies: []
}
],
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: {},
notifications: {email: {recipients: ['<string>']}, slack: {channel_id: '<string>'}},
security_profile: {profile_id: '<string>'},
session_settings: {net_policy: {allow: [{hostname: '<string>'}]}},
template_id: '<string>',
tools: {linear_enabled: true, mcp_servers: [], slack_channels: []}
})
};
fetch('https://api.devin.ai/v3/organizations/{org_id}/automations', 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",
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([
'actions' => [
[
'prompt' => '<string>',
'session' => [
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
]
],
'platform' => '<string>',
'playbook_id' => '<string>',
'repos' => [
],
'tags' => [
]
],
'type' => 'start_session'
]
],
'name' => '<string>',
'run_as' => [
'type' => 'organization'
],
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'replies' => [
]
]
],
'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' => [
],
'notifications' => [
'email' => [
'recipients' => [
'<string>'
]
],
'slack' => [
'channel_id' => '<string>'
]
],
'security_profile' => [
'profile_id' => '<string>'
],
'session_settings' => [
'net_policy' => [
'allow' => [
[
'hostname' => '<string>'
]
]
]
],
'template_id' => '<string>',
'tools' => [
'linear_enabled' => true,
'mcp_servers' => [
],
'slack_channels' => [
]
]
]),
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"
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 },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"name\": \"<string>\",\n \"run_as\": {\n \"type\": \"organization\"\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 \"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 \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\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 \"template_id\": \"<string>\",\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n }\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}/automations")
.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 },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"name\": \"<string>\",\n \"run_as\": {\n \"type\": \"organization\"\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 \"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 \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\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 \"template_id\": \"<string>\",\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.devin.ai/v3/organizations/{org_id}/automations")
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 \"actions\": [\n {\n \"prompt\": \"<string>\",\n \"session\": {\n \"bypass_approval\": false,\n \"notifications\": {\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\n },\n \"platform\": \"<string>\",\n \"playbook_id\": \"<string>\",\n \"repos\": [],\n \"tags\": []\n },\n \"type\": \"start_session\"\n }\n ],\n \"name\": \"<string>\",\n \"run_as\": {\n \"type\": \"organization\"\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 \"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 \"notifications\": {\n \"email\": {\n \"recipients\": [\n \"<string>\"\n ]\n },\n \"slack\": {\n \"channel_id\": \"<string>\"\n }\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 \"template_id\": \"<string>\",\n \"tools\": {\n \"linear_enabled\": true,\n \"mcp_servers\": [],\n \"slack_channels\": []\n }\n}"
response = http.request(request)
puts response.read_body{
"actions": [
{
"prompt": "<string>",
"session": {
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
}
},
"platform": "<string>",
"playbook_id": "<string>",
"repos": [],
"tags": []
},
"type": "start_session"
}
],
"automation_id": "<string>",
"created_at": 123,
"created_by": {
"id": "<string>",
"name": "<string>"
},
"enabled": true,
"name": "<string>",
"triggers": [
{
"event_type": "<string>",
"trigger_id": "<string>",
"conditions": {
"any": [
{
"all": [
{
"field": "<string>",
"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>",
"name": "<string>"
},
"last_invocation": {
"fired_at": 123,
"status": "<string>"
},
"limits": {
"invocations": {
"max_per_window": 2,
"window_seconds": 61
},
"max_acu_limit": 500
},
"metadata": {},
"notifications": {
"email": {
"recipients": [
"<string>"
]
},
"slack": {
"channel_id": "<string>"
}
},
"run_as": {
"type": "organization"
},
"security_profile": {
"profile_id": "<string>",
"warnings": []
},
"session_settings": {
"net_policy": {
"allow": [
{
"hostname": "<string>"
}
]
}
},
"template_id": "<string>",
"tools": {
"linear_enabled": true,
"mcp_servers": [],
"slack_channels": []
}
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}{
"status": 123,
"title": "<string>",
"detail": "<string>",
"errors": [
{}
],
"instance": "<string>",
"type": "about:blank"
}権限
ManageOrgAutomations 権限を持つサービスユーザーが必要です。
実行アイデンティティ
run_as フィールドは必須です。サービスユーザーが作成した自動化では、
organization を使用する必要があります。UsePersonalAutomations
権限を持つ人間のAPI呼び出し元は、creator を使用して、作成者の権限でセッションを実行できます。
トリガーとアクション
triggers のいずれかがイベントに一致すると発火し、actions が実行されます (たとえば、プロンプトを指定して Devin セッションを開始します) 。サポートされるトリガーイベントの種類、各イベントの条件フィールドと演算子、イベントの種類ごとに利用可能な応答動詞については、イベントスキーマエンドポイントを参照してください。
トリガーの conditions は、{field, operator, value} 形式の条件を {"any": [{"all": [...]}]} という2層のエンベロープで指定します。null の条件オブジェクトは、すべてのイベントに一致します。
Webhook トリガー
webhook:incoming トリガーを持つ自動化 (最大1つ) には、作成時に受信 URL とシークレットが割り当てられます。更新時に webhook トリガーを再追加すると、シークレットが再発行されて返されます。シークレットは再取得できないため、受け取った時点で保存してください。外部システムは、これを X-Webhook-Secret ヘッダーで送信します。承認
サービスユーザーの認証情報(接頭辞: cog_)
パスパラメータ
組織 ID(プレフィックス: org-)
"org-abc123def456"
ボディ
空であってはなりません。制約: start_sessionは最大1つ、monitor_sessionは唯一のアクションである必要があります。
- AutomationStartSessionAction
- AutomationMessageSessionAction
- AutomationMonitorSessionAction
Show child attributes
Show child attributes
1 - 500必須: 生成されるセッションの実行 ID(組織または作成者)を明示的に選択します。
- AutomationRunAsOrganization
- AutomationRunAsCreator
Show child attributes
Show child attributes
いずれかのトリガーが一致した場合に、イベントごとに 1 回発生します。webhook:incoming トリガーは最大 1 つです。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
自動化の整理やフィルタリングに使用する、組織内で表示されるキーと値のラベル。最大16組、キーは最大32文字、値は最大128文字。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
自動化自体のセキュリティプロファイルのバインド。省略した場合は org/enterprise から継承します。セキュリティプロファイルの管理権限が必要です。
Show child attributes
Show child attributes
この自動化が生成するセッションに適用されます。
Show child attributes
Show child attributes
作成時のみ使用する来歴マーカー。ID は templates エンドポイントで解決します。設定済みで tools.mcp_servers が省略されている場合は、テンプレートの required_mcps が適用されます。
Show child attributes
Show child attributes
レスポンス
成功レスポンス
- AutomationStartSessionAction
- AutomationMessageSessionAction
- AutomationMonitorSessionAction
Show child attributes
Show child attributes
アクションまたはリソースに紐付けられたユーザーまたはサービスユーザーのプリンシパル。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
アクションまたはリソースに紐付けられたユーザーまたはサービスユーザーのプリンシパル。
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
Show child attributes
生成されるセッションの実行 ID。organization: org の自動化 ID(アプリ内の System User)— セッションはシステム権限を使用するため、個人用(ユーザースコープ)の接続でインストールされた MCPサーバーは選択できません。また、自動化を organization に切り替えると、それらは選択対象から除外されます。creator: 個人用自動化 — 作成者自身の権限で実行され、作成者と org 管理者にのみ表示されます。サービスユーザーが作成した自動化では使用できません。作成時に必須です。更新時に null を指定すると organization にリセットされます。
- AutomationRunAsOrganization
- AutomationRunAsCreator
Show child attributes
Show child attributes
自動化のセキュリティプロファイルのバインドと、解決された適用プロファイル。組織でセキュリティプロファイルが有効化されていない場合は null。
Show child attributes
Show child attributes
この自動化が生成するすべてのセッション(監視セッションを含む)に適用されます。
Show child attributes
Show child attributes
Show child attributes
Show child attributes

