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

# List Scheduled Tasks

> List scheduled tasks owned by the workspace API key, newest first

Returns scheduled tasks created by this workspace API key, newest first. Tasks owned by another key are omitted. Deleted tasks are omitted.

## Base URL

```
https://api.langdock.com/automations/v1
```

<Warning>
  **Dedicated deployments**

  Replace `api.langdock.com` with `<your-deployment-url>/api/public` in all requests.
</Warning>

## Required scopes

This endpoint requires the `AUTOMATION_API` scope (**Scheduled Tasks API**) on a workspace API key.

## Parameters

| Parameter | In    | Type    | Required | Description                                           |
| --------- | ----- | ------- | -------- | ----------------------------------------------------- |
| `limit`   | Query | integer | No       | Page size from 1 to 250. Default: 50.                 |
| `cursor`  | Query | string  | No       | Task UUID from `nextCursor` in the previous response. |

## Example

```javascript theme={null}
const axios = require("axios");

async function listScheduledTasks(cursor) {
  const response = await axios.get(
    "https://api.langdock.com/automations/v1",
    {
      params: { limit: 50, cursor },
      headers: {
        Authorization: "Bearer YOUR_API_KEY"
      }
    }
  );

  console.log(response.data.automations);
  return response.data.nextCursor;
}

listScheduledTasks();
```

## Response format

### Success response (200 OK)

`nextCursor` is present only when another page exists. Each task includes `runCount`. The full field list is on the [Scheduled Tasks API Overview](/en/developer/scheduled-tasks-api/scheduled-tasks-overview).

```typescript theme={null}
{
  automations: Array<{
    id: string;
    createdAt: string;
    name: string;
    prompt: string;
    modelId: string | null;
    modelMode: "UNSET" | "EXPLICIT" | "AUTO";
    assistantId: string | null;
    taggedAssistantId: string | null;
    frequency:
      | "MANUAL"
      | "DAILY"
      | "WEEKDAYS"
      | "WEEKLY"
      | "MONTHLY"
      | "SELECTED_WEEKDAYS";
    timeOfDay: string | null;
    dayOfWeek: number | null;
    dayOfMonth: number | null;
    daysOfWeek: number[];
    timezone: string | null;
    active: boolean;
    lastRunAt: string | null;
    runCount: number;
    attachments: Array<{
      id: string;
      name: string;
      mimeType: string | null;
      type: string | null;
    }>;
    taggedIntegrationIds: string[];
    taggedKnowledgeFolderIds: string[];
    taggedWorkflowIds: string[];
    taggedSkillSlugs: string[];
  }>;
  nextCursor?: string;
}
```

## Error handling

| Status code | Description                                                                                      |
| ----------- | ------------------------------------------------------------------------------------------------ |
| 400         | Invalid `limit` or `cursor`                                                                      |
| 401         | Invalid or missing API key, or the key user was not found                                        |
| 403         | Missing `AUTOMATION_API`, a personal API key, Scheduled Tasks disabled, or the key has no access |
| 405         | Method not allowed                                                                               |
| 429         | Rate limit exceeded                                                                              |
| 500         | Internal server error                                                                            |

<Info>
  Langdock intentionally blocks browser-origin requests to protect your API key and ensure your applications remain secure. For more information, please see our guide on [API Key Best Practices](/en/admin/ai-adoption-and-rollout/best-practices/api-key-best-practices).
</Info>


## OpenAPI

````yaml GET /automations/v1
openapi: 3.0.0
info:
  title: Langdock API
  version: 3.0.0
servers:
  - url: https://api.langdock.com
    description: Production
security:
  - bearerAuth: []
paths:
  /automations/v1:
    get:
      tags:
        - Scheduled Tasks
      summary: List scheduled tasks
      description: Returns scheduled tasks created by this workspace API key, newest first.
      operationId: listScheduledTasks
      parameters:
        - name: limit
          in: query
          required: false
          schema:
            type: integer
            minimum: 1
            maximum: 250
            default: 50
          description: Number of scheduled tasks to return.
        - name: cursor
          in: query
          required: false
          schema:
            type: string
            format: uuid
          description: Task UUID from nextCursor in the previous response.
      responses:
        '200':
          description: >-
            Scheduled tasks returned successfully. nextCursor is present only
            when another page exists. Each task includes runCount.
        '400':
          description: Invalid limit or cursor
        '401':
          description: Invalid or missing API key, or the key user was not found
        '403':
          description: >-
            Missing AUTOMATION_API, a personal API key, Scheduled Tasks
            disabled, or the key has no access
        '405':
          description: Method not allowed
        '429':
          description: Rate limit exceeded
        '500':
          description: Internal server error
components:
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      bearerFormat: API Key
      description: API key as Bearer token. Format "Bearer YOUR_API_KEY"

````