> For the complete documentation index, see [llms.txt](https://developers.docstudio.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://developers.docstudio.com/api-documentation/api-methods/search-mailbox.md).

# Search mailbox

Use this endpoint to find mailboxes and contacts before you assign recipients in an envelope flow. Search the current mailbox context by UUID, alias, mailbox name, or contact name.

<table><thead><tr><th width="365">Endpoint</th><th></th></tr></thead><tbody><tr><td>Method</td><td>GET</td></tr><tr><td>Request URL</td><td><code>/api/v1/mailbox/search</code></td></tr><tr><td><strong>Headers</strong></td><td></td></tr><tr><td>Authorization *</td><td>Bearer {token}</td></tr><tr><td>Content-Type</td><td>application/json</td></tr><tr><td>mailboxUuid *</td><td>Current mailbox UUID</td></tr><tr><td><strong>Request</strong></td><td></td></tr><tr><td>q *</td><td>Search string</td></tr></tbody></table>

Use `q` to search by:

* mailbox UUID
* mailbox alias
* mailbox name
* contact name

### Request example

```
GET /api/v1/mailbox/search?q=john.doe@example.com
Authorization: Bearer {token}
Content-Type: application/json
mailboxUuid: 837bc65e-4818-48f5-a933-2d00b24b6e12
```

### Response example

This example shows the general response shape.

```json
{
  "data": [
    {
      "uuid": "9baec31c-e940-4894-b6d1-52033e1af66e",
      "alias": "john-doe",
      "name": "John Doe",
      "email": "john.doe@example.com"
    },
    {
      "uuid": "42c95245-30c1-46ef-bd5b-a9a111deec10",
      "alias": "legal-team",
      "name": "Legal Team",
      "email": "legal@example.com"
    }
  ],
  "numberOfElements": 2,
  "sizeRequested": 2,
  "totalElements": 2
}
```

Use [Swagger UI](https://support.docstudio.com/docstudio-docs/docstudio-for-developers/api-documentation/swagger-ui) for the exact response schema.

### Response status codes

| Code | Description    |
| ---- | -------------- |
| 200  | Success        |
| 401  | Not authorized |
| 403  | Forbidden      |

### Related topics

* [Send Envelope](https://support.docstudio.com/docstudio-docs/docstudio-for-developers/api-documentation/envelope/send-envelope)
* [Envelope Forms](https://support.docstudio.com/docstudio-docs/docstudio-for-developers/api-documentation/envelope/envelope-forms)
* [Check Envelope Status](https://support.docstudio.com/docstudio-docs/docstudio-for-developers/api-documentation/api-methods/check-envelope-status)
