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

# List schedules

> Lists an agent's schedules, or with agent_id - the schedules of every agent, newest first, one page at a time.

Minimum role required: Viewer


## OpenAPI

````yaml /api-reference/openapi-backend.json get /agents/{agent_id}/schedules
openapi: 3.1.0
info:
  description: Axilio backend HTTP API.
  title: Axilio API
  version: 0.155.0
servers:
  - url: https://api.axilio.ai/api/v1
    description: Production
security: []
tags:
  - name: Agents
  - name: API Keys
  - name: Billing
  - name: Conversations
  - name: Files
  - name: Messages
  - name: Models
  - name: Organization
  - name: Phones
  - name: Runs
  - name: Sessions
  - name: Skill
  - name: Usage
  - name: Webhooks
paths:
  /agents/{agent_id}/schedules:
    get:
      tags:
        - Agents
      summary: List schedules
      description: >-
        Lists an agent's schedules, or with agent_id - the schedules of every
        agent, newest first, one page at a time.
      operationId: agents_list_schedules
      parameters:
        - description: The agent's id, or - for the schedules of every agent.
          in: path
          name: agent_id
          required: true
          schema:
            description: The agent's id, or - for the schedules of every agent.
            type: string
        - description: Page size.
          explode: false
          in: query
          name: limit
          schema:
            default: 50
            description: Page size.
            format: int64
            maximum: 200
            minimum: 1
            type: integer
        - description: Where the page starts.
          explode: false
          in: query
          name: offset
          schema:
            default: 0
            description: Where the page starts.
            format: int64
            minimum: 0
            type: integer
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/AgentScheduleList'
          description: OK
        '400':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Bad Request
        '403':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Forbidden
        '404':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Not Found
        '422':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Unprocessable Entity
        '500':
          content:
            application/problem+json:
              schema:
                $ref: '#/components/schemas/V2ErrorModel'
          description: Internal Server Error
      security:
        - apiKeyAuth: []
