Skip to main content

Examples

Data Examples

When events occur, your endpoint receives POST requests with event details. For privacy, sensitive data uses IDs (query the API for details) or encryption (e.g., deleted emails).

Data Handling
  • Use IDs to fetch full data via REST API.
  • Decrypt encrypted fields with the registration secret.
  • Condition is optional in registrations.

Examples below show registration payloads and webhook data.

Receiver Events

Registration Example

Register for all receiver events in group "1939" (condition = group ID).

{
"url": "https://hook.waynecorp.gc/cleverreach",
"event": "receiver",
"condition": "1939",
"verify": "damnSecretBatTokenForVerify"
}

Webhook Payloads

Subscription Event:

{
"event": "receiver.subscribed",
"condition": "1939",
"payload": {
"pool_id": "42",
"group_id": "1939"
}
}

Deletion Event (with encrypted email):

{
"event": "receiver.deleted",
"condition": "1939",
"payload": {
"pool_id": "42",
"email": "encrypted3mail4ddressheret0bedecryptedw1ththegivensecret",
"group_id": "1939"
}
}

Form Events

Registration Example

Register for form events in group "1939".

{
"url": "https://hook.waynecorp.gc/cleverreach",
"event": "form",
"condition": "1939",
"verify": "damnSecretBatTokenForVerify"
}

Webhook Payload

{
"event": "form.updated",
"condition": "1939",
"payload": {
"form_id": "23"
}
}

Automation Events

Registration Example

Register for automation events (condition optional, e.g., collection ID).

{
"url": "https://hook.waynecorp.gc/cleverreach",
"event": "automation",
"condition": "123456789",
"verify": "damnSecretBatTokenForVerify"
}

Webhook Payload

{
"event": "automation.activated",
"condition": "123456789",
"payload": {
"collection_id": "123456789"
}
}