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

# Update recurring task

> Update a recurring task schedule (partial). Already-generated tasks are not affected.

```
PUT https://www.wiseyield.co/api/v1/recurring-tasks/{id}
```

### Authentication

Requires a key with the `tasks:write` scope.

### Path parameters

<ParamField path="id" type="string" required>Recurring task UUID.</ParamField>

### Request body

All fields optional.

<ParamField body="pattern" type="string">One of `daily`, `weekly`, `monthly`, `yearly`, `custom`.</ParamField>
<ParamField body="interval" type="integer">1–365.</ParamField>
<ParamField body="daysOfWeek" type="array">0–6. Pass `null` to clear.</ParamField>
<ParamField body="dayOfMonth" type="integer">1–31. Pass `null` to clear.</ParamField>
<ParamField body="monthOfYear" type="integer">1–12. Pass `null` to clear.</ParamField>
<ParamField body="startDate" type="string">ISO 8601.</ParamField>
<ParamField body="endDate" type="string">ISO 8601. Pass `null` to clear.</ParamField>
<ParamField body="isActive" type="boolean">Pause/resume generation.</ParamField>
<ParamField body="generateDaysBefore" type="integer">0–90.</ParamField>
<ParamField body="assignedTo" type="string">Pass `null` to clear.</ParamField>
<ParamField body="fieldName" type="string">Pass `null` to clear.</ParamField>

### Response

Returns the updated schedule wrapped under `data`.

<RequestExample>
  ```bash cURL theme={null}
  curl -X PUT 'https://www.wiseyield.co/api/v1/recurring-tasks/aaaaaaaa.../...' \
    -H "Authorization: Bearer $WISEYIELD_API_KEY" \
    -H "Content-Type: application/json" \
    -d '{ "isActive": false }'
  ```
</RequestExample>

## Errors

| Status                    | When                                                  |
| ------------------------- | ----------------------------------------------------- |
| `400 INVALID_ID`          | `{id}` is not a valid UUID                            |
| `400 VALIDATION_ERROR`    | Body validation failed                                |
| `401`                     | Missing, malformed, expired, or revoked API key       |
| `403 INSUFFICIENT_SCOPE`  | Key lacks `tasks:write` scope                         |
| `404 NOT_FOUND`           | Schedule doesn't exist or was created by another user |
| `429 RATE_LIMIT_EXCEEDED` | Per-user rate limit reached                           |
| `5xx`                     | Server error                                          |
