When you log in to your portal, click on Advanced in the left panel, and then click Webhooks. You can create Emitter Webhooks and enable Receiver Webhooks.
Enter the Webhook URL and type of Webhook you want to create (complete guide available here). You can also test your Webhook by sending a POST request at the bottom of the page:
The full list of webhook events are:
Sync notifications: LinkedAccount.fully_synced_initial and LinkedAccount.synced
Issue notifications: Issue.created and Issue.resolved
Common model notifications (common_model_name will be the actual name): common_model_name.added, common_model_name.changed, common_model_name.removed
Webhook payload
The
hook
object: contains information about the webhook itself, including the triggering actionThe
linked_account
object: contains identifying information about the linked account that triggered the webhook.The
data
object: this is the part that changes depending on your webhook configuration!A “Linked Account Issue” webhook will send an /issue object.
A “sync notification” webhook will send a /sync-status object.
A “data changed” webhook will send the actual Merge common model. So, a “candidate.updated" webhook will send the candidate object, and an “employee.created” webhook will send an employee object
Example sync status payload:
{
"hook": {
"id": "164f934e-5b1a-433e-9f7f-85c72b8cd155",
"event": "LinkedAccount.synced",
"target": "https://typedwebhook.tools/webhook/620e9c36-9242-4f53-9ea5-fb908bc16556"
},
"linked_account": {
"id": "0e7cceaa-9b5c-4d44-8606-6e99f2b83026",
"integration": "Linear",
"integration_slug": "linear",
"category": "ticketing",
"end_user_origin_id": null,
"end_user_organization_name": "Merge Sandbox Account",
"end_user_email_address": "[email protected]",
"status": "COMPLETE",
"webhook_listener_url": "https://api.merge.dev/api/integrations/webhook-listener/NklqLkUfSocPg2ROML79uBG_xUuIoImRFNkZGG6q7LfE_lETf8O3fA",
"is_duplicate": null
},
"data": {
"account_token": "<redacted>",
"integration_name": "Linear",
"integration_id": "linear",
"synced_models": [
"ticketing.Comment"
]
}
}