Skip to main content

AIDA Webhook

Webhook is Destination that enables AIDA to automatically call an HTTPs endpoint whenever a document is processed by this flow. AIDA will perform an HTTP POST call with a JSON payload to the configured URL.

Configuration

The behavior of the webhook is controlled by the following parameters in the destination configuration:

ParameterRequiredDescriptionDefault Value
Webhook URLYesThe HTTPS endpoint URL that AIDA will call.-
Authorization headerNoThe value for the Authorization HTTP header. For example: Bearer your-secret-token.-
Webhook actionNoA string value that will be added to the JSON payload in the action field. Can be used to identify the event type on the receiver side.-
Document sending modeNoDefines how the document's PDF file is sent.Embed a download URL in the payload
ExpirationNoLink expiration for document download7 days
Add document contentNoIf enabled, adds a content field to the payload containing the document's full text, extracted by the OCR.Disabled
Ignore SSL/TLS certificate verificationNoUse with caution. If ernabled, AIDA will not validate the SSL certificate of the endpoint. Useful for testing with self-signed certs.Disabled

HTTP Headers

AIDA will send the following headers with the POST request:

  • Content-Type: application/json
  • Accept: application/json
  • Authorization: The value provided in the Authorization header configuration parameter, if any.

JSON Payload

The payload consists of a series of key-value pairs. Some are standard fields provided by AIDA, while others correspond to the properties extracted from the document.

Standard Fields

These fields are automatically added by AIDA based on the configuration.

FieldTypeDescription
actionstringThe value from the Webhook action configuration. Only present if configured.
documentURLstringA permanent link to view the document within the AIDA web application.
downloadURLstringA temporary, secure link to download the document's PDF file. Only present if Document sending mode is set to download (default).
attachmentstringThe Base64-encoded content of the document's PDF file. Only present if Document sending mode is to embed the file.
contentstringThe full text content of the document. Only present if Add document content is set enabled.

Document Properties

These fields correspond to the data extracted from the document.

  • Key: The JSON key for each property is determined by its "Output Mapping" configuration. If that is not set, the property's Label is used.
  • Data Types: Properties are automatically cast to the correct JSON type (e.g., Number, Boolean, String) based on their configuration in AIDA. Dates are represented as UNIX timestamp in milliseconds.
  • Tables: Properties that are part of a table will be grouped into a JSON array. The key for this array is determined by the table group's "Output Mapping" or, if not set, its Name.

Example

Given a document type with the following properties:

Header Properties

  • Invoice number (Label: Invoice number, Output Mapping: not configured, Type: String)
  • Invoice date (Label: Invoice date, Output Mapping: invoiceDate, Type: Date)
  • Total amount (Label: Total amount, Output Mapping: total, Type: Currency)

Table Property Group (Name: Invoice Lines, Output Mapping: lines):

  • Description (Output Mapping: description, Type: String)
  • Quantity (Output Mapping: qty, Type: Number)
  • Unit Price (Output Mapping: unitPrice, Type: Currency)

And the following AIDA destination configuration:

  • Webhook URL: https://api.mycompany.com/invoice-receiver
  • Webhook action: NEW_INVOICE
  • Document sending mode: download

The resulting JSON payload sent to the endpoint would look like this:

{
"Invoice number": "INV-2025-042",
"invoiceDate": "2025-10-14",
"total": 122.00,
"lines": [
{
"description": "Product A",
"qty": 2,
"unitPrice": 50.00
},
{
"description": "Service B",
"qty": 1,
"unitPrice": 22.00
}
],
"action": "NEW_INVOICE",
"documentURL": "[https://aida.mycompany.com/app/web/archive/12345](https://aida.mycompany.com/app/web/archive/12345)",
"downloadURL": "[https://api.aida.mycompany.com/asset/document/generated-auth-token](https://api.aida.mycompany.com/asset/document/generated-auth-token)"
}