---
title: "Cancel or archive a mailbox"
method: DELETE
path: "/mailboxes/{mailboxId}"
tags: ["Mailboxes"]
---

# Cancel or archive a mailbox

`DELETE /mailboxes/{mailboxId}`

## Request

- Base URL: `https://api.mobilerun.ai`
- URL: `https://api.mobilerun.ai/mailboxes/{mailboxId}`
- Auth: HTTP bearer

Cancels a pending mailbox or schedules an active paid mailbox for cancellation. Existing addresses and messages are retained. Repeating the request is safe. An external inbox (Gmail) cannot be cancelled here; disconnect the link instead.

## Path parameters

- `mailboxId` string, uuid, required

## Response `200`

Cancellation scheduled

- object
  - `data` Mailbox, required
    - `id` string, uuid, required
    - `provider` 'matix' | 'gmail', required
    - `domainId` string, uuid, nullable, required
    - `address` string, nullable, required
    - `label` string, nullable, required
    - `status` 'provisioning' | 'awaiting_payment' | 'active' | 'cancel_scheduled' | 'archived' | 'billing_error' | 'pending_connection' | 'connection_expired' | 'connection_removed', required
    - `billingMode` 'rent' | 'included' | 'domain' | 'external', required
    - `cancelAtPeriodEnd` boolean, required
    - `checkoutUrl` string, nullable, required
    - `checkoutExpiresAt` string, date-time, nullable, required
    - `currentPeriodEnd` string, date-time, nullable, required
    - `createdAt` string, date-time, required
    - `inboundMessages` MailboxInboundMessagesUsage, required
      - `used` integer, required
      - `included` integer, required
      - `exhausted` boolean, required
      - `resetsAt` string, date-time, nullable, required

## Other responses

- `400`: The mailbox backend rejected the request
- `401`: Unauthorized
- `404`: Not Found
- `409`: External inbox cannot be cancelled; disconnect the link
- `429`: Mailbox backend rate limited
- `500`: Internal Server Error
- `502`: Mailbox backend unavailable
- `503`: Mailboxes disabled or billing not configured

## Changes

- **2026-10-21** `559a12449213`: 16 warning
  - added the new `integration_forbidden` enum value to the `anyOf[#/components/schemas/MailboxApiErrorEnvelope]/code` response property for the response status `400`
  - added the new `integration_forbidden` enum value to the `anyOf[#/components/schemas/MailboxApiErrorEnvelope]/code` response property for the response status `429`
  - added the new `integration_forbidden` enum value to the `anyOf[#/components/schemas/MailboxApiErrorEnvelope]/code` response property for the response status `502`
  - added the new `integration_forbidden` enum value to the `anyOf[#/components/schemas/MailboxErrorBody]/code` response property for the response status `400`
  - …12 more
- **2026-10-16** `4ad548c528a8`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/droidrun/apis/droidrun-cloud/changes/mailboxes/:mailboxId/delete.md)

---

[API](https://skmtc.dev/droidrun/apis/droidrun-cloud.md) - [All operations](https://skmtc.dev/droidrun/apis/droidrun-cloud/llms.txt) - [OpenAPI document](https://skmtc.dev/droidrun/apis/droidrun-cloud/revisions/1cc95586c933?raw)
