---
title: "Label several sent copies"
method: PATCH
path: "/v1/sent/labels"
tags: ["labels"]
---

# Label several sent copies

`PATCH /v1/sent/labels`

## Request

- Base URL: `https://cherami.to`
- URL: `https://cherami.to/v1/sent/labels`
- Auth: HTTP bearer

Applies one label change to up to 100 sent copies, which may be in any of the account's inboxes. The [label rules](https://cherami.to/docs/api/labels/update-message-labels) apply; received messages have [their own endpoint](https://cherami.to/docs/api/labels/bulk-update-message-labels).

The change is all or nothing: if any ID is missing, deleted or not on this account, the request returns `404` and no copy changes. On success the response has one entry per distinct ID, in request order. For more than 100 copies, send several requests.

## Request body

- BulkLabelChange: At least one nonempty change array, and no name in both. Duplicate IDs are updated once.
  - `message_ids` string[], required
  - `add_labels` Label[]: Label names, case-sensitive; order and duplicates don't matter.
  - `remove_labels` Label[]: Label names, case-sensitive; order and duplicates don't matter.

## Response `200`

Success.

- object
  - `messages` LabelResult[], required
    - `id` string, required: Cherami resource ID.
    - `labels` string[], required

## Other responses

- `400`: `invalid_json`: Send a valid UTF-8 JSON object, not an array or scalar. `invalid_labels`: Correct the label name, label change, filter group or discovery prefix the message names. `invalid_message_ids`: Supply 1–100 valid message IDs for a bulk label update.
- `401`: `unauthorized`: Send a valid API key as `Authorization: Bearer <key>`. If the key stopped working, get a new one through [recovery](https://cherami.to/docs/guides/recovery).
- `404`: `not_found`: The resource does not exist or does not belong to this account. A reply or forward source must also be in the sending inbox.
- `413`: `body_too_large`: Reduce the JSON request to the operation's body limit.
- `415`: `unsupported_media_type`: Send `Content-Type: application/json`.
- `500`: `internal_error`: The operation failed. Retry a read; after a write the change may have happened, so recover as [retry by operation](https://cherami.to/docs/api/errors#retry-by-operation) describes.

---

[API](https://skmtc.dev/cherami/apis/cherami-http-api.md) · [All operations](https://skmtc.dev/cherami/apis/cherami-http-api/llms.txt) · [OpenAPI document](https://skmtc.dev/cherami/apis/cherami-http-api/revisions/7bd993d538af?raw)
