# mailboxShares.listSharedWithMe

List mailboxes shared with you.

Returns every mailbox belonging to someone else that you have been given access to, oldest grant first, each with the rights you hold on it. Use the returned `mailboxId` to read that mailbox through the ordinary mailbox endpoints.

There is no mailbox in the path: the answer is scoped to whoever is authenticated. A mailbox credential lists its own grants. An account credential is not an identity and receives an empty list — to see one member's shared mailboxes, ask with that member's credential. A system credential must name the identity it is acting for in the `X-Acting-Identity` header, and without it receives an empty list rather than every grant on the deployment.

An empty list is the normal answer for someone nothing has been shared with; it is never an error. The full list is always returned — there is no paging.

```ts
openemail.mailboxShares.listSharedWithMe(
  options?: MailboxSharesListSharedWithMeOptions,
): ApiPromise<MailboxSharesListSharedWithMeResult>
```

It calls `GET /shared-mailboxes`: [List mailboxes shared with you](/docs/api/mailboxes/get_SharedMailboxList) in the API reference.

## Example

```ts
const result = await openemail.mailboxShares.listSharedWithMe()
```

## Options

The last argument, `options`, a `MailboxSharesListSharedWithMeOptions`, takes:

| Option | Type | Sent as | Description |
| --- | --- | --- | --- |
| `labelScope` | `boolean` | query `labelScope` | Set `false` to skip resolving each folder-scoped grant's folder NAMES, omitting `labelScope` from every row. Rendering costs one read of the owner's folder list per distinct owner who granted you folder-scoped access, so a client that does not display folder names — notably one calling this per IMAP LIST — should turn it off. The field is OMITTED rather than emptied: `null` already means whole mailbox, so absent is the only honest way to say 'not computed'. Note that skipping the render also skips the dead-grant filter: a grant whose folders were all deleted (normally revoked by the folder delete itself, and hidden here if that cleanup could not run) is only detectable BY rendering, so with `labelScope=false` such residue is listed like any other grant. Defaults to rendering |
| `actingIdentity` | `string` | header `x-acting-identity` | System credentials only: the ULID of the identity to answer for. Ignored for mailbox and account credentials, which already identify the caller. Omitting it on a system credential returns an empty list |

Every call also takes `signal`, `timeout`, `retry` and `headers`, which say how that one call is sent ([call options](/docs/sdks/typescript/calling-methods#call-options)).

## Answer

Awaited, it is the API's JSON, [`MailboxSharesListSharedWithMeResult`](#mailboxshareslistsharedwithmeresult). It is an [`ApiPromise`](/docs/sdks/typescript/responses): `.withResponse()` gives the same with the `Response` it came in, for its headers.

## Errors

| Status | What it means |
| --- | --- |
| `401` | unauthorized: the bearer credential is missing, malformed, expired, or revoked. Carries a `WWW-Authenticate: Bearer` challenge |
| `503` | temporary_failure: the platform's storage could not answer just now; retry after the Retry-After window. Any operation can answer this. A write that got it may have been applied, so retry it with the same idempotency key where it takes one, or read the state back first (see Transient failures in the API description) |

A failed call rejects with a [`RequestError`](/docs/sdks/typescript/errors): its `status`, and its `code`, the API's `error`. Decide on the code: one status covers several.

## Types

### MailboxSharesListSharedWithMeResult

```ts
/** What `mailboxShares.listSharedWithMe` answers. */
type MailboxSharesListSharedWithMeResult = {
  sharedMailboxes: SharedMailbox[]
}
```

It names these types of the API, each on a page of its own: [`SharedMailbox`](/docs/sdks/typescript/types/shared-mailbox).
