---
title: "Using ClickHouse as a webhook endpoint with HMAC verification"
description: "ClickHouse 25.12's new HMAC function lets a ClickHouse HTTP endpoint verify webhook signatures directly in SQL."
url: "https://swe.quest/articles/using-clickhouse-as-a-webhook-endpoint-with-hmac-verification-e66d732ddcb02589"
canonical: "https://clickhouse.com/blog/clickhouse-webhook-endpoint"
source: "ClickHouse"
published: "2026-03-03"
difficulty: "medium"
kind: "How-to"
reading_minutes: 6
tags: ["analytics","sql","identity-auth","event-driven"]
---

# Using ClickHouse as a webhook endpoint with HMAC verification

A post on [ClickHouse](https://swe.quest/sources/clickhouse.md), published 2026-03-03, 6 min read, How-to. Original: [https://clickhouse.com/blog/clickhouse-webhook-endpoint](https://clickhouse.com/blog/clickhouse-webhook-endpoint)

## Summary

ClickHouse 25.12's new HMAC function lets a ClickHouse HTTP endpoint verify webhook signatures directly in SQL. Requests land in a staging table that captures the raw body via FORMAT RawBLOB and the X-Hub-Signature-256 header via getClientHTTPHeader. A materialized view then forwards only rows whose signature matches HMAC('SHA256', payload, secret) into a JSON-typed table. The walkthrough covers a restricted passwordless insert user, curl tests with valid and rogue keys, and wiring ClickHouse Cloud up as a GitHub webhook receiver. In production it recommends the Null engine for staging, plus rate limits on the webhook user.

Written by swe.quest, not by the author.

**Difficulty:** Medium: assumes a working developer; shows how it is built or done

## Topics

- [Analytics & OLAP](https://swe.quest/tags/analytics.md) (Data & databases)
- [SQL](https://swe.quest/tags/sql.md) (Languages)
- [Identity & auth](https://swe.quest/tags/identity-auth.md) (Security)
- [Event-driven architecture](https://swe.quest/tags/event-driven.md) (Backend & APIs)

## Prerequisites

- ClickHouse materialized views ([easy posts on Analytics & OLAP](https://swe.quest/tags/analytics.md?difficulty=easy))
- HMAC signatures
- Webhooks

## Keywords

ClickHouse, ClickHouse Cloud, HMAC, GitHub webhooks, Null table engine, RawBLOB

## Related posts

- [Adding Analytics to an Application in under 10 minutes with ClickHouse Cloud Query Endpoints](https://swe.quest/articles/adding-analytics-to-an-application-in-under-10-minutes-with-clickhouse-cloud-8026d8ff6e788ea8.md): ClickHouse · 2024-09-24 · Medium · 9 min read · Analytics & OLAP, API design, SQL, React
  ClickHouse Cloud's beta API endpoints turn a saved parameterized SQL query into a secure HTTP POST endpoint, moving SQL out of application code so queries can change without redeploying.
- [ClickHouse Newsletter January 2023: Better Safe Than Sorry](https://swe.quest/articles/clickhouse-newsletter-january-2023-better-safe-than-sorry-86f3c43fcf5ac992.md): ClickHouse · 2023-01-19 · Medium · 6 min read · Analytics & OLAP, Databases, Cryptography, SQL
  ClickHouse's January 2023 newsletter lists upcoming webinars and recaps the 22.12 release.
- [Structured Logging in .NET with Serilog and ClickHouse](https://swe.quest/articles/structured-logging-in-net-with-serilog-and-clickhouse-433c37101ab76f06.md): ClickHouse · 2026-03-23 · Medium · 20 min read · .NET, Observability, Analytics & OLAP
  Serilog's ClickHouse sink lets an ASP.NET service write structured logs directly into a ClickHouse table with one WriteTo.ClickHouse() call.
- [ClickHouse Plugin for Grafana - 2.0 Release](https://swe.quest/articles/clickhouse-plugin-for-grafana-2-0-release-6cc77a953b0e269e.md): ClickHouse · 2022-09-02 · Medium · 9 min read · Analytics & OLAP, Observability, SQL
  Version 2.0 of the ClickHouse Grafana plugin drops its client-side SQL AST parser and implements ad-hoc filters with ClickHouse's new \`additional\_table\_filters\` setting (22.7+), so the server injects each filter into the correct clauses, including subqueries.
- [Using ClickHouse to Monitor Job Queues in GitHub Actions](https://swe.quest/articles/using-clickhouse-to-monitor-job-queues-in-github-actions-98d7a5d7c86849dc.md): ClickHouse · 2023-01-05 · Medium · 3 min read · CI/CD, Observability, Analytics & OLAP, SQL
  GitHub Actions lacks built-in metrics for its workflow job queue, but an organization-level webhook emitting workflow\_job events can feed an AWS Lambda that inserts each event into a ClickHouse MergeTree table.

Browse: [Latest posts](https://swe.quest/index.md) · [Topics](https://swe.quest/tags.md) · [Sources](https://swe.quest/sources.md) · [Topic map](https://swe.quest/map.md) · [Site guide (llms.txt)](https://swe.quest/llms.txt)
