Skip to main content
POST
自動化を作成

権限

組織レベルで 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 ヘッダーで送信します。

承認

Authorization
string
header
必須

サービスユーザーの認証情報(接頭辞: cog_)

パスパラメータ

org_id
string
必須

組織 ID(プレフィックス: org-)

:

"org-abc123def456"

ボディ

application/json
actions
(AutomationStartSessionAction · object | AutomationMessageSessionAction · object | AutomationMonitorSessionAction · object)[]
必須

空であってはなりません。制約: start_sessionは最大1つ、monitor_sessionは唯一のアクションである必要があります。

name
string
必須
Required string length: 1 - 500
run_as
AutomationRunAsOrganization · object
必須

必須: 生成されるセッションの実行 ID(組織または作成者)を明示的に選択します。

triggers
AutomationTriggerRequest · object[]
必須

いずれかのトリガーが一致した場合に、イベントごとに 1 回発生します。webhook:incoming トリガーは最大 1 つです。

concurrency
AutomationConcurrency · object | null
enabled
boolean
デフォルト:true
limits
AutomationLimits · object | null
metadata
Metadata · object

自動化の整理やフィルタリングに使用する、組織内で表示されるキーと値のラベル。最大16組、キーは最大32文字、値は最大128文字。

notifications
AutomationNotifications · object | null
security_profile
AutomationSecurityProfileSelection · object | null

自動化自体のセキュリティプロファイルのバインド。省略した場合は org/enterprise から継承します。セキュリティプロファイルの管理権限が必要です。

session_settings
AutomationSessionSettings · object | null

この自動化が生成するセッションに適用されます。

template_id
string | null

作成時のみ使用する来歴マーカー。ID は templates エンドポイントで解決します。設定済みで tools.mcp_servers が省略されている場合は、テンプレートの required_mcps が適用されます。

tools
AutomationTools · object | null

レスポンス

成功レスポンス

actions
(AutomationStartSessionAction · object | AutomationMessageSessionAction · object | AutomationMonitorSessionAction · object)[]
必須
automation_id
string
必須
created_at
integer
必須
created_by
ActorResponse · object
必須

アクションまたはリソースに紐付けられたユーザーまたはサービスユーザーのプリンシパル。

enabled
boolean
必須
name
string
必須
triggers
AutomationTriggerResponse · object[]
必須
updated_at
integer
必須
concurrency
AutomationConcurrency · object | null
last_edited_by
ActorResponse · object | null

アクションまたはリソースに紐付けられたユーザーまたはサービスユーザーのプリンシパル。

last_invocation
AutomationLastInvocation · object | null
limits
AutomationLimits · object | null
metadata
Metadata · object
notifications
AutomationNotifications · object | null
run_as
AutomationRunAsOrganization · object

生成されるセッションの実行 ID。organization: org の自動化 ID(アプリ内の System User)— セッションはシステム権限を使用するため、個人用(ユーザースコープ)の接続でインストールされた MCPサーバーは選択できません。また、自動化を organization に切り替えると、それらは選択対象から除外されます。creator: 個人用自動化 — 作成者自身の権限で実行され、作成者と org 管理者にのみ表示されます。サービスユーザーが作成した自動化では使用できません。作成時に必須です。更新時に null を指定すると organization にリセットされます。

security_profile
AutomationSecurityProfileResponse · object | null

自動化のセキュリティプロファイルのバインドと、解決された適用プロファイル。組織でセキュリティプロファイルが有効化されていない場合は null。

session_settings
AutomationSessionSettings · object | null

この自動化が生成するすべてのセッション(監視セッションを含む)に適用されます。

template_id
string | null
tools
AutomationTools · object | null