Inboxes

Create, update and delete inboxes, upload, read, download and export their documents, and manage their email and webhook.

MethodPathWhat it does
GET/api/v1/inboxesList inboxes
GET/api/v1/inboxes/{inbox_id}Read an inbox and its fields
POST/api/v1/inboxes/{inbox_id}/documentsUpload a document to an inbox
POST/api/v1/inboxesCreate an inbox
POST/api/v1/inboxes/from-schemaCreate an inbox from a schema
PATCH/api/v1/inboxes/{inbox_id}Update an inbox
GET/api/v1/inboxes/{inbox_id}/emailRead an inbox's email address
PATCH/api/v1/inboxes/{inbox_id}/emailEnable or disable inbox email
PATCH/api/v1/inboxes/{inbox_id}/webhookSet the inbox webhook
POST/api/v1/upload/{inbox_id}Upload files to an inbox (multipart)
GET/api/v1/inboxes/{inbox_id}/documentsList an inbox's documents
GET/api/v1/inboxes/{inbox_id}/documents/{document_id}Read a document and its values
GET/api/v1/inboxes/{inbox_id}/documents/{document_id}/fileDownload a document's file
DELETE/api/v1/inboxes/{inbox_id}/documents/{document_id}Delete a document
POST/api/v1/inboxes/{inbox_id}/exportExport an inbox
GET/api/v1/inboxes/{inbox_id}/webhookRead the inbox webhook
POST/api/v1/inboxes/{inbox_id}/webhook/secretRotate the webhook signing secret
GET/api/v1/inboxes/{inbox_id}/webhook/deliveriesList webhook deliveries
POST/api/v1/inboxes/{inbox_id}/documents/{document_id}/webhookResend a document to the webhook
DELETE/api/v1/inboxes/{inbox_id}Delete an inbox

List inboxes

GET/api/v1/inboxes

List the inboxes this key can see, newest first. Each has its id, name, icon, status, document count and email address.

  • At most 200 inboxes come back in one call.
  • A key limited to some inboxes sees only those.
  • email is null when the server has no email domain configured.
GET /api/v1/inboxes
curl -X GET https://doxtract.manoonlabs.com/api/v1/inboxes \
  -H "Authorization: Bearer mldxt_..."

Read an inbox and its fields

GET/api/v1/inboxes/{inbox_id}

Read one inbox with its fields as a JSON schema. The fields show what kind of document the inbox reads, so an agent can pick the right inbox before it uploads.

  • schema is the inbox's fields in their saved order, or null for a draft with no fields yet.
  • A key limited to some inboxes gets 403 for other inboxes. A missing inbox returns 404.
  • email is null when the server has no email domain configured.
GET /api/v1/inboxes/cm7inbox
curl -X GET https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox \
  -H "Authorization: Bearer mldxt_..."

Upload a document to an inbox

POST/api/v1/inboxes/{inbox_id}/documents

Add one document to an inbox as base64 in a JSON body. It is read with the inbox's fields in the background and costs 1 credit per page. This is the MCP tool for adding documents; from your own code, the multipart upload at /api/v1/upload/{inbox_id} takes several files at once.

  • Send file_name and file_base64 (a PDF, PNG or JPEG). The type is read from the bytes, not the name.
  • The size limit is the workspace plan's per-document limit. Anything else is refused with 400.
  • A key limited to some inboxes gets 403 for other inboxes. A missing inbox returns 404, and a draft inbox that is not active yet is refused.
  • The 200 lists the new document's id. Its values appear in the inbox when the parse finishes.
POST /api/v1/inboxes/cm7inbox/documents
curl -X POST https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/documents \
  -H "Authorization: Bearer mldxt_..." \
  -H "Content-Type: application/json" \
  -d '{"file_name": "invoice.pdf", "file_base64": "'"$(base64 < invoice.pdf | tr -d '\n')"'"}'

Create an inbox

POST/api/v1/inboxes

Create an inbox in this workspace. Send template to start it from a built-in template, as the console does. The response includes its email address.

Request body (JSON)

