> ## 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.

# Resume Scheduled Task

> Resume a scheduled task owned by the workspace API key

Sets `active` to `true` on a scheduled task owned by this workspace API key. A task that is not `MANUAL` runs on its clock again. The response does not include `runCount`.

## Base URL

```
https://api.langdock.com/automations/v1/{automationId}/resume
```

<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                 |
| -------------- | ---- | ------ | -------- | --------------------------- |
| `automationId` | Path | string | Yes      | UUID of the scheduled task. |

This endpoint has no body.

## Example

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

async function resumeScheduledTask(automationId) {
  const response = await axios.post(
    `https://api.langdock.com/automations/v1/${automationId}/resume`,
    null,
    {
      headers: {
        Authorization: "Bearer YOUR_API_KEY"
      }
    }
  );

  console.log(response.data.automation.active);
}

resumeScheduledTask("550e8400-e29b-41d4-a716-446655440000");
```

## Response format

### Success response (200 OK)

`automation` matches the [scheduled task object](/en/developer/scheduled-tasks-api/scheduled-tasks-overview) without `runCount`. `active` is `true`.

## Error handling

| Status code | Description                                                                                                                                                                    |
| ----------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ |
| 400         | Invalid task id                                                                                                                                                                |
| 401         | Invalid or missing API key, or the key user was not found                                                                                                                      |
| 403         | Missing `AUTOMATION_API`, a personal API key, Scheduled Tasks disabled, no product access, or code `TRIAL_EXPIRED` with message `Your trial has expired. Upgrade to continue.` |
| 404         | `AUTOMATION_NOT_FOUND`                                                                                                                                                         |
| 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 POST /automations/v1/{automationId}/resume
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/{automationId}/resume:
    post:
      tags:
        - Scheduled Tasks
      summary: Resume a scheduled task
      description: Sets active to true. The response does not include runCount.
      operationId: resumeScheduledTask
      parameters:
        - name: automationId
          in: path
          required: true
          schema:
            type: string
            format: uuid
      responses:
        '200':
          description: Scheduled task resumed
        '400':
          description: Invalid task id
        '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, no product access, or code TRIAL_EXPIRED with message Your
            trial has expired. Upgrade to continue.
        '404':
          description: Message AUTOMATION_NOT_FOUND
        '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"

````