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

# ConfigMailbox

> Sample shape for ConfigMailbox.

Sample shape for `ConfigMailbox`.

## Sample JSON

Copy, edit, paste. Server-set fields (`id`, `created`, `tenantId`, …) are omitted from the example — they're populated by the server on response.

```json theme={null}
{
  "name": "Example name",
  "connectionType": "<mailbox-connection-type>",
  "server": "example",
  "port": 0,
  "inboxFolder": "example",
  "categoryProcessed": "example",
  "categorySkipped": "example",
  "imapUsername": "example",
  "imapPassword": "example",
  "imapSmtpServer": "example",
  "imapSmtpPort": 0,
  "microsoftEmailAddress": "user@example.com",
  "microsoftOAuthTenantId": "<microsoft-o-auth-tenant_id>",
  "microsoftOAuthClientId": "<microsoft-o-auth-client_id>",
  "microsoftOAuthClientSecret": "example"
}
```

## Fields

| Field                        | Type                                                                     | Required     | Notes                                   |
| ---------------------------- | ------------------------------------------------------------------------ | ------------ | --------------------------------------- |
| `entity`                     | string • nullable                                                        | Server-set   | Set by the server. Read-only on writes. |
| `name`                       | string                                                                   | **Required** |                                         |
| `connectionType`             | [`MailboxConnectionType`](/data-model/constants#mailbox-connection-type) | Optional     |                                         |
| `server`                     | string                                                                   | Optional     |                                         |
| `port`                       | integer                                                                  | Optional     |                                         |
| `inboxFolder`                | string                                                                   | Optional     |                                         |
| `categoryProcessed`          | string                                                                   | Optional     |                                         |
| `categorySkipped`            | string                                                                   | Optional     |                                         |
| `imapUsername`               | string                                                                   | Optional     |                                         |
| `imapPassword`               | string                                                                   | Optional     |                                         |
| `imapSmtpServer`             | string                                                                   | Optional     |                                         |
| `imapSmtpPort`               | integer                                                                  | Optional     |                                         |
| `microsoftEmailAddress`      | string                                                                   | Optional     |                                         |
| `microsoftOAuthTenantId`     | string                                                                   | Optional     |                                         |
| `microsoftOAuthClientId`     | string                                                                   | Optional     |                                         |
| `microsoftOAuthClientSecret` | string                                                                   | Optional     |                                         |
| `tenantId`                   | string                                                                   | Server-set   | Set by the server. Read-only on writes. |
| `id`                         | string                                                                   | Server-set   | Set by the server. Read-only on writes. |
| `created`                    | string (date-time)                                                       | Server-set   | Set by the server. Read-only on writes. |
| `createdBy`                  | string                                                                   | Server-set   | Set by the server. Read-only on writes. |
| `updated`                    | string (date-time)                                                       | Server-set   | Set by the server. Read-only on writes. |
| `updatedBy`                  | string                                                                   | Server-set   | Set by the server. Read-only on writes. |
| `deleted`                    | boolean                                                                  | Server-set   | Set by the server. Read-only on writes. |

## Used by

### Request body

* `POST /api/mail/mailbox`
* `PUT /api/mail/mailbox/{id}`

### Response body

* `GET /api/mail/mailbox/{id}`
* `GET /api/mail/mailbox`

### CLI

`ekso mail-mailbox` — see the [command branches](/cli/branches) page for available verbs. Body for create / update verbs typically passed via `--data @file.json` matching the [sample JSON](#sample-json) above.