namestringRequired: Yes
The inbox name, up to 80 characters. Unique in the workspace.
templatestringRequired: No
A built-in template: invoice, receipt, bank_statement, purchase_order, resume, identity_document, payslip. With it the inbox is ACTIVE with that template's fields. Without it the inbox is a DRAFT.
iconstringRequired: No
A Lucide icon name such as "receipt". Null or omitted keeps the default.
  • 201 returns inbox.id, inbox.status and inbox.email.address.
  • A DRAFT does not parse mail or uploads until its fields are set in the console or with create_inbox_from_schema.
  • A key limited to some inboxes gets 403. Create the key with access to all inboxes.
  • Past the plan's inbox limit the status is 403 with code limit_reached. A duplicate name is 409.
  • An unknown template or icon returns 400.
POST /api/v1/inboxes
curl -X POST https://doxtract.manoonlabs.com/api/v1/inboxes \
  -H "Authorization: Bearer mldxt_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "March invoices",
  "template": "invoice",
  "icon": "receipt"
}'

Create an inbox from a schema

POST/api/v1/inboxes/from-schema

Create an active inbox from a schema you send, in the same format as saved fields. The API and MCP only: the console does not offer this path.

Request body (JSON)

namestringRequired: Yes
The inbox name, up to 80 characters. Unique in the workspace.
schemaobjectRequired: Yes
The fields to read. The inbox is ACTIVE at once.
iconstringRequired: No
A Lucide icon name. Null or omitted keeps the default.
  • 201 returns inbox.id, inbox.status (ACTIVE) and inbox.email.address.
  • An invalid schema returns 400 and no inbox is created.
  • Same key rules, limits and errors as create_inbox.
POST /api/v1/inboxes/from-schema
curl -X POST https://doxtract.manoonlabs.com/api/v1/inboxes/from-schema \
  -H "Authorization: Bearer mldxt_..." \
  -H "Content-Type: application/json" \
  -d '{
  "name": "Custom receipts",
  "schema": {
    "type": "object",
    "properties": {
      "vendor": {
        "type": "string"
      },
      "invoiceNumber": {
        "type": "string"
      },
      "issued": {
        "type": "date"
      },
      "total": {
        "type": "number"
      },
      "lineItems": {
        "type": "array",
        "items": {
          "type": "object",
          "properties": {
            "description": {
              "type": "string"
            },
            "amount": {
              "type": "number"
            }
          },
          "required": [
            "description",
            "amount"
          ]
        }
      }
    },
    "required": [
      "vendor",
      "invoiceNumber",
      "total"
    ]
  },
  "icon": "receipt"
}'

Update an inbox

PATCH/api/v1/inboxes/{inbox_id}

Change the name, icon and/or fields of an inbox. Renaming does not change its email address.

Request body (JSON)

namestringRequired: One of
New name, up to 80 characters. Unique in the workspace.
iconstring or nullRequired: One of
A Lucide icon name. Null goes back to the default icon.
schemaobjectRequired: One of
The inbox's new fields, in the same format as create_inbox_from_schema. It replaces the old fields of an ACTIVE inbox.
  • Send any of name, icon and schema. Sending none returns 400.
  • New fields apply to documents that arrive from now on. Documents already parsed keep their values until they are re-run in the console.
  • Only an ACTIVE inbox takes a schema. A draft returns 409 with code not_active: its fields are still being set up in the console. An invalid schema returns 400 and changes nothing.
  • A duplicate name returns 409. A missing inbox returns 404.
PATCH /api/v1/inboxes/cm7inbox
curl -X PATCH https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox \
  -H "Authorization: Bearer mldxt_..." \
  -H "Content-Type: application/json" \
  -d '{
  "icon": "wallet"
}'

Read an inbox's email address

GET/api/v1/inboxes/{inbox_id}/email

Read the email address of an inbox and whether it accepts mail. The address is created the first time it is read and does not change.

  • A key limited to some inboxes gets 403 for other inboxes.
  • A missing inbox returns 404. A server with no email domain returns 503.
