Skip to content

Webhooks

The schematic below shows a simple diagram of the use of webhooks in Pergamin.

Webhooks concept

Simple Webhooks concept

Enable webhooks

Webhooks are disabled by default. To enable them please send an URL address to which the webhooks will be sent to the Pergamin support team

Retry policy

Pergamin will retry sending the webhook up to 5 times with a delay policy explained in the table below. If the webhook is not delivered after 5 attempts, it will be discarded.

Attempt Delay
1 30 s
2 3 min
3 10 min
4 30 min
5 1 h

Events

Document status change

HTTP Request
POST {external_api_url} HTTP/1.1
Content-Type: application/json
Accept: text/plain
{
    "dataStream": string,
    "documentStatus": string,
    "documentId": integer,
    "transactionId": string,
    "timestamp": integer
}
Parameter Type Nullable Description
dataStream string Data stream name
documentStatus enum(
draft,
sent,
in_acceptance,
in_sign,
on_hold,
rejected,
finished
)
Document status
documentId integer Document ID
transactionId string (UUID) Transaction ID
timestamp integer Timestamp in milliseconds
Expected success response
HTTP/1.1 200 OK
Content-Type: text/plain 

OK