# Resume a paused or switched-off automation.

> Clears the refusals in a row.
> https://koi.dog/docs/api/automations/resume-automation/

`POST /api/v1/automations/{id}/resume` · Scope: `config`

A schedule continues from now: run times that passed while it was off are not run. When an API key calls it, the timeline records who did what and the outcome. No query parameters, and no body.

## Path parameters.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `string` | yes | The automation's id. |

## Headers.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `Idempotency-Key` | `string` | no | Makes a retry safe: the same key with the same request returns the first answer and does nothing else. |

## Response.

200 OK: a JSON object. The example has placeholder values.

## Request.

```sh
curl -X POST "https://app.koi.dog/api/v1/automations/$ID/resume" \
    -H "Authorization: Bearer $KOIDOG_API_KEY" \
    -H "Idempotency-Key: $(uuidgen)"
```

```js
const res = await fetch(`https://app.koi.dog/api/v1/automations/${process.env.ID}/resume`, {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.KOIDOG_API_KEY}`,
    "Idempotency-Key": crypto.randomUUID(),
  },
});
console.log(await res.json());
```

```python
import os
import uuid

import requests

r = requests.post(
    f"https://app.koi.dog/api/v1/automations/{os.environ['ID']}/resume",
    headers={
        "Authorization": f"Bearer {os.environ['KOIDOG_API_KEY']}",
        "Idempotency-Key": str(uuid.uuid4()),
    },
)
r.raise_for_status()
print(r.json())
```

## Response example.

```json
{
  "id": "string",
  "name": "string",
  "description": "string",
  "projectId": "string",
  "kind": "schedule",
  "state": "active",
  "disabledReason": "string",
  "disabledAt": "string",
  "launch": {
    "projectId": "string",
    "goal": "string",
    "mode": "direct",
    "requestedSize": 0,
    "tasks": [],
    "repeatGoal": false,
    …
  },
  "schedule": {
  },
  "trigger": {
  },
  "inputs": { … },
  "guards": {
    "maxRunsPerDay": 0,
    "overlap": "skip",
    "disableAfterFailures": 0,
    "missedWindowMinutes": 0,
    "maxInputChars": 0
  },
  "nextRunAt": "string",
  …
}
```
