---
title: "Save a human topic correction"
method: PUT
path: "/mail-topic-edits"
tags: ["Inbox"]
---

# Save a human topic correction

`PUT /mail-topic-edits`

## Request

- Base URL: `https://api.primitive.dev/v1`
- URL: `https://api.primitive.dev/v1/mail-topic-edits`
- Auth: HTTP bearer

Mailbox-owned human membership, summary and task edits. Each field has an independent version. Sources must belong to this mailbox and exact visible audience. Automatic generation cannot write these records. Identical latest mutations are retryable; stale versions return mail_topic_edit_conflict. Source mail remains unchanged. Responses are never cached.

## Request body

- PutMailTopicEditsRequest
  - `mailbox` string, email, required
  - `participants` string[], required
  - `edit` union, required
    - object
      - `kind` 'membership', required
      - `topic_id` string, required
      - `message` object, required
        - `direction` 'inbound' | 'outbound', required
        - `message_id` string, required
    - object
      - `kind` 'summary', required
      - `topic_id` string, required
      - `text` string, nullable, required
      - `sources` object[], required
        - `direction` 'inbound' | 'outbound', required
        - `message_id` string, required
    - object
      - `kind` 'task', required
      - `topic_id` string, required
      - `task_id` string, required
      - `text` string, required
      - `completed` boolean, required
      - `dismissed` boolean, required
      - `evidence` string
      - `sources` object[], required
        - `direction` 'inbound' | 'outbound', required
        - `message_id` string, required
  - `expected_version` integer, required
  - `mutation_id` string, required

## Response `200`

Current human edits

- object
  - `success` true, required
  - `data` MailTopicEditsUpdate, required
    - `mailbox` string, email, required
    - `item` object, required
      - `edit` union, required
        - object
          - `kind` 'membership', required
          - `topic_id` string, nullable, required
          - `message` object, required
            - `direction` 'inbound' | 'outbound', required
            - `message_id` string, required
        - object
          - `kind` 'summary', required
          - `topic_id` string, nullable, required
          - `text` string, nullable, required
          - `sources` object[], required
            - `direction` 'inbound' | 'outbound', required
            - `message_id` string, required
        - object
          - `kind` 'task', required
          - `topic_id` string, nullable, required
          - `task_id` string, nullable, required
          - `text` string, nullable, required
          - `completed` boolean, required
          - `dismissed` boolean, required
          - `evidence` string, nullable
          - `sources` object[], required
            - `direction` 'inbound' | 'outbound', required
            - `message_id` string, required
      - `version` integer, required
      - `mutation_id` string, required
      - `updated_at` string, required

## Other responses

- `400`: Invalid request parameters
- `401`: Invalid or missing API key
- `404`: Resource not found
- `409`: mail_topic_edit_conflict: the observed version or mutation does not match
- `413`: Request exceeds the 1 MiB encoded payload limit
- `429`: Rate limit exceeded. The `ratelimit-*` headers describe the limiter that rejected this request, with its own limit and window, not the API budget that successful responses report. A limiter that reports only a wait sends `Retry-After` alone.

## Changes

> 32 revisions in range; 1 not diffed.

- **2026-11-03** `bce409c97acb`: 2 breaking, 186 warning
  - removed `subschema #2, subschema #3` from the `edit` request property `oneOf` list
  - added `subschema #1, subschema #2, subschema #3` to the `allOf[subschema #2]/data/item/edit` response property `oneOf` list for the response status `200`
  - added the new `access_mode_unavailable` enum value to the `error/code` response property for the response status `400`
  - added the new `access_mode_unavailable` enum value to the `error/code` response property for the response status `401`
  - …184 more
  - …this revision’s changelog is incomplete
- **2026-10-21** `0360ea8d4f3d`: 78 warning
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `400`
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `401`
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `404`
  - added the new `agent_changed` enum value to the `error/code` response property for the response status `409`
  - …74 more
- …earlier changes not shown

[Operation history](https://skmtc.dev/primitive/apis/primitive-api/changes/mail-topic-edits/put.md)

---

[API](https://skmtc.dev/primitive/apis/primitive-api.md) - [All operations](https://skmtc.dev/primitive/apis/primitive-api/llms.txt) - [OpenAPI document](https://skmtc.dev/primitive/apis/primitive-api/revisions/bce409c97acb?raw)
