Skip to main content

Split a PDF into document page ranges and classify each document asynchronously

POST 

/api/v8/partner/split-and-classify/async

Same as the synchronous endpoint, but returns the split id immediately and delivers the result to your configured webhook. This API supports .pdf,.zip. The max file size is 50mb. The max number of pages to process is limited to 250. When it finishes, you should expect a request with this payload:

{'event': 'split_and_classify.created', 'data': {'id': 42000, 'created': '2026-10-16 16:40:40', 'page_breaks': [{'page_start': 1, 'page_end': 2, 'document_type': {'value': 'invoice', 'score': 0.97}}, {'page_start': 3, 'page_end': 5, 'document_type': {'value': 'statement', 'score': 0.91}}], 'error': None}}

If it fails, the event is split_and_classify.failed, page_breaks is empty and error describes the failure.

Request​

Body

    external_id (string | null)

    Possible values: non-empty

    A custom identification value. Use this if you would like to assign your own ID to documents. This parameter is useful when mapping this document to a service or resource outside Veryfi.

    meta.tags string[]

    Possible values: non-empty

    Default value: ``

    Tags you want to associate with the document.

    package_path (string | null)

    Possible values: non-empty

    A path to a file in an S3 bucket, e.g. 'some/receipt.jpg

    bucket (string | null)

    Possible values: non-empty

    An S3 bucket for 'package_path', e.g. 'documents'.

    file_data (string | null)

    Possible values: non-empty

    Used to upload a document via base64 encoded string, could be raw or data URI scheme. This is the least effective way to upload a document for processing. See file_urls or uploading zip files.

    file_url (string | null)

    Possible values: non-empty

    A URL to a publicly accessible document to be sent to Veryfi for processing.

    file_urls string[]

    Possible values: non-empty

    An array of URLs to publicly accessible documents to be sent to Veryfi for processing.

    file_name (string | null)

    Possible values: non-empty

    An optional filename. Useful to determine file type.

    split_by_blank_page boolean

    Default value: false

    Split the PDF on blank pages instead of detecting document boundaries. Each blank page marks the end of a document and is not included in any of the resulting page ranges.

    max_pages_to_process integer

    Possible values: >= 1 and <= 250

    Default value: 250

    Limit processing to number of pages.

    document_types object[]

    Possible values: >= 1

    The types to classify each document into. If omitted, a preset set of types will be used.

  • Array [
  • anyOf

    string

  • ]

Responses​

The unique identifier of the split.

Schema
    id integerrequired

    The unique identifier of the split.

Loading...