# Shared mailboxes

> Open a Microsoft 365 shared mailbox with an account's grant.

URL: https://docs.workwae.com/reference/shared-mailboxes

Guides: [Shared mailboxes](/guides/organizations#shared-mailboxes).

| Method | Path | Operation | Scope |
| --- | --- | --- | --- |
| `POST` | `/v1/accounts/{accountId}/shared-mailboxes` | [Open a shared mailbox with an account's grant](#open-a-shared-mailbox-with-an-accounts-grant) | `write` |

## Open a shared mailbox with an account's grant

`POST /v1/accounts/{accountId}/shared-mailboxes`

TypeScript SDK method: `workwae.sharedMailboxes.create()`

Creates (or re-points) an account for a shared mailbox the delegating account's user can access, authenticated with that account's grant: Graph addresses it as /users/{email}; an Exchange IMAP account logs in as user\shared with XOAUTH2. Gmail has no delegated shared mailboxes: add them through a Google domain-wide delegation connection.

Required scope: `write`.

### Parameters

| Name | In | Type | Required | Description |
| --- | --- | --- | --- | --- |
| `accountId` | path | string (uuid) | yes | Example `"6f1c2a4e-8b3d-4e5f-9a7b-1c2d3e4f5a6b"`. |

### Request body (required)

Content type `application/json`.

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `email` | string (email) | yes | At most 320 characters. Example `"ada@example.com"`. |
| `displayName` | string | no | At most 255 characters. |
| `externalRef` | string | no | At most 255 characters. Example `"user_42"`. |
| `settings` | object | no |  |
| `settings.bodyStorage` | "none" \| "cache" \| "full" | no |  |
| `settings.syncWindowDays` | integer \| null | no |  |
| `settings.mailEnabled` | boolean | no |  |
| `settings.calendarEnabled` | boolean | no |  |
| `settings.contactsEnabled` | boolean | no |  |
| `settings.undoSendSeconds` | integer | no | 0 to 60. |
| `settings.trackOpens` | boolean | no |  |
| `settings.trackClicks` | boolean | no |  |
| `settings.trackingHoneypot` | boolean | no |  |
| `settings.suppressionCheck` | "lists" \| "always" | no |  |
| `settings.sendsPerMinute` | integer \| null | no |  |

### Responses

- **201** OK (application/json, object)

| Field | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | string (uuid) | yes | Example `"c4e6a8b0-1d3f-4a5c-8e7b-9d1f3a5c7e9b"`. |
| `externalRef` | string \| null | yes | Example `"user_42"`. |
| `provider` | "gmail" \| "graph" \| "imap" | yes |  |
| `email` | string | yes |  |
| `displayName` | string \| null | yes |  |
| `oauthAppId` | string (uuid) \| null | yes | Example `"c6e11c75-050f-4212-9cff-bddb4fb07e36"`. |
| `cloud` | "global" \| "gcc-high" \| "dod" \| "china" \| null | yes |  |
| `status` | "active" \| "paused" \| "reauth_required" \| "disabled" | yes |  |
| `statusReason` | string \| null | yes |  |
| `settings` | object | yes |  |
| `settings.bodyStorage` | "none" \| "cache" \| "full" | yes |  |
| `settings.syncWindowDays` | integer \| null | yes |  |
| `settings.mailEnabled` | boolean | yes |  |
| `settings.calendarEnabled` | boolean | yes |  |
| `settings.contactsEnabled` | boolean | yes |  |
| `settings.undoSendSeconds` | integer | yes | 0 to 60. |
| `settings.trackOpens` | boolean | yes |  |
| `settings.trackClicks` | boolean | yes |  |
| `settings.trackingHoneypot` | boolean | yes |  |
| `settings.suppressionCheck` | "lists" \| "always" | yes |  |
| `settings.sendsPerMinute` | integer \| null | yes |  |
| `settingsOverride` | object | yes |  |
| `settingsOverride.bodyStorage` | "none" \| "cache" \| "full" | no |  |
| `settingsOverride.syncWindowDays` | integer \| null | no |  |
| `settingsOverride.mailEnabled` | boolean | no |  |
| `settingsOverride.calendarEnabled` | boolean | no |  |
| `settingsOverride.contactsEnabled` | boolean | no |  |
| `settingsOverride.undoSendSeconds` | integer | no | 0 to 60. |
| `settingsOverride.trackOpens` | boolean | no |  |
| `settingsOverride.trackClicks` | boolean | no |  |
| `settingsOverride.trackingHoneypot` | boolean | no |  |
| `settingsOverride.suppressionCheck` | "lists" \| "always" | no |  |
| `settingsOverride.sendsPerMinute` | integer \| null | no |  |
| `runtime` | object \| null | yes |  |
| `runtime.state` | "pending" \| "connecting" \| "connected" \| "error" \| "stopped" | yes |  |
| `runtime.detail` | string \| null | yes |  |
| `runtime.ownerInstanceId` | string (uuid) \| null | yes | Example `"b31a377d-3f38-46d6-b670-15babc0f5625"`. |
| `runtime.updatedAt` | string (date-time) | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `imap` | object \| null | yes |  |
| `imap.imap` | object | yes |  |
| `imap.imap.host` | string | yes |  |
| `imap.imap.port` | integer | yes |  |
| `imap.imap.security` | "tls" \| "starttls" \| "none" | yes |  |
| `imap.imap.user` | string | yes |  |
| `imap.smtp` | object \| null | yes |  |
| `imap.smtp.host` | string | yes |  |
| `imap.smtp.port` | integer | yes |  |
| `imap.smtp.security` | "tls" \| "starttls" \| "none" | yes |  |
| `imap.smtp.user` | string | yes |  |
| `imap.auth` | "password" \| "google" \| "microsoft" | yes |  |
| `imap.appendSent` | boolean | yes |  |
| `imap.dav` | object \| null | yes |  |
| `imap.dav.calendarUrl` | string \| null | yes |  |
| `imap.dav.contactsUrl` | string \| null | yes |  |
| `imap.dav.user` | string | yes |  |
| `imap.dav.auth` | "imap_password" \| "dav_password" | yes |  |
| `auth` | object | yes |  |
| `auth.method` | "oauth" \| "password" \| "google_delegation" \| "microsoft_app" \| "shared_mailbox" \| "google_group" | yes |  |
| `auth.orgConnectionId` | string (uuid) \| null | yes | Example `"17f753c8-b2ec-494b-9468-6e20a9a2f99c"`. |
| `auth.delegateAccountId` | string (uuid) \| null | yes | Example `"016ade53-f197-47ea-bd0e-48fda92e431f"`. |
| `auth.relayEmail` | string (email) \| null | yes | Example `"ada@example.com"`. |
| `mailPermissions` | "full" \| "read_send" \| "read" \| null | yes |  |
| `initializedAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `calendarInitializedAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `contactsInitializedAt` | string (date-time) \| null | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `createdAt` | string (date-time) | yes | Example `"2026-05-04T09:30:00.000Z"`. |
| `updatedAt` | string (date-time) | yes | Example `"2026-05-04T09:30:00.000Z"`. |

- **Errors**, by status and `code` (see [Errors](/guides/errors)):
  - 400: `invalid_input`, `invalid_idempotency_key`, `storage_unavailable`, `shared_mailbox_unsupported`, `scope_missing`
  - 401: `unauthenticated`, `api_key_expired`
  - 402: `plan_required`, `spend_cap_reached`, `billing_past_due`
  - 403: `missing_scope`, `role_forbidden`, `account_token_forbidden`, `account_scope_forbidden`, `mcp_only_key`, `plan_module_unavailable`, `plan_limit_storage`, `plan_limit_accounts`
  - 404: `account_not_found`
  - 409: `idempotency_key_in_progress`, `account_paused`, `account_disabled`, `account_reauth_required`, `account_misconfigured`, `account_exists`
  - 413: `payload_too_large`
  - 422: `idempotency_key_reused`, `shared_mailbox_inaccessible`
  - 429: `rate_limited`, `too_many_requests`, `provider_throttled`
  - 500: `internal_error`
  - 502: `provider_unavailable`
  - 503: `overloaded`
