Command Palette

Search for a command to run...

UnylyUnyly
Назад к скиллам

merge-webhooks

БесплатноЗапускает вложенные скриптыНе проверен

Receive and verify Merge webhooks (Merge Unified API for HRIS, ATS, CRM, accounting, ticketing and file storage). Use when creating webhooks on the Merge…

hookdeckот hookdeck★ 104 звезды на GitHub

Об этом скилле

Merge Webhooks

Merge gives one Unified API over many HRIS, ATS, CRM, accounting, ticketing and file storage providers. It sends a POST with a JSON body to your URL when a Linked Account is linked, synced or deleted, when an issue opens, or when Common Model data changes. You create webhooks on the Webhooks page of the dashboard. Webhooks and the signature key are shared across your Merge organization.

When to Use This Skill

  • How do I receive Merge webhooks?
  • How do I verify the X-Merge-Webhook-Signature header?
  • Why does my Merge signature never match? (usually: the body was re-serialised, or the = padding was handled on one side only)
  • How do I handle LinkedAccount.sync_completed or Candidate.changed?
  • What happens when I regenerate the Merge signature key?

Verification (core)

X-Merge-Webhook-Signature is the HMAC-SHA256 of the raw body, keyed with your organization's signature key, encoded as base64url with = padding (44 characters).

const crypto = require('crypto');

function verifyMergeSignature(rawBody, signature, key) {   // rawBody: exact bytes
  const value = String(signature || '').trim();
  if (!key || !/^[A-Za-z0-9_-]{43}=?$/.test(value)) return false;
  const given = Buffer.from(value.replace(/=$/, ''));
  const expected = Buffer.from(crypto.createHmac('sha256', key).update(rawBody).digest('base64url'));   // unpadded
  return crypto.timingSafeEqual(given, expected);
}
  • Padding. Merge's samples send the trailing =, but Node's digest('base64url') drops it. Strip it on both sides before comparing, as Merge's own agent skill does. A plain string compare between the two forms always fails.
  • base64url, not base64. The header uses - and _. Don't compare it with a standard base64 digest.
  • Raw body. Merge HMACs "the byte-formatted payload". Verify the bytes you received, not re-serialised JSON.
  • Bad or missing signature: 401. Key not set: 500. Merge's own skill says a 4xx drops the event with no retry.

For complete handlers with tests, see examples/express/, examples/nextjs/, examples/fastapi/.

Python uses hmac.new(key.encode(), raw_body, hashlib.sha256), base64.urlsafe_b64encode(...).rstrip(b"=") and hmac.compare_digest. See references/verification.md.

Hookdeck: the Merge source type (MERGE) verifies X-Merge-Webhook-Signature with your signature key and ignores trailing = padding on both sides. Verification is optional on the source. Merge signs no timestamp, and Hookdeck applies no timestamp window. The key is organization-wide, so update the source if you regenerate it.

Payload

{
  "hook": { "id": "cb1fe0a7-c2a1-4bd6-8cf5-57e70c7f1d53", "event": "Candidate.changed", "target": "https://yoururl.com" },
  "linked_account": { "id": "a3602c03-aba7-4d9d-a349-dbc338504092", "integration": "Workday", "integration_slug": "workday", "category": "ats", "end_user_origin_id": "", "status": "COMPLETE", "account_type": "PRODUCTION" },
  "data": { "id": "22582af6-b45e-4d34-bed6-77bb40effa97", "remote_id": "97134123", "first_name": "Gil", "last_name": "Feig" }
}

hook.event names the event, linked_account is the end user whose data changed, and data is the affected model. AsyncPassthrough.resolved has async_passthrough_receipt_id and status in place of linked_account.

Event Types

Webhook hook.event
Linked Account linked LinkedAccount.linked
Linked Account synced LinkedAccount.sync_completed
Linked Account deleted LinkedAccount.deleted (sent after the account is fully removed, which can take hours)
Linked Account issues Issue.new, Issue.reopened, Issue.muted, Issue.resolved (one subscription delivers all four)
Common Model synced {common_model}.synced, such as Candidate.synced
Changed data {common_model}.added, {common_model}.changed (the latest version of the model)
Deleted data {common_model}.removed
Async operations AsyncPassthrough.resolved, AsyncPost.completed, AsyncBulkPost.completed

Handle hook.event values you don't act on as no-ops, not errors. See references/overview.md.

Environment Variables

MERGE_WEBHOOK_SIGNATURE_KEY=your-signature-key   # Webhooks page > Security (organization-wide)

Local Development

# Express / Next.js (use 8000 for FastAPI). No install or account required.
npx hookdeck-cli listen 3000 merge --path /webhooks/merge

Add the printed URL with +Webhook on the Webhooks page, then click Send test POST request. See references/setup.md.

Reference Materials

Полный SKILL.md на GitHub

Установить merge-webhooks в Claude Code и Claude Desktop

Зарегайся, чтобы установить скилл

Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.

  • Открой команду установки в одну строку
  • Сохраняй скиллы в синхронизируемую библиотеку
  • Уведомления, когда скиллы обновляются
Зарегаться бесплатноУ меня уже есть аккаунт

Разрешённые инструменты

Инструменты, которые скиллу разрешено вызывать.

Без ограничений — скилл может использовать любой инструмент.

Вложенные файлы

examples/express/.env.exampleexamples/express/README.mdexamples/express/package.jsonexamples/express/src/index.jsexamples/fastapi/.env.exampleexamples/fastapi/README.mdexamples/fastapi/main.pyexamples/fastapi/requirements.txtexamples/fastapi/test_webhook.pyexamples/nextjs/.env.exampleexamples/nextjs/README.mdexamples/nextjs/app/webhooks/merge/route.tsexamples/nextjs/lib/verify-merge.tsexamples/nextjs/package.jsonexamples/nextjs/vitest.config.tsreferences/overview.mdreferences/setup.mdreferences/verification.md

FAQ

Что делает скилл merge-webhooks?

Receive and verify Merge webhooks (Merge Unified API for HRIS, ATS, CRM, accounting, ticketing and file storage). Use when creating webhooks on the Merge Webhooks page, verifying the X-Merge-Webhook-Signature header (padded base64url HMAC-SHA256 of the raw body keyed with the organization-wide signature key), debugging signature mismatches, or handling events like LinkedAccount.linked, LinkedAccount.sync_completed, LinkedAccount.deleted, Issue.new, {Model}.synced, {Model}.changed and AsyncPassthrough.resolved.

Как установить скилл merge-webhooks?

Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.

Скилл merge-webhooks запускает скрипты?

Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.

Похожие скиллы

Сравнить merge-webhooks с