---
title: "Count received messages"
method: GET
path: "/v1/inboxes/{inbox_id}/messages/count"
tags: ["messages"]
---

# Count received messages

`GET /v1/inboxes/{inbox_id}/messages/count`

## Request

- Base URL: `https://cherami.to`
- URL: `https://cherami.to/v1/inboxes/{inbox_id}/messages/count`
- Auth: HTTP bearer

Counts received messages matching the same `query` and filters as [List received messages](https://cherami.to/docs/api/messages/list-messages), including messages that aren't ready to read yet.

## Path parameters

- `inbox_id` string, required

## Query parameters

- `query` string
- `from` string
- `recipient` string
- `subject` string
- `after` string
- `before` string
- `labels_all` Label[]
- `labels_any` Label[]
- `labels_none` Label[]

## Response `200`

Success.

- object
  - `count` integer, required

## Other responses

- `400`: `invalid_search`: Correct the search terms, filters, timestamps or ordering the message names. See [search](https://cherami.to/docs/guides/search). `invalid_labels`: Correct the label name, label change, filter group or discovery prefix the message names.
- `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.
- `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)
