メインコンテンツへスキップ
POST
スケジュールを作成

権限

組織レベルで ManageOrgSchedules 権限が付与されたサービスユーザーが必要です。

スケジュールタイプ

schedule_type フィールドは、スケジュールが繰り返しか一度きりかを指定します:
  • recurring (デフォルト) — cron 式を指定した frequency フィールドが必要
  • one_time — 将来時刻の ISO 8601 形式の日時を指定した scheduled_at フィールドが必要

Frequency

繰り返しのスケジュールの場合、frequency フィールドでは、標準的な cron 式を指定できます(例: 平日の午前 9 時(UTC)の場合は 0 9 * * 1-5)。

Scheduled at

1 回限りのスケジュールの場合、scheduled_at フィールドにはタイムゾーン付きの ISO 8601 形式の日時(例: 2026-03-01T09:00:00Z)を指定します。日時は未来の時刻である必要があります。実行後、スケジュールは自動的に無効になります。

エージェントの種類

ユーザーなりすまし

create_as_user_id パラメータを使用すると、別のユーザーに代わってスケジュールを作成できます。これには次の要件を満たす必要があります。
  1. サービスユーザーが ImpersonateOrgSessions 権限を持っていること
  2. 対象ユーザーが組織のメンバーであること
  3. 対象ユーザーが UseDevinSessions 権限を持っていること

承認

Authorization
string
header
必須

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

パスパラメータ

org_id
string
必須

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

:

"org-abc123def456"

ボディ

application/json
name
string
必須
prompt
string
必須
agent
enum<string>
デフォルト:devin
利用可能なオプション:
devin,
data_analyst
bypass_approval
boolean
デフォルト:false
create_as_user_id
string | null
frequency
string | null
interval_count
integer
デフォルト:1
notify_on
enum<string>
デフォルト:failure
利用可能なオプション:
always,
failure,
never
platform
string | null

このスケジュールで生成されるセッションのVMプラットフォーム(例: 'windows')。省略した場合、セッションはトリガー時に組織のデフォルトプラットフォームを使用します。値は組織に設定されているプラットフォームと一致している必要があります(大文字・小文字は区別されません)。不明な値は、利用可能なプラットフォームラベルを一覧表示した400エラーで拒否されます。

playbook_id
string | null
schedule_type
enum<string>
デフォルト:recurring
利用可能なオプション:
recurring,
one_time
scheduled_at
string<date-time> | null
slack_channel_id
string | null
slack_team_id
string | null
tags
string[] | null
target_devin_id
string | null

レスポンス

成功時のレスポンス

agent
enum<string>
必須
利用可能なオプション:
devin,
data_analyst
consecutive_failures
integer
必須
created_at
string<date-time>
必須
created_by
string | null
必須
enabled
boolean
必須
frequency
string | null
必須
last_error_at
string<date-time> | null
必須
last_error_message
string | null
必須
last_executed_at
string<date-time> | null
必須
name
string
必須
notify_on
enum<string>
必須
利用可能なオプション:
always,
failure,
never
org_id
string
必須
playbook
PlaybookInfo · object | null
必須
prompt
string
必須
scheduled_session_id
string
必須
updated_at
string<date-time>
必須
bypass_approval
boolean
デフォルト:false
interval_count
integer
デフォルト:1
last_edited_by
string | null
platform
string | null
schedule_type
enum<string>
デフォルト:recurring
利用可能なオプション:
recurring,
one_time
scheduled_at
string<date-time> | null
slack_channel_id
string | null
slack_team_id
string | null
tags
string[] | null
target_devin_id
string | null