---
title: "Edit an activity"
method: PATCH
path: "/api/v1/rest/crm/activities/{id}"
tags: ["CRM"]
---

# Edit an activity

`PATCH /api/v1/rest/crm/activities/{id}`

## Request

- Base URL: `https://api.custodo.ai`
- URL: `https://api.custodo.ai/api/v1/rest/crm/activities/{id}`
- Auth: HTTP bearer

Corrects an activity already logged: its kind, title, text, who it is assigned to, when it is due and when it happened. `due_at` is a PLAN and `completed_at` is a FACT and neither is ever written from the other — clearing `completed_at` reopens the activity, which is a correction rather than a completion. Only the fields you pass are touched and `null` clears one. To close an activity, call crm_complete_activity instead.

## Path parameters

- `id` string, uuid, required

## Headers

- `X-Tenant-Id` string, uuid

## Request body

- object
  - `kind` 'task' | 'call' | 'meeting' | 'note' | 'email' | 'document': `call`, `meeting`, `task`, `note`, `email` or `document`.
  - `direction` 'inbound' | 'outbound', nullable: Only for a call or an email: who rang whom. `null` clears it.
  - `title` string: One line, in Italian.
  - `body` string, nullable: What was said, or what has to be done. `null` clears it.
  - `due_at` string, date-time, nullable: When it is PLANNED, ISO-8601 with a timezone: 2026-09-03T15:00:00Z. `null` removes the plan, and with it the deal’s next action.
  - `completed_at` string, date-time, nullable: When it HAPPENED, ISO-8601 with a timezone. `null` reopens it — a correction, not a completion.
  - `outcome` string, nullable: How it went, in a few words.
  - `duration_minutes` integer, nullable: How long it took, in minutes.
  - `assignee_user_id` string, uuid, nullable: Whose to-do list it sits in. A colleague’s `user_id` from custodo_list_members, or your own from custodo_whoami — the timeline shows an assignee by NAME, never by id. `null` leaves it in nobody’s.

## Response `200`

Done. `data` is the tool’s own answer.

- RestResult
  - `ok` true, required
  - `data` unknown, required

## Other responses

- `400`: The arguments did not validate: `error.message` names the field, what it expects and what arrived.
- `401`: No API key, or one that is malformed, unknown, revoked or expired.
- `403`: The call never ran: the module is off for this organisation, the credential lacks the permission or the module, the tier does not cover it, or the tool is destructive and the key was not minted for that.
- `404`: Nothing with that id in this organisation.
- `409`: The record is in a state that does not allow it — under legal hold, already sent, already closed. `error.code` says which.
- `422`: The tool ran and refused, in a sentence of its own (`TOOL_REFUSED`): the message says what to change. Retrying the same call will not help.
- `429`: The API key has spent its minute, or its day. Every request a key makes counts. See `Retry-After`.

---

[API](https://skmtc.dev/custodo/apis/custodo-integrazioni.md) · [All operations](https://skmtc.dev/custodo/apis/custodo-integrazioni/llms.txt) · [OpenAPI document](https://skmtc.dev/custodo/apis/custodo-integrazioni/revisions/16d336d3ec2a?raw)
