clio-webhooks
БесплатноЗапускает вложенные скриптыНе проверенReceive and verify Clio (Clio Manage) webhooks. Use when setting up Clio webhook handlers, debugging X-Hook-Signature verification, completing the…
от hookdeck★ 104 звезды на GitHubОб этом скилле
Clio Webhooks
When to Use This Skill
- How do I receive Clio webhooks?
- How do I verify Clio webhook signatures (
X-Hook-Signature)? - How do I complete the Clio
X-Hook-Secrethandshake / activation? - How do I handle
created,updated,deleted, or matter lifecycle events? - Why is my Clio webhook signature verification failing?
- How do I keep a Clio webhook from expiring?
How Clio Webhooks Work
Clio Manage delivers webhooks in two distinct kinds of POST request to your URL:
- Handshake — Immediately after a webhook is created (or its URL changes),
Clio sends a POST containing an
X-Hook-Secretheader with a freshly generated shared secret. Your endpoint must confirm it (echo the same header back with200 OK). Clio's docs say the webhook is not enabled until the handshake succeeds — though in one observed EU test the webhook auto-enabled and began delivering without any handshake request arriving (see references/setup.md). Implement the echo regardless: it is how you obtain the secret, and it is the key for verifying every later event. - Events — Every subsequent delivery is signed. Clio computes
HMAC-SHA256(shared_secret, raw_request_body)and puts the digest in theX-Hook-Signatureheader. Verify it against the raw body.
Clio does not ask you to supply the secret when creating the webhook — Clio generates it and hands it to you during the handshake. Save it (e.g. keyed by
webhook_id) asCLIO_WEBHOOK_SECRET.
Verification (core)
X-Hook-Signature is the HMAC-SHA256 digest of the raw body, keyed with the
shared secret. Pass the raw body (never re-serialized JSON) and compare
timing-safe.
The digest is lowercase hex (64 characters). Clio's
webhooks guide computes it with hexdigest in both its Ruby and Python
examples, and a live delivery matched. The handlers below compute the digest once
and also accept base64 as a safety net, but hex is what you should expect.
Node:
const crypto = require('crypto');
function verifyClioWebhook(rawBody, signatureHeader, secret) {
if (!signatureHeader) return false;
const digest = crypto.createHmac('sha256', secret).update(rawBody).digest();
// Clio's examples use hex; base64 is accepted as a safety net.
return [digest.toString('hex'), digest.toString('base64')].some((expected) => {
try {
return crypto.timingSafeEqual(Buffer.from(signatureHeader), Buffer.from(expected));
} catch {
return false; // length mismatch → not a match
}
});
}
Python:
import hmac, hashlib, base64
def verify_clio_webhook(raw_body: bytes, signature_header: str, secret: str) -> bool:
if not signature_header:
return False
digest = hmac.new(secret.encode(), raw_body, hashlib.sha256).digest()
# Clio's examples use hex; base64 is accepted as a safety net.
return (
hmac.compare_digest(signature_header, digest.hex())
or hmac.compare_digest(signature_header, base64.b64encode(digest).decode())
)
Handle the handshake before signature verification — a request carrying an
X-Hook-Secret header is the handshake and must be echoed back, not verified:
// if (req.headers['x-hook-secret']) { res.set('X-Hook-Secret', secret); return res.status(200).end(); }
For complete handlers with the handshake, event dispatch, and tests, see:
Common Event Types
The event name arrives in the payload at meta.event (with meta.webhook_id).
All models support created, updated, deleted (Clio Payments payment
supports only created/updated). Matters add lifecycle events.
| Event | Fired When |
|---|---|
created |
A record of the subscribed model is created |
updated |
A watched field on the subscribed model changes |
deleted |
A record of the subscribed model is deleted |
matter_opened |
A matter's status changes to "Open" (matter model) |
matter_pended |
A matter's status changes to "Pending" (matter model) |
matter_closed |
A matter's status changes to "Close" (matter model) |
Models you can subscribe to: activity, bill, calendar_entry,
clio_payments_payment, communication, contact, document, folder,
matter, task.
Example event payload:
{ "data": { "id": 152, "etag": "\"9a103be2...\"" },
"meta": { "event": "created", "webhook_id": 1234 } }
For the full model/event reference, see Clio Webhooks docs.
Important Headers
| Header | Description |
|---|---|
X-Hook-Signature |
HMAC-SHA256 digest of the raw body (verify this). Observed as lowercase hex; the examples accept base64 too as a safet |
Установить clio-webhooks в Claude Code и Claude Desktop
Зарегайся, чтобы установить скилл
Создай бесплатный аккаунт, чтобы открыть команду установки и сохранить скилл в библиотеку.
- Открой команду установки в одну строку
- Сохраняй скиллы в синхронизируемую библиотеку
- Уведомления, когда скиллы обновляются
Разрешённые инструменты
Инструменты, которые скиллу разрешено вызывать.
Без ограничений — скилл может использовать любой инструмент.
Вложенные файлы
FAQ
Что делает скилл clio-webhooks?
Receive and verify Clio (Clio Manage) webhooks. Use when setting up Clio webhook handlers, debugging X-Hook-Signature verification, completing the X-Hook-Secret handshake, or handling legal practice events like matter.created, contact.updated, activity.created, or bill events.
Как установить скилл clio-webhooks?
Скопируй папку скилла в ~/.claude/skills (вкладка Claude Code выше делает это одной командой), либо поставь как плагин.
Скилл clio-webhooks запускает скрипты?
Да, скилл несёт исполняемые скрипты. Проверь исходник перед установкой.
Похожие скиллы
theme-factory
Toolkit for styling artifacts with a theme. These artifacts can be slides, docs, reportings, HTML landing pages, etc. There are 10 pre-set themes with…
от Anthropicaccess
Manage Discord channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropicconfigure
Set up the Discord channel — save the bot token and review access policy. Use when the user pastes a Discord bot token, asks to configure Discord, asks "how…
от Anthropicaccess
Manage iMessage channel access — approve pairings, edit allowlists, set DM/group policy. Use when the user asks to pair, approve someone, check who's allowed…
от Anthropic