---
title: "Batch update message labels"
method: POST
path: "/email/inboxes/{inbox_id}/messages/batch-update"
tags: ["Email"]
---

# Batch update message labels

`POST /email/inboxes/{inbox_id}/messages/batch-update`

## Request

- Base URL: `https://api.crevio.co/v1`
- URL: `https://api.crevio.co/v1/email/inboxes/{inbox_id}/messages/batch-update`
- Auth: API key in header `Authorization`

Applies one label change to up to 50 messages, all or none. Ids that are missing or belong to another inbox are silently omitted; compare `count` with `limit` to detect misses. The `held` label can only be changed by a person in the Crevio inbox.

## Path parameters

- `inbox_id` string, required

## Headers

- `Idempotency-Key` string

## Request body

- object: At least one of `add_labels` or `remove_labels` is required.
  - `message_ids` string[], required: Message ids (msg_…), up to 50, no duplicates
  - `add_labels` union: Labels to add. Crevio uses `unread` (new incoming mail), `starred` and `archived` (out of the inbox, still listed) like Gmail; `spam` and `trash` hide the mail from lists and search until removed. `held` can't be changed through the API.
    - string
    - string[]
  - `remove_labels` union: Labels to remove. Removing `spam` or `trash` brings the mail back.
    - string
    - string[]

## Response `200`

Updated messages

- object
  - `limit` integer, required: Number of ids sent
  - `count` integer, required: Number of messages updated
  - `updates` object[], required
    - `id` string, required
    - `labels` string[], required

## Other responses

- `400`: Bad request
- `401`: Authentication required
- `404`: Resource not found
- `422`: Validation error
- `429`: Rate limit exceeded — 600 requests per minute per owner on the free tier: every API key and OAuth token one person holds on an account shares one budget, and the account's team keys share another. Retry after the number of seconds in `Retry-After`.

## Changes

- **2026-11-15** `56c22ab9b282`: 5 warning
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `400`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `401`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `404`
  - added the new `idempotency_error` enum value to the `error/type` response property for the response status `422`
  - …1 more
- **2026-11-06** `49445170ec1d`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/crevio/apis/crevio-api-v1/changes/email/inboxes/:inbox_id/messages/batch-update/post.md)

---

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