# GET/POST /api/v1/inboxes/:id/encryption

Auth: Bearer

HTML: https://cooperemail.com/docs/reference/inbox-encryption

## Summary

Read or turn on envelope encryption for this account. POST {"enabled":true} creates a per-account key wrapped by COOPER_INBOX_ENCRYPTION_KEY. New message bodies and attachment bytes are sealed. Existing plaintext still reads. Without the operator key the call is HTTP 503 encryption_unavailable. GET returns enabled, key_configured, locked, and locked_at. locked true means read and send return HTTP 403 account_locked. The owner sets the lock with POST /api/v1/owner/agents/:inbox/lock {"locked":true}. Unlock is the same call with locked false. The agent cannot unlock. MCP: cooper_get_mailbox_encryption. Guide: /blog/encrypted-inbox-owner-lock.

## Request

```json
{
  "enabled": true
}
```

## Response

The OpenAPI document does not declare a JSON response schema for this call. The summary is the contract.

## Errors

- HTTP 503 encryption_unavailable
- HTTP 403 account_locked

The live `message` is the sentence for that code. Branch on `code`.

```json
{
  "error": {
    "type": "internal_error",
    "code": "encryption_unavailable",
    "docs_url": "https://cooperemail.com/docs#encryption_unavailable"
  }
}
```

## Idempotency

This route does not document Idempotency-Key or client_id.
