With PactSafe, you can setup Webhooks to notify any third party system of major events that you can configure through Integrations. If you don't have Integrations enabled in your account, please contact [email protected] and we'll help you out!
Available Webhook Types
- Activity - All
- Activity - Agreed
- Request Sent
- Request Signed
- Request Complete
- Request Expired
- Version Published
Configuration FAQ
HTTP GET
or POST
?
We generally recommend going with POST as some additional data may be passed. We will pass parameters for the Webhook as query string variables in GET
and a request body with POST
. The examples for this Guide are POST
.
Secret Code
The secret code allows you to create a more secure connection to the Webhook. We'll pass the secret code in an HTTP Header called Pactsafe-Webhook-Token
.
Example Payloads
There are 7 types of events you can configure for when setting up webhooks. Each event has some common properties and some properties unique to the Webhook. We'll outline an example payload for each Webhook below, including the Test Webhook Payload.
Test Webhook
The Test Webhook
is a webhook button inside the PactSafe Web App that allows you to test your webhook integration.
{
"deliverable": true,
"type": "webhook",
"integration": "123",
"sent_to": "https://123.m.pipedream.net",
"event_type": "test_event",
"description": "Test sent a test event!",
"site": 1,
"user": 1,
"created_time": "2020-10-21T13:45:51.087Z",
"updated_time": "2020-10-21T13:45:51.096Z",
"id": "1234abcd"
}
{
"x-forwarded-for": "1.2.3.4",
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "example.com",
"content-length": "358",
"pactsafe-webhook-token": "my-secret-code",
"accept": "application/json",
"content-type": "application/json"
}
Limit Usage
Due to the potential volume of events you may send to PactSafe, we generally don't recommend using this webhook type unless absolutely necessary for your workflow as it could lead to many webhooks events.
This is triggered for any type of Activity on Signature Requests, Smartpacts, and Clickwraps.
{
"deliverable": true,
"type": "webhook",
"integration": "123",
"sent_to": "https://example.com",
"event_type": "activity_displayed",
"description": "[email protected] viewed Privacy Policy in Group Example Web Group",
"contract": 1234,
"group": 123,
"version": "1234abcd",
"site": 1,
"created_time": "2020-10-21T13:51:09.370Z",
"activity": "abcd1234abcd1234",
"updated_time": "2020-10-21T13:51:09.440Z",
"id": "123abc123abc"
}
{
"x-forwarded-for": "1.2.3.4",
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "example.com",
"content-length": "358",
"pactsafe-webhook-token": "my-secret-code",
"accept": "application/json",
"content-type": "application/json"
}
Activity - Agreed
This webhook is triggered for each individual Contract in a Signature Request or in a Clickwrap.
{
"deliverable": true,
"type": "webhook",
"integration": "123",
"sent_to": "https://example.com",
"event_type": "activity_agreed",
"description": "[email protected] agreed to Privacy Policy in Group Example Web Group",
"contract": 1234,
"group": 123,
"version": "1234abcd",
"site": 1,
"created_time": "2020-10-21T13:55:59.070Z",
"activity": "abcd1234abcd1234",
"updated_time": "2020-10-21T13:55:59.150Z",
"id": "123abc123abc"
}
{
"x-forwarded-for": "1.2.3.4",
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "example.com",
"content-length": "358",
"pactsafe-webhook-token": "my-secret-code",
"accept": "application/json",
"content-type": "application/json"
}
{
"deliverable": true,
"type": "webhook",
"integration": "123",
"sent_to": "https://example.com",
"event_type": "request_sent",
"description": "John Doe sent This is my request name",
"site": 1,
"request": "123456abcdef",
"user": 1,
"created_time": "2020-10-21T13:58:54.578Z",
"updated_time": "2020-10-21T13:58:54.578Z",
"id": "abcdef12345"
}
{
"x-forwarded-for": "1.2.3.4",
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "example.com",
"content-length": "358",
"pactsafe-webhook-token": "my-secret-code",
"accept": "application/json",
"content-type": "application/json"
}
Request Signed
This webhook is triggered once a Signer has Agreed to and completed all necessary fields in a Signature Request.
{
"deliverable": true,
"type": "webhook",
"integration": "123",
"sent_to": "https://example.com",
"event_type": "request_signed",
"description": "John Doe signed This is my request name",
"site": 1,
"request": "123456abcdef",
"signer": "a-signer-id",
"created_time": "2020-10-21T14:01:17.360Z",
"updated_time": "2020-10-21T14:01:17.361Z",
"id": "abcdef12345"
}
{
"x-forwarded-for": "1.2.3.4",
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "example.com",
"content-length": "358",
"pactsafe-webhook-token": "my-secret-code",
"accept": "application/json",
"content-type": "application/json"
}
{
"deliverable": true,
"type": "webhook",
"integration": "123",
"sent_to": "https://example.com",
"event_type": "request_complete",
"description": "This is my request name has been completed",
"site": 1,
"request": "123456abcdef",
"created_time": "2020-10-21T14:01:17.395Z",
"updated_time": "2020-10-21T14:01:17.395Z",
"id": "abcdef12345"
}
{
"x-forwarded-for": "1.2.3.4",
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "example.com",
"content-length": "358",
"pactsafe-webhook-token": "my-secret-code",
"accept": "application/json",
"content-type": "application/json"
}
{
"deliverable": true,
"type": "webhook",
"integration": "123",
"sent_to": "https://example.com",
"event_type": "request_expired",
"description": "This is my request name has expired",
"site": 1,
"request": "abcd1234",
"created_time": "2020-10-21T14:05:23.821Z",
"updated_time": "2020-10-21T14:05:23.821Z",
"id": "1234abcd"
}
{
"x-forwarded-for": "1.2.3.4",
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "example.com",
"content-length": "358",
"pactsafe-webhook-token": "my-secret-code",
"accept": "application/json",
"content-type": "application/json"
}
{
"deliverable": true,
"type": "webhook",
"integration": "123",
"sent_to": "https://example.com",
"event_type": "version_published",
"description": "John Doe published version 17.1 of Terms of Service",
"site": 1,
"version": "5f904073c545986f47ecc1ec",
"contract": 123,
"user": 1,
"created_time": "2020-10-21T14:07:01.230Z",
"updated_time": "2020-10-21T14:07:01.231Z",
"id": "abcd1234"
}
{
"x-forwarded-for": "1.2.3.4",
"x-forwarded-proto": "https",
"x-forwarded-port": "443",
"host": "example.com",
"content-length": "358",
"pactsafe-webhook-token": "my-secret-code",
"accept": "application/json",
"content-type": "application/json"
}
Updated 4 months ago