components:
  schemas:
    AgentScheduleList:
      additionalProperties: false
      description: One page of schedules, newest first.
      properties:
        limit:
          description: The page size.
          format: int64
          type: integer
        offset:
          description: Where this page starts.
          format: int64
          type: integer
        schedules:
          description: The schedules on this page.
          items:
            $ref: '#/components/schemas/AgentSchedule'
          type:
            - array
            - 'null'
        total:
          description: How many schedules match.
          format: int64
          type: integer
      required:
        - schedules
        - total
        - limit
        - offset
      type: object
    V2ErrorModel:
      additionalProperties: false
      description: >-
        Error response, following RFC 9457 (Problem Details for HTTP APIs).
        Returned with a application/problem+json content type.
      properties:
        detail:
          description: >-
            A human-readable explanation specific to this occurrence of the
            problem.
          examples:
            - Property foo is required but is missing.
          type: string
        errors:
          description: Optional list of individual error details
          items:
            $ref: '#/components/schemas/V2ErrorDetail'
          type:
            - array
            - 'null'
        instance:
          description: >-
            A URI reference that identifies the specific occurrence of the
            problem.
          examples:
            - https://example.com/error-log/abc123
          format: uri
          type: string
        status:
          description: HTTP status code
          examples:
            - 400
          format: int64
          type: integer
        title:
          description: >-
            A short, human-readable summary of the problem type. This value
            should not change between occurrences of the error.
          examples:
            - Bad Request
          type: string
        type:
          default: about:blank
          description: A URI reference to human-readable documentation for the error.
          examples:
            - https://example.com/errors/example
          format: uri
          type: string
      type: object
    AgentSchedule:
      additionalProperties: false
      description: >-
        A schedule: an agent's recurring runs. Each occurrence of
        cron_expression, read in time_zone, starts a run with trigger scheduled
        and this schedule_id.
      properties:
        agent_id:
          description: The agent the schedule runs.
          format: uuid
          type: string
        created_at:
          description: When the schedule was created.
          format: date-time
          type: string
        cron_expression:
          description: 'Five-field cron: minute, hour, day of month, month, day of week.'
          type: string
        end_at:
          description: >-
            No occurrence at or after this time. Once it passes, the schedule
            ends and its runs that have not started are cancelled.
          format: date-time
          type: string
        id:
          description: The schedule's id.
          format: uuid
          type: string
        last_run_id:
          description: The run the schedule last started.
          format: uuid
          type: string
        name:
          description: The schedule's label.
          type: string
        next_run_at:
          description: >-
            When the next occurrence starts a run, or end_at when no occurrence
            is left before it. Absent unless the schedule is active.
          format: date-time
          type: string
        overlap_policy:
          description: >-
            skip drops an occurrence while the schedule's previous run is
            scheduled, queued, running or paused. queue starts it anyway,
            waiting for a phone like any run.
          enum:
            - skip
            - queue
          type: string
        run_template:
          $ref: '#/components/schemas/AgentScheduleRunTemplate'
          description: What each run starts with.
        start_at:
          description: No occurrence before this time.
          format: date-time
          type: string
        state:
          description: >-
            active runs its occurrences. paused runs none until resumed. ended
            is final: the schedule passed its end_at.
          enum:
            - active
            - paused
            - ended
          type: string
        time_zone:
          description: >-
            The IANA time zone cron_expression is read in, so local times hold
            across daylight saving.
          type: string
        updated_at:
          description: When the schedule was last changed.
          format: date-time
          type: string
      required:
        - id
        - agent_id
        - name
        - cron_expression
        - time_zone
        - run_template
        - overlap_policy
        - state
        - created_at
        - updated_at
      type: object
    V2ErrorDetail:
      additionalProperties: false
      description: >-
        One specific problem within an error response, locating the offending
        part of the request.
      properties:
        location:
          description: >-
            Where the error occurred, e.g. 'body.items[3].tags' or
            'path.thing-id'
          type: string
        message:
          description: Error message text
          type: string
        value:
          description: The value at the given location
      type: object
    AgentScheduleRunTemplate:
      additionalProperties: false
      description: >-
        What each run of the schedule starts with. The agent's model, output
        schema and limits apply, as for POST /runs.
      properties:
        network:
          description: >-
            The network each run of an instructions agent can reach: restricted
            (default) reaches the phone only; internet adds the public internet.
            Code runs always have internet, so a code agent's template takes no
            network.
          enum:
            - restricted
            - internet
          type: string
        revision_id:
          description: >-
            A revision of the agent to run. Leave out to run the agent's current
            revision at each occurrence.
          format: uuid
          type: string
        targets:
          description: >-
            The device each run drives (at most one). Leave out for a shared
            phone.
          items:
            $ref: '#/components/schemas/RunTarget'
          maxItems: 1
          type:
            - array
            - 'null'
        variables:
          additionalProperties: {}
          description: >-
            Each run's inputs, available to the run's code as the variables
            dict.
          type: object
      type: object
    RunTarget:
      additionalProperties: false
      description: The device a run drives. Phones only for now, Android only.
      properties:
        capabilities:
          $ref: '#/components/schemas/RunTargetCapabilities'
          description: What the run needs of the phone.
        device_class:
          description: The kind of device.
          enum:
            - phone
          type: string
        ownership:
          description: >-
            dedicated: one of your organization's phones, the one phone_id names
            or any free one. shared: a phone from the shared fleet. Defaults to
            dedicated when phone_id is set, else shared.
          enum:
            - dedicated
            - shared
          type: string
        phone_id:
          description: >-
            A dedicated phone of your organization to run on. Leave out for any
            of yours (ownership dedicated) or a shared phone.
          type: string
        platform:
          description: The device's platform (default android).
          enum:
            - android
          type: string
      required:
        - device_class
      type: object
    RunTargetCapabilities:
      additionalProperties: false
      description: What a run needs of its device.
      properties:
        accessibility:
          description: >-
            Run in accessibility mode, which needs a phone that supports it and
            your organization's access to accessibility mode.
          type: boolean
      type: object
  securitySchemes:
    apiKeyAuth:
      description: Customer API key (axl_ prefix).
      in: header
      name: X-Axilio-Api-Key
      type: apiKey

````

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