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

# Create a scheduled agentic automation

> Create a scheduled automation for an agent. The automation fires on the given cron schedule and runs the agent. `agent_id` is in the body. Schedules must fire at most once every 15 minutes.



## OpenAPI

````yaml post /agentic-automations/scheduled
openapi: 3.0.3
info:
  version: 0.1.1
  title: Datagrid API
  description: Datagrid API
servers:
  - url: https://api.datagrid.com/v1
security:
  - BearerAuth: []
paths:
  /agentic-automations/scheduled:
    post:
      tags:
        - Agentic Automations
      summary: Create a scheduled agentic automation
      description: >-
        Create a scheduled automation for an agent. The automation fires on the
        given cron schedule and runs the agent. `agent_id` is in the body.
        Schedules must fire at most once every 15 minutes.
      operationId: CreateScheduledAgenticAutomation
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateScheduledAgenticAutomationRequest'
      responses:
        '201':
          description: Created automation
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgenticAutomation'
        '400':
          description: >-
            Bad request. The message says which field is wrong. If more than one
            field is wrong, it says the first one. For example, `cron` is not
            five fields or runs more often than every 15 minutes, or the
            timezone is not an IANA name.
        '404':
          description: Not found. The agent is not visible to the caller.
        '429':
          description: >-
            Rate limit exceeded. The request has been throttled because the rate
            limit for this endpoint has been reached. Check the `Retry-After`
            response header and retry after the specified number of seconds.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/RateLimitError'
components:
  schemas:
    CreateScheduledAgenticAutomationRequest:
      type: object
      required:
        - agent_id
        - name
        - cron
      properties:
        agent_id:
          type: string
          description: The ID of the agent this automation runs.
        name:
          type: string
          description: Human-readable name for the automation.
          maxLength: 255
        cron:
          type: string
          description: >-
            Five-field cron expression (minute hour day month day-of-week)
            controlling when the automation fires. Seconds are not supported.
            The schedule must fire at most once every 15 minutes.
          example: 0 9 * * 1
          maxLength: 255
        description:
          type: string
          description: Optional free-text description of what this automation does.
          maxLength: 1000
          nullable: true
        enabled:
          type: boolean
          description: >-
            Whether the automation should be active immediately after creation.
            Defaults to `true` when omitted or null.
          nullable: true
        timezone:
          type: string
          description: >-
            IANA timezone identifier in which `cron` is interpreted. Defaults to
            `"UTC"` when omitted.
          example: America/New_York
          maxLength: 64
          nullable: true
    AgenticAutomation:
      type: object
      required:
        - object
        - id
        - kind
        - agent_id
        - name
        - description
        - enabled
        - output_channel_type
        - output_channel_id
        - creator_user_id
        - last_updated_by_id
        - created_at
        - updated_at
        - last_run_at
        - scheduled
        - app_event
      properties:
        object:
          type: string
          enum:
            - agentic_automation
          description: The object type, always 'agentic_automation'.
        id:
          type: string
          description: Unique identifier for the automation.
        kind:
          type: string
          enum:
            - scheduled
          description: What the automation is. `scheduled` for this route.
        agent_id:
          type: string
          description: The ID of the agent this automation runs.
        name:
          type: string
          description: Human-readable name of the automation.
        description:
          type: string
          description: Free-text description of what this automation does.
          nullable: true
        enabled:
          type: boolean
          description: >-
            Whether the automation is active. When `false` the schedule is
            paused.
        output_channel_type:
          type: string
          description: >-
            Additional delivery transport, when one is stored. Not set by this
            route.
          nullable: true
        output_channel_id:
          type: string
          description: >-
            Additional delivery address, when one is stored. Not set by this
            route.
          nullable: true
        creator_user_id:
          type: string
          description: The user who created the automation.
        last_updated_by_id:
          type: string
          description: The user who last updated the automation.
        created_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of when the automation was created.
        updated_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the last modification.
        last_run_at:
          type: string
          format: date-time
          description: ISO 8601 timestamp of the latest run. Null until a run exists.
          nullable: true
        scheduled:
          type: object
          required:
            - cron
            - cron_description
            - timezone
            - thread_mode
            - destination_type
            - destination_id
          properties:
            cron:
              type: string
              description: Five-field cron expression the automation fires on.
              example: 0 9 * * 1
            cron_description:
              type: string
              description: Human-readable reading of `cron`, when one is stored.
              nullable: true
            timezone:
              type: string
              description: IANA timezone `cron` is interpreted in.
              example: UTC
            thread_mode:
              type: string
              description: How the run's conversation is reused, when one is stored.
              nullable: true
            destination_type:
              type: string
              description: Datagrid conversation destination, when one is stored.
              nullable: true
            destination_id:
              type: string
              description: Datagrid conversation destination id, when one is stored.
              nullable: true
        app_event:
          type: object
          description: App-event fields. Null for a scheduled automation.
          nullable: true
    RateLimitError:
      type: object
      description: >-
        Returned when the rate limit is exceeded. Rate limits are enforced per
        teamspace, endpoint path, and HTTP method over a 60-second sliding
        window. Each endpoint may have its own limit — check the
        X-RateLimit-Limit response header for the effective value.
      required:
        - error
        - message
        - retryable
        - status_code
      properties:
        status_code:
          type: integer
          description: The HTTP status code (429).
        statusCode:
          type: integer
          deprecated: true
          description: Deprecated. Use status_code instead.
        error:
          type: string
          enum:
            - rate_limit_exceeded
          description: The error code identifying this as a rate limit error.
        message:
          type: string
          description: A human-readable error message.
        mitigation:
          type: string
          description: Suggested action to resolve the error.
        retryable:
          type: boolean
          description: Whether the request can be retried after a delay.
        details:
          type: object
          properties:
            reason:
              type: string
              description: A detailed explanation of why the rate limit was exceeded.
  securitySchemes:
    BearerAuth:
      type: http
      scheme: bearer

````

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