> ## Documentation Index
> Fetch the complete documentation index at: https://docs.devin.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# スケジュールを作成

> 新しいスケジュールされたセッションを作成します。

<Warning>
  **非推奨。** スケジュール は [自動化](/ja/api-reference/v3/automations/post-organizations-automations) に置き換えられました。スケジュール実行する作業は、`schedule:recurring` トリガーを使用する自動化として作成してください。2026年9月24日以降、このエンドポイントは自動化へ移行済みの組織に対して `403` を返します。移行中の組織では、移行が完了するまでスケジュールの作成が引き続き利用できます。
</Warning>

<div id="permissions">
  ## 権限
</div>

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

<div id="schedule-type">
  ## スケジュールタイプ
</div>

`schedule_type` フィールドは、スケジュールが繰り返しか一度きりかを指定します:

* `recurring` (デフォルト) — cron 式を指定した `frequency` フィールドが必要
* `one_time` — 将来時刻の ISO 8601 形式の日時を指定した `scheduled_at` フィールドが必要

<div id="frequency">
  ## Frequency
</div>

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

<div id="scheduled-at">
  ## Scheduled at
</div>

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

<div id="agent-types">
  ## エージェントの種類
</div>

| エージェント         | 説明                        |
| -------------- | ------------------------- |
| `devin`        | 標準的な Devin エージェント (デフォルト) |
| `data_analyst` | データアナリスト用エージェント           |

これ以外の `agent` の値は `422` バリデーションエラーで拒否されます。

<div id="user-impersonation">
  ## ユーザーなりすまし
</div>

`create_as_user_id` パラメータを使用すると、別のユーザーに代わってスケジュールを作成できます。これには次の要件を満たす必要があります。

1. サービスユーザーが `ImpersonateOrgSessions` 権限を持っていること
2. 対象ユーザーが組織のメンバーであること
3. 対象ユーザーが `UseDevinSessions` 権限を持っていること


## OpenAPI

````yaml ja/v3-openapi.yaml POST /v3/organizations/{org_id}/schedules
openapi: 3.1.0
info:
  description: Service User 認証および RBAC に対応した Devin v3 API
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/organizations/{org_id}/schedules:
    post:
      tags:
        - schedules
      summary: スケジュールを作成
      description: 新しいスケジュールされたセッションを作成します。
      operationId: handle_create_schedule_v3_organizations__org_id__schedules_post
      parameters:
        - description: '組織ID（プレフィックス: org-）'
          in: path
          name: org_id
          required: true
          schema:
            example: org-abc123def456
            title: Org Id
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/ScheduleCreateRequest'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduleResponse'
          description: 成功時のレスポンス
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 未認証
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: アクセス禁止
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 見つかりません
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 競合
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: 処理できないコンテンツ
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: リクエストが多すぎます
components:
  schemas:
    ScheduleCreateRequest:
      properties:
        agent:
          default: devin
          enum:
            - devin
            - data_analyst
          title: Agent
          type: string
        bypass_approval:
          default: false
          title: Bypass Approval
          type: boolean
        create_as_user_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Create As User Id
        frequency:
          anyOf:
            - type: string
            - type: 'null'
          title: Frequency
        interval_count:
          default: 1
          title: Interval Count
          type: integer
        name:
          title: Name
          type: string
        notify_on:
          default: failure
          enum:
            - always
            - failure
            - never
          title: Notify On
          type: string
        platform:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            このスケジュールで生成されるセッションのVMプラットフォーム（例:
            'windows'）。省略した場合、セッションはトリガー時に組織のデフォルトプラットフォームを使用します。値は組織に設定されているプラットフォームと一致している必要があります（大文字・小文字は区別されません）。不明な値は、利用可能なプラットフォームラベルを一覧表示した400エラーで拒否されます。
          title: Platform
        playbook_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Playbook Id
        prompt:
          title: Prompt
          type: string
        schedule_type:
          default: recurring
          enum:
            - recurring
            - one_time
          title: Schedule Type
          type: string
        scheduled_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Scheduled At
        slack_channel_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Channel Id
        slack_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Team Id
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        target_devin_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Devin Id
      required:
        - name
        - prompt
      title: ScheduleCreateRequest
      type: object
    ScheduleResponse:
      properties:
        agent:
          enum:
            - devin
            - data_analyst
          title: Agent
          type: string
        bypass_approval:
          default: false
          title: Bypass Approval
          type: boolean
        consecutive_failures:
          title: Consecutive Failures
          type: integer
        created_at:
          format: date-time
          title: Created At
          type: string
        created_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Created By
        enabled:
          title: Enabled
          type: boolean
        frequency:
          anyOf:
            - type: string
            - type: 'null'
          title: Frequency
        interval_count:
          default: 1
          title: Interval Count
          type: integer
        last_edited_by:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Edited By
        last_error_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Error At
        last_error_message:
          anyOf:
            - type: string
            - type: 'null'
          title: Last Error Message
        last_executed_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Last Executed At
        name:
          title: Name
          type: string
        notify_on:
          enum:
            - always
            - failure
            - never
          title: Notify On
          type: string
        org_id:
          title: Org Id
          type: string
        platform:
          anyOf:
            - type: string
            - type: 'null'
          title: Platform
        playbook:
          anyOf:
            - $ref: '#/components/schemas/PlaybookInfo'
            - type: 'null'
        prompt:
          title: Prompt
          type: string
        schedule_type:
          default: recurring
          enum:
            - recurring
            - one_time
          title: Schedule Type
          type: string
        scheduled_at:
          anyOf:
            - format: date-time
              type: string
            - type: 'null'
          title: Scheduled At
        scheduled_session_id:
          title: Scheduled Session Id
          type: string
        slack_channel_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Channel Id
        slack_team_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Slack Team Id
        tags:
          anyOf:
            - items:
                type: string
              type: array
            - type: 'null'
          title: Tags
        target_devin_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Target Devin Id
        updated_at:
          format: date-time
          title: Updated At
          type: string
      required:
        - scheduled_session_id
        - org_id
        - created_by
        - name
        - prompt
        - playbook
        - frequency
        - enabled
        - last_executed_at
        - created_at
        - updated_at
        - last_error_at
        - last_error_message
        - consecutive_failures
        - notify_on
        - agent
      title: ScheduleResponse
      type: object
    ProblemDetail:
      description: >-
        v3 API 用の RFC 9457 application/problem+json エラーボディ。


        detail は後方互換性のため、レガシーな {"detail": ...}
        ボディから引き継がれます。その他のメンバーは追加式です。errors にはフィールドレベルのバリデーションエラーが含まれます（422
        の場合のみ）。
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: この事象に固有の、人が読める説明。
          title: Detail
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: フィールド単位のバリデーションエラー（422 レスポンスのみ）。
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: この発生箇所の URI 参照（リクエストパス）。
          title: Instance
        status:
          description: HTTP ステータスコード。
          title: Status
          type: integer
        title:
          description: 問題タイプを人が読める短い要約。
          title: Title
          type: string
        type:
          default: about:blank
          description: 問題タイプを識別する URI 参照。
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    PlaybookInfo:
      properties:
        playbook_id:
          title: Playbook Id
          type: string
        title:
          anyOf:
            - type: string
            - type: 'null'
          title: Title
      required:
        - playbook_id
        - title
      title: PlaybookInfo
      type: object
  securitySchemes:
    bearerAuth:
      description: 'サービスユーザーの認証情報（接頭辞: cog_）'
      scheme: bearer
      type: http

````