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

# Zeitplan erstellen

> Eine neue geplante Sitzung anlegen.

<div id="permissions">
  ## Berechtigungen
</div>

Erfordert einen Servicebenutzer mit der Berechtigung `ManageOrgSchedules` auf Organisationsebene.

<div id="schedule-type">
  ## Zeitplantyp
</div>

Das Feld `schedule_type` gibt an, ob der Zeitplan wiederkehrend oder einmalig ist:

* `recurring` (Standard) — Erfordert das Feld `frequency` mit einem Cron-Ausdruck
* `one_time` — Erfordert das Feld `scheduled_at` mit einem zukünftigen Datum/Uhrzeitwert im ISO-8601-Format

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

Für wiederkehrende Zeitpläne akzeptiert das Feld `frequency` einen Standard-Cron-Ausdruck (z. B. `0 9 * * 1-5` für Werktage um 9:00 Uhr UTC).

<div id="scheduled-at">
  ## Ausführungszeitpunkt
</div>

Für einmalige Zeitpläne akzeptiert das Feld `scheduled_at` einen ISO-8601-Datum-Uhrzeit-Wert mit Zeitzone (z. B. `2026-03-01T09:00:00Z`). Dieser Zeitpunkt muss in der Zukunft liegen. Nach der Ausführung wird der Zeitplan automatisch deaktiviert.

<div id="agent-types">
  ## Agententypen
</div>

| Agent          | Beschreibung                         |
| -------------- | ------------------------------------ |
| `devin`        | Standard-Devin-Agent (Standardagent) |
| `data_analyst` | Datenanalyse-Agent                   |
| `advanced`     | Fortgeschrittener Agent              |

<div id="user-impersonation">
  ## Benutzer-Impersonation
</div>

Der Parameter `create_as_user_id` ermöglicht es, einen Zeitplan im Namen eines anderen Benutzers zu erstellen. Dafür müssen folgende Voraussetzungen erfüllt sein:

1. Der Servicebenutzer muss die Berechtigung `ImpersonateOrgSessions` haben
2. Der Zielbenutzer muss Mitglied der Organisation sein
3. Der Zielbenutzer muss die Berechtigung `UseDevinSessions` haben


## OpenAPI

````yaml de/v3-openapi.yaml POST /v3/organizations/{org_id}/schedules
openapi: 3.1.0
info:
  description: Devin v3 API mit Service-User-Authentifizierung und RBAC
  title: Devin API v3
  version: 3.0.0
servers: []
security:
  - bearerAuth: []
paths:
  /v3/organizations/{org_id}/schedules:
    post:
      tags:
        - schedules
      summary: Zeitplan erstellen
      description: Eine neue geplante Sitzung anlegen.
      operationId: handle_create_schedule_v3_organizations__org_id__schedules_post
      parameters:
        - description: 'Organisations-ID (Präfix: 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: Antwort bei Erfolg
        '422':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
          description: Validierungsfehler
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-Plattform für Sitzungen, die durch diesen Zeitplan gestartet
            werden (z. B. 'windows'). Wenn kein Wert angegeben ist, verwenden
            Sitzungen zum Auslösezeitpunkt die Standardplattform der
            Organisation. Der Wert muss mit einer für die Organisation
            konfigurierten Plattform übereinstimmen (Groß-/Kleinschreibung wird
            nicht beachtet); unbekannte Werte werden mit einem 400-Fehler
            abgelehnt, der die verfügbaren Plattformbezeichnungen auflistet.
          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
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          title: Detail
          type: array
      title: HTTPValidationError
      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
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          title: Location
          type: array
        msg:
          title: Message
          type: string
        type:
          title: Error Type
          type: string
      required:
        - loc
        - msg
        - type
      title: ValidationError
      type: object
  securitySchemes:
    bearerAuth:
      description: 'Servicebenutzer-Anmeldedaten (Präfix: cog_)'
      scheme: bearer
      type: http

````