GET /api/v1/inboxes/cm7inbox/email
curl -X GET https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/email \
  -H "Authorization: Bearer mldxt_..."

Enable or disable inbox email

PATCH/api/v1/inboxes/{inbox_id}/email

Turn mail receiving on or off for an inbox. The address stays the same. Documents already in the inbox are not affected.

Request body (JSON)

enabledbooleanRequired: Yes
true accepts mail, false ignores it.
  • Mail sent to a disabled address is ignored, not bounced.
  • 200 returns the address and its enabled value after the change.
PATCH /api/v1/inboxes/cm7inbox/email
curl -X PATCH https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/email \
  -H "Authorization: Bearer mldxt_..." \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": false
}'

Set the inbox webhook

PATCH/api/v1/inboxes/{inbox_id}/webhook

Send each parsed document of an inbox to your URL, including documents that arrive by email or upload, so no polling is needed. Every body is signed with the returned secret.

Request body (JSON)

urlstringRequired: One of
The https URL to POST to. An empty string turns the webhook off and keeps the other settings.
enabledbooleanRequired: One of
false pauses sending and keeps the URL (the console's Send automatically switch); true sends again.
auth_typestringRequired: No
How your receiver is authenticated: "none" (default), "basic" or "bearer".
usernamestringRequired: No
Basic auth user name.
secretstringRequired: No
Basic auth password, or the bearer token.
headersarrayRequired: No
Up to 10 extra headers, each {name, value}.
  • Each request has a Doxtract-Signature header. Check it with the secret before you trust the body.
  • 200 returns webhook.url and webhook.secret. Store the secret: it is the key to check signatures.
  • Changing url, auth_type, username, secret or headers needs a key created by the workspace owner. Other keys get 403. enabled alone works with any key that can use the inbox.
  • auth_type, username, secret and headers are sent with url. 200 also returns webhook.enabled.
  • An https URL is required in production. A bad URL or auth returns 400 with code invalid_webhook_url.
PATCH /api/v1/inboxes/cm7inbox/webhook
curl -X PATCH https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/webhook \
  -H "Authorization: Bearer mldxt_..." \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/doxtract",
  "auth_type": "bearer",
  "secret": "receiver-token"
}'

Upload files to an inbox (multipart)

POST/api/v1/upload/{inbox_id}

Add one or more documents to an inbox in one multipart request, so curl can upload with -F. Each file is read with the inbox's fields in the background and costs 1 credit per page. REST only: the MCP tool is upload_document.

Request body (multipart/form-data)

filefileRequired: Yes
A PDF, PNG or JPEG. Repeat the field to send several files. The type is read from the bytes, not the name.
instructionsstringRequired: No
How to read the values of these files, as the console's upload prompt. Saved as the inbox's prompt for later uploads.
  • The 200 lists every file with ok and its new document_id, or ok false with a code and message. One bad file does not stop the others.
  • The size limit is the workspace plan's per-document limit.
  • A key limited to some inboxes gets 403 for other inboxes. A missing inbox returns 404, and a draft inbox that is not active yet is refused.
POST /api/v1/upload/cm7inbox
curl -X POST https://doxtract.manoonlabs.com/api/v1/upload/cm7inbox \
  -H "Authorization: Bearer mldxt_..." \
  -F file=@invoice-1.pdf \
  -F file=@invoice-2.pdf

List an inbox's documents

GET/api/v1/inboxes/{inbox_id}/documents

List the documents of an inbox, newest first, with their status and failure reason. Values are not included: read them with get_document.

Query parameters

pageintegerRequired: No
Page number, from 1. Default 1.
page_sizeintegerRequired: No
Documents per page, 1 to 100. Default 20.
statusstringRequired: No
Only documents with this status: QUEUED, ANALYZING, PARSED, FAILED.
  • status is QUEUED (waiting), ANALYZING (being read), PARSED (values ready) or FAILED. A FAILED document has failure.code and failure.message.
  • has_file is false once the original file is no longer stored.
  • total is the number of documents that match, across every page.
