> ## Documentation Index
> Fetch the complete documentation index at: https://docs.lerian.studio/llms.txt
> Use this file to discover all available pages before exploring further.

# BC Correios in Cabine

> The Lerian BC Correios workspace in Lerian Cabine.

Lerian Cabine has a workspace for Lerian BC Correios.

The Lerian BC Correios workspace in Lerian Cabine is where operators read the BC Correio mail of the institution, reply to BACEN, follow the audit trail and set up the connection. Access Manager groups set what each operator can do. [Integrating with Lerian BC Correios](https://docs.lerian.studio/en/rails/bc-correios/bc-correios-integration.md) lists the groups.

## Overview

***

**Visão geral** shows the unread mail of the last 30 days.

* The headline line counts the unread mail and the mail that is unread for more than 15 days. **Abrir caixa de entrada** opens the unread mail.
* **Não lidos há mais de 3 dias**, **Não lidos há mais de 7 dias** and **Não lidos há mais de 15 dias** each open the matching unread mail in **Caixa de entrada**.
* The fold **Recebidos por tipo** shows the mail by type, the activity by day and **Remetentes no período**.

Cabine calls [`GET /api/v1/correios/dashboard/summary`](https://docs.lerian.studio/en/reference/rails/bc-correios/dashboard-summary) and [`GET /api/v1/correios/dashboard/categories`](https://docs.lerian.studio/en/reference/rails/bc-correios/dashboard-category-breakdown). Both need `plugin-bc-correios-viewer-group`.

## Mail folders

***

**Caixa de entrada**, **Enviados**, **Arquivados** and **Cancelados** list the mail of one folder.

* The columns include **Assunto**, **Tipo**, **Remetente** or **Destino**, **Anexos** and the date. **Enviados** also shows **Transmissão**.
* **Buscar correios** searches the subject, the sender and the content.
* Filter by **Tipo** (**Resolução**, **Circular**, **Comunicado** or **Outro**), **Leitura** (except in **Enviados**) and the period.
* **Restaurar** in the menu of a row of **Arquivados** moves the mail back to **Caixa de entrada**. **Enviados** and **Cancelados** offer no action on a row.

Cabine calls [`GET /api/v1/correios/mails`](https://docs.lerian.studio/en/reference/rails/bc-correios/list-or-search-mails), which needs `plugin-bc-correios-viewer-group`.

## Mail detail

***

A row opens the mail. The screen has three tabs.

* **Conteúdo** shows the body of the mail.
* **Anexos** lists the attachments. A click downloads one with [`GET /api/v1/correios/mails/{id}/attachments/{attachmentId}`](https://docs.lerian.studio/en/reference/rails/bc-correios/download-attachment).
* **Resumo IA** shows the status and the insight of the AI analysis. **Reanalisar** asks for a new analysis with [`POST /api/v1/correios/mails/{id}/reanalyze`](https://docs.lerian.studio/en/reference/rails/bc-correios/trigger-ai-re-analysis). It needs an AI provider in **Configurações**.

The history under the mail lists the audit events of this mail.

* Opening an unread mail marks it as read with [`PUT /api/v1/correios/mails/{id}/read`](https://docs.lerian.studio/en/reference/rails/bc-correios/mark-mail-as-read).
* **Responder** opens **Escrever correio** as a reply to the mail. A sent message has no **Responder**.
* **Arquivar** moves a mail of **Caixa de entrada** to **Arquivados** with [`PUT /api/v1/correios/mails/{id}/archive`](https://docs.lerian.studio/en/reference/rails/bc-correios/archive-mail). **Restaurar** moves it back with [`PUT /api/v1/correios/mails/{id}/restore`](https://docs.lerian.studio/en/reference/rails/bc-correios/restore-mail). Both change the local copy of the mail only.

[`GET /api/v1/correios/mails/{id}`](https://docs.lerian.studio/en/reference/rails/bc-correios/get-mail-by-id) and [`GET /api/v1/correios/mails/{id}/ai-status`](https://docs.lerian.studio/en/reference/rails/bc-correios/get-ai-analysis-status) read the mail. `plugin-bc-correios-viewer-group` can read, download and mark as read. **Arquivar**, **Restaurar** and **Reanalisar** need `plugin-bc-correios-contributor-group`.

## Compose

***

**Escrever correio** sends a message to a BACEN department. Fill in **Assunto** and **Mensagem**. **Destino (opcional)** overrides the default destination, and **Palavras-chave (opcional)** takes up to 10 keywords, separated by commas.

**Revisar envio** opens the review. After you confirm, Cabine sends the message with [`POST /api/v1/correios/mails/send`](https://docs.lerian.studio/en/reference/rails/bc-correios/send-message-to-bcb). It needs `plugin-bc-correios-contributor-group`.

## Audit

***

**Auditoria** lists the audit trail of the institution with the columns **Quando**, **Ação**, **Correio** and **Operador**. Filter by **Ação** and **Período**.

**Exportar CSV** and **Exportar PDF** download the trail of the selected period. They need a period.

Cabine calls [`GET /api/v1/correios/audit`](https://docs.lerian.studio/en/reference/rails/bc-correios/query-audit-trail) and [`GET /api/v1/correios/audit/export`](https://docs.lerian.studio/en/reference/rails/bc-correios/export-audit-trail). Both need `plugin-bc-correios-viewer-group`.

## Settings

***

**Configurações** has four sections.

* **Credenciais**: **Usuário Sisbacen**, **Senha Sisbacen** and **Destino padrão (BCB)**. For a stored secret, choose **Manter**, **Substituir** or **Remover**. **Testar credenciais** tests the saved credentials with [`POST /api/v1/correios/settings/test-connection`](https://docs.lerian.studio/en/reference/rails/bc-correios/test-bcb-connection) and shows the **Pastas autorizadas**.
* **Coleta**: **Intervalo de coleta** is 5, 15, 30 or 60 minutes.
* **IA**: **Provedor**, **Modelo**, **Endpoint**, **Prompt de sistema** and **Chave da API (BYOK)**. **Testar provedor** calls [`POST /api/v1/correios/settings/test-ai-connection`](https://docs.lerian.studio/en/reference/rails/bc-correios/test-ai-provider-connection).
* **Retenção**: **Retenção (dias)** takes from 1825 to 36500 days. A shorter period lets Lerian BC Correios delete the mail and attachments older than the new period at its next retention run. Cabine saves it with [`PATCH /api/v1/correios/settings/retention`](https://docs.lerian.studio/en/reference/rails/bc-correios/update-retention-policy).

**Salvar** saves the other sections with [`PATCH /api/v1/correios/settings`](https://docs.lerian.studio/en/reference/rails/bc-correios/update-tenant-settings). When no settings exist, the screen shows a first-run form, and **Criar configuração** creates them with [`POST /api/v1/correios/settings`](https://docs.lerian.studio/en/reference/rails/bc-correios/create-tenant-settings).

Cabine reads the settings with [`GET /api/v1/correios/settings`](https://docs.lerian.studio/en/reference/rails/bc-correios/get-tenant-settings), which needs `plugin-bc-correios-viewer-group`. Saving or creating the settings and both tests need `plugin-bc-correios-editor-group`.

## Related

***

* [Operating Lerian BC Correios](https://docs.lerian.studio/en/rails/bc-correios/bc-correios-operations.md)
* [Access and roles in Lerian Cabine](https://docs.lerian.studio/en/rails/cabine/cabine-access-and-roles.md)


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.