> ## 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.

# Create schedule

> Create a new scheduled session.

**Deprecated.** Schedules are superseded by Automations: create an automation with a `schedule:recurring` trigger via `POST /v3/organizations/{org_id}/automations` instead. For organizations migrated to Automations this endpoint returns `403`; existing schedules remain readable, updatable, and deletable.

<Warning>
  **Deprecated.** Schedules are superseded by [Automations](/api-reference/v3/automations/post-organizations-automations). Create scheduled work as an automation with a `schedule:recurring` trigger via `POST /v3/organizations/{org_id}/automations`. Starting September 24, 2026, this endpoint returns `403` for organizations migrated to Automations; organizations still being migrated keep schedule creation until their migration completes.
</Warning>

## Permissions

Requires a [service user](/api-reference/v3/service-users/members-service-users) or [personal access token](/api-reference/personal-access-tokens) with the `ManageOrgSchedules` permission at the organization level.

## Schedule type

The `schedule_type` field controls whether the schedule is recurring or one-time:

* `recurring` (default) — Requires the `frequency` field with a cron expression
* `one_time` — Requires the `scheduled_at` field with an ISO 8601 datetime in the future

## Frequency

For recurring schedules, the `frequency` field accepts a standard cron expression (e.g., `0 9 * * 1-5` for weekdays at 9 AM UTC).

## Scheduled at

For one-time schedules, the `scheduled_at` field accepts an ISO 8601 datetime with timezone (e.g., `2026-03-01T09:00:00Z`). The datetime must be in the future. After execution, the schedule is automatically disabled.

## Agent types

| Agent | Description |
| - | - |
| `devin` | Standard Devin agent (default) |
| `data_analyst` | Data analyst agent |

Other `agent` values are rejected with a `422` validation error.

## User impersonation

The `create_as_user_id` parameter allows creating a schedule on behalf of another user. This requires:

1. The service user must have `ImpersonateOrgSessions` permission
2. The target user must be a member of the organization
3. The target user must have `UseDevinSessions` permission


## OpenAPI

````yaml v3-openapi.yaml POST /v3/organizations/{org_id}/schedules
openapi: 3.1.0
info:
  description: Devin v3 API with Service User authentication and RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/organizations/{org_id}/schedules:
    post:
      tags:
        - schedules
      summary: Create schedule
      description: >-
        Create a new scheduled session.


        **Deprecated.** Schedules are superseded by Automations: create an
        automation with a `schedule:recurring` trigger via `POST
        /v3/organizations/{org_id}/automations` instead. For organizations
        migrated to Automations this endpoint returns `403`; existing schedules
        remain readable, updatable, and deletable.
      operationId: handle_create_schedule_v3_organizations__org_id__schedules_post
      parameters:
        - description: 'Organization ID (prefix: 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: Successful Response
        '401':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unauthorized
        '403':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Forbidden
        '404':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Not Found
        '409':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Conflict
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Unprocessable Content
        '429':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ProblemDetail'
          description: Too Many Requests
      deprecated: true
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 platform for sessions spawned by this schedule (e.g. 'windows').
            When omitted, sessions fall back to the org's default platform at
            trigger time. Value must match a platform configured for the
            organization (case-insensitive); unknown values are rejected with a
            400 that lists the available platform labels.
          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
        skill_ref:
          anyOf:
            - $ref: '#/components/schemas/SkillReference'
            - type: 'null'
          description: >-
            Exact skill the sessions run with. Use instead of playbook_id for
            new configurations.
        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
        skill_ref:
          anyOf:
            - $ref: '#/components/schemas/SkillReference'
            - type: 'null'
          description: >-
            Exact skill the sessions run with. Use instead of playbook_id for
            new configurations.
        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: >-
        RFC 9457 application/problem+json error body for the v3 API.


        detail is retained from the legacy {"detail": ...} body for back-compat;
        the

        other members are additive. errors carries field-level validation
        failures

        (422 only).
      properties:
        detail:
          anyOf:
            - type: string
            - type: 'null'
          description: A human-readable explanation specific to this occurrence.
          title: Detail
        error_code:
          anyOf:
            - type: string
            - type: 'null'
          description: >-
            Machine-readable code for blocked-action refusals (e.g.
            "user_frozen", "migrated_session").
          title: Error Code
        errors:
          anyOf:
            - items:
                additionalProperties: true
                type: object
              type: array
            - type: 'null'
          description: Field-level validation errors (422 responses only).
          title: Errors
        instance:
          anyOf:
            - type: string
            - type: 'null'
          description: A URI reference (the request path) for this occurrence.
          title: Instance
        status:
          description: The HTTP status code.
          title: Status
          type: integer
        title:
          description: A short, human-readable summary of the problem type.
          title: Title
          type: string
        type:
          default: about:blank
          description: A URI reference identifying the problem type.
          title: Type
          type: string
      required:
        - title
        - status
      title: ProblemDetail
      type: object
    SkillReference:
      description: 'One exact skill: the plugin that ships it plus the skill''s name.'
      properties:
        plugin_identity:
          description: >-
            The plugin that ships the skill: the id of a bundle uploaded by the
            organization, e.g. 'org-playbooks', or the URL of a git plugin, e.g.
            'https://github.com/acme/tools'.
          maxLength: 256
          minLength: 1
          title: Plugin Identity
          type: string
        skill_name:
          description: Name of the skill inside that plugin.
          maxLength: 128
          minLength: 1
          title: Skill Name
          type: string
      required:
        - plugin_identity
        - skill_name
      title: SkillReference
      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: 'Service User credential (prefix: cog_)'
      scheme: bearer
      type: http

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.