---
title: "Update a mailbox endpoint"
method: PATCH
path: "/v1/mailboxes/{id}/endpoints/{endpointId}"
tags: ["Mailboxes"]
---

# Update a mailbox endpoint

`PATCH /v1/mailboxes/{id}/endpoints/{endpointId}`

## Request

- Base URL: `https://api.samva.dev`
- URL: `https://api.samva.dev/v1/mailboxes/{id}/endpoints/{endpointId}`
- Auth: API key in header `x-api-key`

Updates the fields you name and keeps the rest, and returns the mailbox. `displayName` is the name messages sent from the endpoint carry; null falls back to the mailbox's name. `default: true` makes the endpoint the one the mailbox starts new conversations from on its channel; replies always leave from the endpoint of their thread.

## Path parameters

- `id` string, required
- `endpointId` string, required

## Request body

- UpdateMailboxEndpointPayload
  - `displayName` string, nullable
  - `default` true, nullable

## Response `200`

Mailbox

- Mailbox
  - `id` string, required
  - `namespaceId` string, required
  - `slug` string, required
  - `name` string, required
  - `status` 'active' | 'paused', required
  - `primaryAddress` string, nullable, required
  - `createdAt` string, required
  - `description` string, nullable, required
  - `metadata` MailboxMetadata, required
  - `endpoints` MailboxEndpoint[], required
    - `id` string, required
    - `address` string, required
    - `displayName` string, nullable, required
    - `default` boolean, required
    - `channel` 'email', required
    - `source` 'samvaHosted' | 'verifiedDomain', required
    - `domainId` string, nullable, required
  - `updatedAt` string, required

## Other responses

- `401`: UnauthorizedError
- `403`: ForbiddenError
- `404`: ResourceNotFoundError
- `422`: ValidationError
- `500`: InternalError
- `504`: GatewayTimeoutError

---

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