自動化を作成する
curl --request POST \
--url https://api.devin.ai/v3/organizations/{org_id}/automations \
--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": [
{
"prompt": "<string>",
"type": "start_session",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
},
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"run_as": {
"type": "organization"
},
"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>"
},
"slack_reply_access": "slack_users",
"teams_reply_access": "teams_users",
"template_id": "<string>",
"script_check": {
"runtime": "<string>",
"source": "<string>",
"timeout_seconds": 60,
"secret_names": [
"<string>"
],
"enabled": true
},
"llm_check": {
"filter_prompt": "<string>",
"enabled": true
}
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations"
payload = {
"name": "<string>",
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"managed_webhook_id": "<string>",
"replies": []
}
],
"actions": [
{
"prompt": "<string>",
"type": "start_session",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": False,
"notifications": {
"slack": { "channel_id": "<string>" },
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"run_as": { "type": "organization" },
"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>" },
"slack_reply_access": "slack_users",
"teams_reply_access": "teams_users",
"template_id": "<string>",
"script_check": {
"runtime": "<string>",
"source": "<string>",
"timeout_seconds": 60,
"secret_names": ["<string>"],
"enabled": True
},
"llm_check": {
"filter_prompt": "<string>",
"enabled": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
managed_webhook_id: '<string>',
replies: []
}
],
actions: [
{
prompt: '<string>',
type: 'start_session',
session: {
repos: [],
tags: [],
playbook_id: '<string>',
platform: '<string>',
bypass_approval: false,
notifications: {
slack: {channel_id: '<string>'},
teams: {team_id: '<string>', channel_id: '<string>'}
}
}
}
],
run_as: {type: 'organization'},
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>'},
slack_reply_access: 'slack_users',
teams_reply_access: 'teams_users',
template_id: '<string>',
script_check: {
runtime: '<string>',
source: '<string>',
timeout_seconds: 60,
secret_names: ['<string>'],
enabled: true
},
llm_check: {filter_prompt: '<string>', enabled: true}
})
};
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([
'name' => '<string>',
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'managed_webhook_id' => '<string>',
'replies' => [
]
]
],
'actions' => [
[
'prompt' => '<string>',
'type' => 'start_session',
'session' => [
'repos' => [
],
'tags' => [
],
'playbook_id' => '<string>',
'platform' => '<string>',
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
],
'teams' => [
'team_id' => '<string>',
'channel_id' => '<string>'
]
]
]
]
],
'run_as' => [
'type' => 'organization'
],
'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>'
],
'slack_reply_access' => 'slack_users',
'teams_reply_access' => 'teams_users',
'template_id' => '<string>',
'script_check' => [
'runtime' => '<string>',
'source' => '<string>',
'timeout_seconds' => 60,
'secret_names' => [
'<string>'
],
'enabled' => true
],
'llm_check' => [
'filter_prompt' => '<string>',
'enabled' => true
]
]),
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 \"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 \"prompt\": \"<string>\",\n \"type\": \"start_session\",\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 \"run_as\": {\n \"type\": \"organization\"\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 \"slack_reply_access\": \"slack_users\",\n \"teams_reply_access\": \"teams_users\",\n \"template_id\": \"<string>\",\n \"script_check\": {\n \"runtime\": \"<string>\",\n \"source\": \"<string>\",\n \"timeout_seconds\": 60,\n \"secret_names\": [\n \"<string>\"\n ],\n \"enabled\": true\n },\n \"llm_check\": {\n \"filter_prompt\": \"<string>\",\n \"enabled\": true\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 \"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 \"prompt\": \"<string>\",\n \"type\": \"start_session\",\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 \"run_as\": {\n \"type\": \"organization\"\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 \"slack_reply_access\": \"slack_users\",\n \"teams_reply_access\": \"teams_users\",\n \"template_id\": \"<string>\",\n \"script_check\": {\n \"runtime\": \"<string>\",\n \"source\": \"<string>\",\n \"timeout_seconds\": 60,\n \"secret_names\": [\n \"<string>\"\n ],\n \"enabled\": true\n },\n \"llm_check\": {\n \"filter_prompt\": \"<string>\",\n \"enabled\": true\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 \"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 \"prompt\": \"<string>\",\n \"type\": \"start_session\",\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 \"run_as\": {\n \"type\": \"organization\"\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 \"slack_reply_access\": \"slack_users\",\n \"teams_reply_access\": \"teams_users\",\n \"template_id\": \"<string>\",\n \"script_check\": {\n \"runtime\": \"<string>\",\n \"source\": \"<string>\",\n \"timeout_seconds\": 60,\n \"secret_names\": [\n \"<string>\"\n ],\n \"enabled\": true\n },\n \"llm_check\": {\n \"filter_prompt\": \"<string>\",\n \"enabled\": true\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>"
}自動化(組織)
自動化を作成する
トリガーとアクションを含む新しい自動化を作成します。
POST
/
v3
/
organizations
/
{org_id}
/
automations
自動化を作成する
curl --request POST \
--url https://api.devin.ai/v3/organizations/{org_id}/automations \
--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": [
{
"prompt": "<string>",
"type": "start_session",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": false,
"notifications": {
"slack": {
"channel_id": "<string>"
},
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"run_as": {
"type": "organization"
},
"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>"
},
"slack_reply_access": "slack_users",
"teams_reply_access": "teams_users",
"template_id": "<string>",
"script_check": {
"runtime": "<string>",
"source": "<string>",
"timeout_seconds": 60,
"secret_names": [
"<string>"
],
"enabled": true
},
"llm_check": {
"filter_prompt": "<string>",
"enabled": true
}
}
'import requests
url = "https://api.devin.ai/v3/organizations/{org_id}/automations"
payload = {
"name": "<string>",
"triggers": [
{
"conditions": { "any": [{ "all": [
{
"field": "<string>",
"value": "<string>"
}
] }] },
"managed_webhook_id": "<string>",
"replies": []
}
],
"actions": [
{
"prompt": "<string>",
"type": "start_session",
"session": {
"repos": [],
"tags": [],
"playbook_id": "<string>",
"platform": "<string>",
"bypass_approval": False,
"notifications": {
"slack": { "channel_id": "<string>" },
"teams": {
"team_id": "<string>",
"channel_id": "<string>"
}
}
}
}
],
"run_as": { "type": "organization" },
"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>" },
"slack_reply_access": "slack_users",
"teams_reply_access": "teams_users",
"template_id": "<string>",
"script_check": {
"runtime": "<string>",
"source": "<string>",
"timeout_seconds": 60,
"secret_names": ["<string>"],
"enabled": True
},
"llm_check": {
"filter_prompt": "<string>",
"enabled": True
}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
triggers: [
{
conditions: {any: [{all: [{field: '<string>', value: '<string>'}]}]},
managed_webhook_id: '<string>',
replies: []
}
],
actions: [
{
prompt: '<string>',
type: 'start_session',
session: {
repos: [],
tags: [],
playbook_id: '<string>',
platform: '<string>',
bypass_approval: false,
notifications: {
slack: {channel_id: '<string>'},
teams: {team_id: '<string>', channel_id: '<string>'}
}
}
}
],
run_as: {type: 'organization'},
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>'},
slack_reply_access: 'slack_users',
teams_reply_access: 'teams_users',
template_id: '<string>',
script_check: {
runtime: '<string>',
source: '<string>',
timeout_seconds: 60,
secret_names: ['<string>'],
enabled: true
},
llm_check: {filter_prompt: '<string>', enabled: true}
})
};
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([
'name' => '<string>',
'triggers' => [
[
'conditions' => [
'any' => [
[
'all' => [
[
'field' => '<string>',
'value' => '<string>'
]
]
]
]
],
'managed_webhook_id' => '<string>',
'replies' => [
]
]
],
'actions' => [
[
'prompt' => '<string>',
'type' => 'start_session',
'session' => [
'repos' => [
],
'tags' => [
],
'playbook_id' => '<string>',
'platform' => '<string>',
'bypass_approval' => false,
'notifications' => [
'slack' => [
'channel_id' => '<string>'
],
'teams' => [
'team_id' => '<string>',
'channel_id' => '<string>'
]
]
]
]
],
'run_as' => [
'type' => 'organization'
],
'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>'
],
'slack_reply_access' => 'slack_users',
'teams_reply_access' => 'teams_users',
'template_id' => '<string>',
'script_check' => [
'runtime' => '<string>',
'source' => '<string>',
'timeout_seconds' => 60,
'secret_names' => [
'<string>'
],
'enabled' => true
],
'llm_check' => [
'filter_prompt' => '<string>',
'enabled' => true
]
]),
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 \"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 \"prompt\": \"<string>\",\n \"type\": \"start_session\",\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 \"run_as\": {\n \"type\": \"organization\"\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 \"slack_reply_access\": \"slack_users\",\n \"teams_reply_access\": \"teams_users\",\n \"template_id\": \"<string>\",\n \"script_check\": {\n \"runtime\": \"<string>\",\n \"source\": \"<string>\",\n \"timeout_seconds\": 60,\n \"secret_names\": [\n \"<string>\"\n ],\n \"enabled\": true\n },\n \"llm_check\": {\n \"filter_prompt\": \"<string>\",\n \"enabled\": true\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 \"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 \"prompt\": \"<string>\",\n \"type\": \"start_session\",\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 \"run_as\": {\n \"type\": \"organization\"\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 \"slack_reply_access\": \"slack_users\",\n \"teams_reply_access\": \"teams_users\",\n \"template_id\": \"<string>\",\n \"script_check\": {\n \"runtime\": \"<string>\",\n \"source\": \"<string>\",\n \"timeout_seconds\": 60,\n \"secret_names\": [\n \"<string>\"\n ],\n \"enabled\": true\n },\n \"llm_check\": {\n \"filter_prompt\": \"<string>\",\n \"enabled\": true\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 \"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 \"prompt\": \"<string>\",\n \"type\": \"start_session\",\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 \"run_as\": {\n \"type\": \"organization\"\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 \"slack_reply_access\": \"slack_users\",\n \"teams_reply_access\": \"teams_users\",\n \"template_id\": \"<string>\",\n \"script_check\": {\n \"runtime\": \"<string>\",\n \"source\": \"<string>\",\n \"timeout_seconds\": 60,\n \"secret_names\": [\n \"<string>\"\n ],\n \"enabled\": true\n },\n \"llm_check\": {\n \"filter_prompt\": \"<string>\",\n \"enabled\": true\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 権限を持つサービスユーザーまたはパーソナルアクセストークンが必要です。
実行アイデンティティ
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 ヘッダーで送信します。ボディ
application/json
actions
(AutomationStartSessionAction · object | AutomationMessageSessionAction · object | AutomationMonitorSessionAction · object)[]
必須
空であってはなりません。上限: start_session は最大 1 つ、monitor_session は唯一のアクションである必要があります。
- AutomationStartSessionAction
- AutomationMessageSessionAction
- AutomationMonitorSessionAction
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

