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

# List scheduled tasks (or get one)

> Without `taskId`, returns the caller's scheduled tasks as a **bare JSON
array**. With `taskId`, returns that single task object. Admins may pass
`allInOrg=true` to list every task in the org.

Requires Control Hub access (any non-guest org role).




## OpenAPI

````yaml /openapi.yaml get /scheduled-tasks/manage
openapi: 3.1.0
info:
  title: AsterAgents API
  version: 1.0.0
  description: >
    API for AsterAgents platform operations.


    - **Admin endpoints** (`/admin/*`) require organization admin privileges
    (`org:admin` role)

    - **Agent endpoints** (`/agents`) require agent management permissions or
    `org:admin` role

    - **Knowledge base endpoints** (`/kb/*`) require standard authentication

    - **Skills endpoints** (`/skills/*`) require standard authentication

    - **File endpoints** (`/upload/*`, `/kb/files`, `/skills/files`) require
    standard authentication
  contact:
    name: AsterAgents Support
    url: https://asteragents.com/support
servers:
  - url: https://asteragents.com/api
    description: Production
  - url: http://localhost:3000/api
    description: Local development
security:
  - bearerAuth: []
tags:
  - name: Users
    description: Manage active organization users
  - name: Invitations
    description: Manage organization invitations
  - name: Files
    description: Upload and manage files
  - name: Knowledge Bases
    description: Manage knowledge bases and their files
  - name: Knowledge Base Management
    description: Create, update, and delete knowledge bases
  - name: Agents
    description: Create, update, and delete agents
  - name: Agent Tags
    description: Organize agents with tags
  - name: Tools
    description: Discover the tool catalog available to your organization
  - name: Skills
    description: Manage agent skills
  - name: Skill Files
    description: Manage bundled files for skills
  - name: Conversations
    description: Invoke agents and retrieve conversation history and messages
  - name: Scheduled Tasks
    description: Schedule agents to run automatically on a cron schedule
paths:
  /scheduled-tasks/manage:
    get:
      tags:
        - Scheduled Tasks
      summary: List scheduled tasks (or get one)
      description: |
        Without `taskId`, returns the caller's scheduled tasks as a **bare JSON
        array**. With `taskId`, returns that single task object. Admins may pass
        `allInOrg=true` to list every task in the org.

        Requires Control Hub access (any non-guest org role).
      operationId: listScheduledTasks
      parameters:
        - name: taskId
          in: query
          required: false
          description: Return a single task by id instead of the list.
          schema:
            type: integer
        - name: allInOrg
          in: query
          required: false
          description: >-
            Admins only — list all tasks in the org rather than just the
            caller's.
          schema:
            type: boolean
      responses:
        '200':
          description: A list of tasks (or a single task when `taskId` is given).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ScheduledTask'
        '404':
          description: Task not found (when `taskId` is given).
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          $ref: '#/components/responses/InternalServerError'
components:
  schemas:
    ScheduledTask:
      type: object
      properties:
        id:
          type: integer
          example: 42
        name:
          type: string
          example: Weekly portfolio digest
        description:
          type: string
          nullable: true
        prompt:
          type: string
          example: Summarize any new documents added this week.
        schedule:
          type: string
          description: Cron expression (UTC).
          example: 0 13 * * 1
        enabled:
          type: boolean
        agentId:
          type: integer
          example: 123
        agentName:
          type: string
          description: Present on list/get responses.
          example: Portfolio Monitor
        userId:
          type: string
        lastRunAt:
          type: string
          format: date-time
          nullable: true
        createdAt:
          type: string
          format: date-time
        updatedAt:
          type: string
          format: date-time
    Error:
      type: object
      required:
        - error
      properties:
        error:
          type: string
          example: Bad Request
        details:
          type: array
          items:
            type: object
            additionalProperties: true
  responses:
    InternalServerError:
      description: Internal Server Error
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Internal Server Error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: JWT
      description: |
        JWT token from Clerk authentication.

        Must be from a user with `org:admin` role.

````