---
title: "Edit a recurring master's rule (materialized model)."
method: PATCH
path: "/tasks/{id}/recurrence/rule"
tags: ["tasks"]
---

# Edit a recurring master's rule (materialized model).

`PATCH /tasks/{id}/recurrence/rule`

## Request

- Base URL: `https://restivity.ai/api/v1`
- URL: `https://restivity.ai/api/v1/tasks/{id}/recurrence/rule`
- Auth: OAuth 2 (authorization code, authorization URL `https://restivity.ai/oauth/authorize`, token URL `https://restivity.ai/api/oauth/token`, scopes: `tasks:write`)

For a recurring master whose `recurrence_model` is `materialized` (TIPO A). `recurrence_start_date` is stored as sent; omitted or null keeps the current start (never today); the legacy alias `due_date` counts only when it carries a date. A new start, frequency or days retires the occurrences in scope — `scope: "future"` the future ones, `scope: "all"` every one — and creates the new window; a shortened end removes the occurrences after it; a title / description / priority change creates and trashes nothing and updates the occurrences in scope in place. A rule change writes a `recurrence_rule_changed` entry in the series' history (AGF-379). A non-recurring task or a `reminder_only` master is refused with 400 `invalid_request`. As on the web, only the series' owner changes its rule: a teammate's series the caller can see is 403 `forbidden`. MCP sibling: `tasks_recurrence_update_rule`.

## Path parameters

- `id` string, uuid, required

## Request body

- UpdateMasterRuleInput
  - `new_rule` RecurrenceRulePatchInput, required
    - `recurring_frequency` 'daily' | 'weekly' | 'monthly' | 'yearly', nullable
    - `recurring_days` integer[], nullable
    - `recurring_end_date` string, date-time, nullable
    - `recurrence_start_date` string, date-time, nullable: New start (anchor) of the series. Occurrences are computed forward from it.
    - `due_date` string, date-time, nullable: Legacy alias of `recurrence_start_date`, which replaced it as the anchor; when both are sent, `recurrence_start_date` wins.
    - `title` string
    - `description` string, nullable: `description` takes HTML or marked text, at most 10,000 characters. HTML is kept as the task editor writes it (`<p>`, `<strong>`, `<em>`, `<ul>`/`<ol>` with `<li>`, `<code>`, `<a href="https://…">`) and sanitized by allow-list; marked text — blank-line paragraphs, `- ` and `1. ` lists, a `### ` heading opening a block, `**bold**`, `*italic*`, `` `code` ``, `[text](https://…)` links, code blocks fenced by three backticks — is rendered by the server into that HTML, so the board shows no asterisks or backticks. In one text the two do not mix: a text holding an HTML tag is stored as sent, markers included. A read returns the HTML in `description` and the same content without tags in `description_text`
    - `priority` 'low' | 'medium' | 'high' | 'urgent'
  - `scope` 'future' | 'all', required

## Response `200`

Counts of the children soft-deleted, re-materialised and preserved.

- UpdateMasterRuleResponse
  - `success` boolean, required
  - `soft_deleted_count` integer, required
  - `rematerialised_count` integer, required
  - `preserved_count` integer, required

## Other responses

- `400`: Invalid request shape.
- `401`: Missing or invalid access token.
- `403`: Token lacks the required scope — or `forbidden`: the series belongs to a teammate (only its owner changes its rule). Nothing written.
- `404`: No such task visible to the caller.
- `422`: Request body failed schema validation.
- `429`: Rate-limit exceeded for this tier.

---

[API](https://skmtc.dev/restivity/apis/restivity-rest-api.md) · [All operations](https://skmtc.dev/restivity/apis/restivity-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/restivity/apis/restivity-rest-api/revisions/5764e41ebb3a?raw)
