# 👨‍💻 Parsio Public API

Source: https://help.parsio.io/public-api/parsio-public-api

## Postman Collection

You can quickly start testing the Parsio API by importing our Postman collection with the most important API endpoints.

To add it to Postman:

1. Download the JSON collection file from the Attachments section at the end of this article.
2. Open Postman, click File → Import.
3. Select the downloaded JSON file.
4. Set your variables such as `apiKey`, `mailboxId`, `docId`, etc.

Once imported, you can immediately test the Parsio API endpoints from Postman.

## API Base

All API endpoints described in this article are relative to the following base URL:

`https://api.parsio.io`

## Authentication

To access the API, you will need the API key that you will find in your [account](https://app.parsio.io/account):

![](https://cdn.eniston.com/bases/bc035352-b1ce-4e95-ba65-2f4b77bdd3b7/attachments/blobid1647018355209_1647018357.jpg "Parsio&#95;Account.jpg")

This API key should be included in the `X-API-Key` HTTP header.

Unauthenticated responses return `HTTP 401 Unauthorized`.

Example request using cURL:

`curl -X GET https://api.parsio.io/mailboxes/ -H "X-API-Key: <YOUR_API_KEY>"`

## Choose the Right Import Endpoint

For most API integrations, we recommend the **synchronous** endpoints because they return parsed data directly in the same HTTP response whenever parsing finishes within the timeout.

Use the asynchronous endpoints if you prefer webhooks, need ZIP upload support, work with larger or slower files, or simply do not want the request to wait for parsing.



### If you already have text or HTML

- **Recommended:** `POST /mailboxes/<mailbox_id>/doc-sync`
- **Asynchronous alternative:** `POST /mailboxes/<mailbox_id>/doc`

Use these endpoints when your application already has the document content as plain text or HTML and you want Parsio to parse it.

### If you have a file

- **Recommended:** `POST /mailboxes/<mailbox_id>/upload-sync`
- **Asynchronous alternative:** `POST /mailboxes/<mailbox_id>/upload`

Use these endpoints when your source document is a PDF, scanned PDF, image, DOCX, CSV, XML, or another supported file format.

### When to choose asynchronous import

- You already use webhooks and do not need the parsed result immediately
- You want the fastest possible upload response
- You need ZIP upload support
- You are importing larger or slower-to-parse files

## Manage Mailboxes

### List mailboxes

`GET /mailboxes`

Returns all mailboxes available to the authenticated user.

### Get a mailbox

`GET /mailboxes/<mailbox_id>`

Returns mailbox settings and configuration.

### Create a mailbox

`POST /mailboxes/create`

Parameters:

- **name** (string): Mailbox name
- **preset** (string): Parser type or preset
- **ml\_model** (string): OCR or AI model, depending on mailbox type
- **has\_raw\_data** (boolean)
- **parse\_sig** (boolean)

### Update a mailbox

`POST /mailboxes/<mailbox_id>`

Updates mailbox settings.

Common parameters:

- **name** (string)
- **email\_prefix** (string)
- **process\_attachments** (boolean): Store or ignore email attachments
- **collect\_emails** (boolean): Collect email addresses automatically
- **alert\_email\_h** (number): Email alert frequency in hours
- **receive\_email** (boolean)
- **preset** (string)
- **ml\_model** (string)

### Delete a mailbox

`DELETE /mailboxes/<mailbox_id>`

### List table fields in the mailbox

`GET /mailboxes/<mailbox_id>/tableFields`

## Manage Documents

### Create HTML and text documents (recommended: synchronous)

`POST /mailboxes/<mailbox_id>/doc-sync`

Creates a document from plain text or HTML and waits for the parsed result in the same response.

Supported only for:

- Template-based parser
- GPT-powered parser

Use `/doc` instead if you prefer asynchronous processing.

### Create HTML and text documents (asynchronous)

`POST /mailboxes/<mailbox_id>/doc`

Creates a document from plain text or HTML and starts parsing asynchronously.

### Upload files (recommended: synchronous)

`POST /mailboxes/<mailbox_id>/upload-sync`

Uploads one file and waits for the parsed result in the same response.

This endpoint works with all Parsio parser types, as long as the uploaded file type is supported by that mailbox type.

Sync upload limits:

- One file per request
- ZIP files are not supported
- Max. file size: 20MB

### Upload files asynchronously

`POST /mailboxes/<mailbox_id>/upload`

Uploads one file and starts parsing asynchronously.

Async upload limits:

- One file per request
- ZIP files supported
- Max. file size: 50MB

### List documents

`GET /mailboxes/<mailbox_id>/docs`

Returns paginated documents for the mailbox.

Query parameters:

- **page** (number)
- **per\_page** (number): Max. 500
- **from** (string): Start date in `YYYY-MM-DD` format
- **to** (string): End date in `YYYY-MM-DD` format
- **q** (string): Search by document name
- **status** (array of strings): Filter by document status

### Get a document

`GET /docs/<document_id>`

Returns the parsed document as JSON. This is the same JSON payload style used by Parsio webhooks.

Use this endpoint when:

- You used an asynchronous import endpoint and want to fetch the result later
- Your synchronous request returned `parsing_in_progress: true`

### Parse a document again

`POST /docs/<document_id>/parse`

Queues the document for reprocessing.

### Skip many documents

`POST /mailboxes/<mailbox_id>/docs/skip`

Parameters:

- **ids** (array of strings): Document IDs to skip

## Manage Templates

### List templates

`GET /mailboxes/<mailbox_id>/templates`

Parameters:

- **page** (number)

### Get a template

`GET /templates/<template_id>`

### Enable templates

`POST /templates/enable_many`

Parameters:

- **ids** (array of strings)

### Disable templates

`POST /templates/disable_many`

Parameters:

- **ids** (array of strings)

### Clone templates

`POST /templates/clone_many`

Parameters:

- **ids** (array of strings): Template IDs to clone
- **mailbox\_id** (string): Target mailbox ID

### Delete templates

`DELETE /templates`

Parameters:

- **ids** (array of strings)

## Manage Webhooks

### List webhooks

`GET /webhooks/mb/<mailbox_id>`

### Get a webhook

`GET /webhooks/<webhook_id>`

### Create a webhook

`POST /webhooks/<mailbox_id>`

Parameters:

- **name** (string)
- **url** (string): Webhook URL
- **event** (string): Accepted values include `doc.parsed`, `doc.parsed.flat`, `doc.fail`, `doc.received`, `table.parsed`
- **enabled** (boolean)
- **table\_id** (string): Required only for `table.parsed`

### Update a webhook

`POST /webhooks`

Parameters:

- **\_id** (string): Webhook ID
- **name** (string)
- **url** (string): Webhook URL
- **event** (string)
- **enabled** (boolean)
- **table\_id** (string): Required only for `table.parsed`

### Delete webhooks

`DELETE /webhooks`

Parameters:

- **ids** (array of strings): Webhook IDs to delete

## Manage Parsed Data

### Get parsed data for a mailbox

`GET /mailboxes/<mailbox_id>/parsed`

Returns parsed data for documents in the mailbox.

Parameters:

- **page** (number)
- **from** (string): Start date in `YYYY-MM-DD` format
- **to** (string): End date in `YYYY-MM-DD` format

### List collected emails

`GET /mailboxes/<mailbox_id>/emails`

Returns collected email addresses for the mailbox.

Did we miss something? [Let us know](mailto:support@parsio.io)!