GET /api/v1/inboxes/cm7inbox/documents
curl -X GET https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/documents?status=PARSED&page_size=20 \
  -H "Authorization: Bearer mldxt_..."

Read a document and its values

GET/api/v1/inboxes/{inbox_id}/documents/{document_id}

Read one document. Once it is PARSED the response has its values, with any edits made in the console, and its citations.

  • values and citations are null until the document is PARSED. result_status is ok or partial.
  • edited lists the value paths someone changed by hand in the console.
  • A document that is not in this inbox returns 404.
GET /api/v1/inboxes/cm7inbox/documents/cm7doc
curl -X GET https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/documents/cm7doc \
  -H "Authorization: Bearer mldxt_..."

Download a document's file

GET/api/v1/inboxes/{inbox_id}/documents/{document_id}/file

Download the file that was uploaded or emailed, as base64 in a JSON body, so it works the same from REST and MCP.

  • file.content is the file as base64. Decode it and save it as file.file_name.
  • A file that is no longer stored returns 410 with code file_gone.
GET /api/v1/inboxes/cm7inbox/documents/cm7doc/file
curl -X GET https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/documents/cm7doc/file \
  -H "Authorization: Bearer mldxt_..." \
  | jq -r .file.content | base64 --decode > invoice.pdf

Delete a document

DELETE/api/v1/inboxes/{inbox_id}/documents/{document_id}

Delete one document with its file, its values and its webhook call log. This cannot be undone.

  • A document still QUEUED or ANALYZING returns 409 with code busy. Try again when it has finished.
  • The first document of a draft inbox sets up its fields, so it returns 409 with code not_active: delete the inbox instead.
  • If a stored file could not be deleted, nothing is deleted and the status is 500 with code delete_failed. Try again.
DELETE /api/v1/inboxes/cm7inbox/documents/cm7doc
curl -X DELETE https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/documents/cm7doc \
  -H "Authorization: Bearer mldxt_..."

Export an inbox

POST/api/v1/inboxes/{inbox_id}/export

Build one Excel, CSV or JSON file from an inbox's parsed documents, with the same choices as the console's Export page.

Request body (JSON)

formatstringRequired: Yes
"xlsx", "csv" or "json".
document_idsarrayRequired: No
Only these documents, at most 20000. Ids that are not parsed or not in this inbox are left out.
except_idsarrayRequired: No
Every parsed document but these. Send this or document_ids, not both. Neither means every parsed document.
columnsarrayRequired: No
Field keys to include, in this order. Omit for every field.
  • Only PARSED documents whose values are still stored are exported, newest first.
  • file.content is the file as base64, with file.file_name and file.content_type.
  • This call reads only. It spends no credits and does not mark anything as exported.
POST /api/v1/inboxes/cm7inbox/export
curl -X POST https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/export \
  -H "Authorization: Bearer mldxt_..." \
  -H "Content-Type: application/json" \
  -d '{
  "format": "xlsx",
  "columns": [
    "vendor",
    "total"
  ]
}'

Read the inbox webhook

GET/api/v1/inboxes/{inbox_id}/webhook

Read an inbox's webhook: its URL, whether documents are sent automatically, the receiver's auth type and the custom header names.

  • enabled is the console's Send automatically switch. false keeps the URL and sends nothing.
  • A key created by the workspace owner also gets secret, the signing secret (made the first time it is read). Other keys get null and an empty username.
  • Header values are never returned, since they may hold credentials.
GET /api/v1/inboxes/cm7inbox/webhook
curl -X GET https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/webhook \
  -H "Authorization: Bearer mldxt_..."

Rotate the webhook signing secret

POST/api/v1/inboxes/{inbox_id}/webhook/secret

Replace the inbox's signing secret with a new one. Calls signed with the old secret stop verifying at once, so update your receiver right after.

  • There is no request body. 200 returns webhook.secret, the new secret.
  • Only a key created by the workspace owner can rotate it. Other keys get 403.
POST /api/v1/inboxes/cm7inbox/webhook/secret
curl -X POST https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/webhook/secret \
  -H "Authorization: Bearer mldxt_..."

