Skip to navigation

Export Documents

View as Markdown

Overview

Export multiple documents that match the specified filters and send the resulting file (for example, a CSV export) to one or more email recipients.

Request Headers

AttributeTypeOptionDescription
x-api-keyStringRequiredAPI key for the tenant
AuthorizationStringRequiredBearer access token

Request Body

The request body must be a JSON object with the following fields:

{
"qids": [13315],
"state": ["COMPLETED"],
"labels": ["example-label"],
"docType": "CSV",
"language": "EN",
"emails": [
"user@example.com"
]
}

Body Fields

FieldTypeRequiredDescription
qidsArray(Int)OptionalList of queue IDs to include in the export. Only documents belonging to these queues are considered. All values must be integers.
stateArray(String)OptionalList of document states to export. Common values include "COMPLETED", "EXPORTED".
labelsArray(String)OptionalOne or more document labels to further filter the export set.
docTypeStringRequiredOutput format of the export file. Supported values typically include "CSV".
languageStringOptionalLanguage code for localized export content, where applicable. For example: "EN".
emailsArray(String)RequiredList of recipient email addresses. The generated export file or download link is sent to these addresses.

Authentication

x-api-keystring
API key issued by Staple.
AuthorizationBearer
JWT obtained from the login endpoint.

Request

This endpoint expects an object.
qidslist of integersOptional
statelist of stringsOptional
labelslist of stringsOptional
docTypestringOptional
languagestringOptional
emailslist of stringsOptional

Response

OK