Skip to main content
Version: v2

Webhook

Paperbox supports webhooks as a way of extending the platform and listening for the state of documents. These webhooks are registered to receive callbacks from Paperbox for each document that is approved, either manually or automatically, or deleted.

Each Paperbox inbox can be equipped with one or more webhooks. Each webhook should be accessible through a HTTP endpoint. Webhook security can be achieved through either API keys validation or mTLS. In addition, Paperbox can provision a static ip to allow ip whitelisting as an additional security layer.

Fields

Our default response payload comes in JSON format and contains the following fields:

ParameterTypeOptionalDescription
actionstringfalseOne of 'approve', 'delete' or 'bounce'.
action_metadataarraytrueMetadata provided when a Paperbox user acted onto a document
processed_datestringfalseDocument processing timestamp. ISO-formatted.
actorstringfalseUser email or "paperbox" for automatically processed documents.
idstringfalseDocument ID passed in the ingestion API
paperbox_idstringfalsePaperbox document ID. For referencing with Paperbox.
confidencenumbertrueClassification confidence (not for deleted documents).
document_classstringtrueDocument class.
document_subclassstringtrueDocument subclass.
entitiesarraytrueExtracted entities.
metadataobjecttrueThe provider key value withholds document metadata passed in the ingestion API. Whilst the user key value withholds the information found during processing of the document within Paperbox
mutation_idstringtrueMutation ID for copies or splits.
mutation_typestringtrueOne of 'copy' or 'split'

JSON Examples

tip

Optional fields, depending on which action or type of document get included in the webhook payload, are highlighted in yellow.

{
"action": "string",
"action_metadata": [
{
"type": "string",
"value": "string"
}
],
"processed_date": "string",
"actor": "string",
"id": "string",
"paperbox_id": "string",
"confidence": "float",
"document_class": "string",
"document_subclass": "string",
"entities": [
{
"string": "string"
}
],
"metadata": {
"provider": {
"string": "string"
},
"user": {
"string": "string"
}
},
"mutation_id": "string",
"mutation_type": "string"
}