List webhook deliveries

GET/api/v1/inboxes/{inbox_id}/webhook/deliveries

Read the inbox's webhook call log, newest first: the same calls the console's Calls page lists.

Query parameters

limitintegerRequired: No
How many calls, 1 to 100. Default 20.
  • event is document.parsed or document.failed. trigger is auto (sent when a parse ended) or manual (a resend).
  • http_status is null when the endpoint never answered. response_body holds the first 2,000 characters of its answer.
  • There is no automatic retry: resend a document with resend_document_webhook.
GET /api/v1/inboxes/cm7inbox/webhook/deliveries
curl -X GET https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/webhook/deliveries?limit=20 \
  -H "Authorization: Bearer mldxt_..."

Resend a document to the webhook

POST/api/v1/inboxes/{inbox_id}/documents/{document_id}/webhook

Send a parsed document's values to the inbox's webhook again, now. The call is added to the call log as a manual attempt.

  • There is no request body. 200 returns delivery.succeeded, delivery.http_status and delivery.error.
  • No URL set returns 409 with code webhook_no_url, a paused webhook webhook_off, and a document that is not PARSED webhook_not_ready.
POST /api/v1/inboxes/cm7inbox/documents/cm7doc/webhook
curl -X POST https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox/documents/cm7doc/webhook \
  -H "Authorization: Bearer mldxt_..."

Delete an inbox

DELETE/api/v1/inboxes/{inbox_id}

Delete an inbox with all its documents, their files and values, its fields and its webhook call log. This cannot be undone, and its email address stops receiving mail.

  • A key limited to some inboxes can delete only those.
  • If a stored file could not be deleted, nothing is deleted and the status is 500 with code delete_failed. Try again.
  • A missing inbox returns 404.
DELETE /api/v1/inboxes/cm7inbox
curl -X DELETE https://doxtract.manoonlabs.com/api/v1/inboxes/cm7inbox \
  -H "Authorization: Bearer mldxt_..."

Webhook events

EventWhen
document.parsedAn inbox document was parsed. Sent to the inbox webhook with the values and citations, by the auto send after a parse and by a resend.
document.failedAn inbox document could not be parsed, or its parse stopped and was given up. Sent once to the inbox webhook with failure.code and failure.message and no values. It is never counted as an export.
parse.job.finishedAn async parse that sent X-Webhook-Url ended, succeeded or failed. The body names the job and its result_url (a path on this API), not the values: read them with GET /api/v1/parse/jobs/{job_id}. Signed with the workspace's parse webhook secret.
  • Every call is a POST with Content-Type: application/json and a Doxtract-Event header naming the event.
  • Doxtract-Signature is t=<unix seconds>,v1=<hex HMAC-SHA256 of "<t>.<raw body>">. Compute it with the secret, compare in constant time, and refuse a t more than 5 minutes old.
  • Inbox events use the inbox's signing secret (get_inbox_webhook). parse.job.finished uses the workspace secret (get_parse_webhook_secret).
  • Answer with any 2xx within 10 seconds. A redirect, a timeout or another status is a failed call. There is no automatic retry. Inbox calls are in list_webhook_deliveries, and a parsed document can be sent again with resend_document_webhook (document.failed is not resent). A parse job can always be polled.
  • parse.job.finished is sent when the job ends on the server. A job whose server process stopped is settled by the next GET /api/v1/parse/jobs/{job_id} and calls back then; a job that expired unread never calls back. Asking needs a key made by the workspace owner, and a replay with the same X-Job-Id keeps the first job's X-Webhook-Url.
  • In production the URL must be https to a public host.
document.parsed.json
{
  "event": "document.parsed",
  "sent_at": "2026-10-26T00:00:00.000Z",
  "inbox": {
    "id": "cm7inbox"
  },
  "document": {
    "id": "cm7doc",
    "file_name": "invoice.pdf",
    "page_count": 2
  },
  "values": {
    "vendor": "Northwind",
    "total": 1280.5
  },
  "citations": null
}