---
title: "Get a mailbox by id"
method: GET
path: "/v1/mailboxes/{mailbox_id}"
tags: ["mailboxes"]
---

# Get a mailbox by id

`GET /v1/mailboxes/{mailbox_id}`

## Request

- Base URL: `https://mbag.ai/api`
- URL: `https://mbag.ai/api/v1/mailboxes/{mailbox_id}`
- Auth: HTTP bearer

## Path parameters

- `mailbox_id` integer, required

## Response `200`

The mailbox.

- MailboxWithDomain
  - `created_at` string, date-time, required
  - `description` string, nullable
  - `domain_id` integer, required
  - `domain_name` string, required
  - `email_address` string, required
  - `id` integer, required
  - `is_active` boolean, required
  - `name` string, required
  - `updated_at` string, date-time, required
  - `user_id` integer, required

## Other responses

- `401`: Missing or invalid credential, raised by the `ApiKeyAuth` extractor (`backend/src/api_keys.rs`) before the handler runs: no `Authorization` header, a non-`Bearer` scheme, a key that doesn't hash-match any row, or a key whose status isn't `active`. A header that isn't valid UTF-8, has no scheme token, or has `Bearer` with no key value returns 400 with this same JSON shape instead of 401.
- `500`: Mailbox not found (or not owned by the caller) or a database error — both surface identically as 500 with a plain-text body, because the handler uses `fetch_one` without distinguishing "no row" from other query errors.

---

[API](https://skmtc.dev/mailbuttons/apis/mailbuttons-agent-mail-api.md) · [All operations](https://skmtc.dev/mailbuttons/apis/mailbuttons-agent-mail-api/llms.txt) · [OpenAPI document](https://skmtc.dev/mailbuttons/apis/mailbuttons-agent-mail-api/revisions/fe2761823978?raw)
