Skip to main content
Import an invoice from Documents

Authorizations

Authorization
string
header
required

Personal API key. Send X-Organization-Id. The required cumulative level is listed in x-watchdog-permission.

Headers

X-Organization-Id
string

Required for personal API keys. Target one organization you have access to. Migrated keys may omit it to use their original organization. For Clerk sessions, it must match the active organization.

idempotency-key
string

Optional protection for safely retrying a request after a timeout or lost response. Choose a unique value (for example, a UUID) for each action and reuse it with the same input when retrying. Omit it for a normal request.

Required string length: 1 - 200
Pattern: ^[\x21-\x7e]+$

Body

application/json
primary_document_id
string<uuid>
required

Document containing the invoice; its bytes must already be uploaded.

attachment_document_ids
string<uuid>[]

Distinct supplementary Documents in the order to retain; must exclude the primary Document.

Response

Idempotent replay or known primary-file duplicate

outcome
enum<string>
required
Available options:
accepted
import_id
string<uuid>
required
workflow_run_id
string<uuid>
required
workflow_run_item_id
string<uuid>
required