Get Webhook Signing Key
curl --request GET \
--url https://app.uselamina.ai/v1/webhooks/signing-keyimport requests
url = "https://app.uselamina.ai/v1/webhooks/signing-key"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.uselamina.ai/v1/webhooks/signing-key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.uselamina.ai/v1/webhooks/signing-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.uselamina.ai/v1/webhooks/signing-key"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.uselamina.ai/v1/webhooks/signing-key")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.uselamina.ai/v1/webhooks/signing-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"keys": [
{
"kty": "OKP",
"crv": "Ed25519",
"x": "WR64jqplhAMsH7qC20Mqhm59yZjkiHfzfy6vCMAeIOk",
"kid": "lamina-webhook-v1",
"use": "sig",
"alg": "EdDSA"
}
]
}Too many requests from this IP, please try again in a minuteWebhooks
Get Webhook Signing Key
Returns the public key used to verify webhook signatures.
When you receive a webhook callback, verify it’s from Lamina by checking the
ED25519 signature in the X-Lamina-Webhook-Signature header.
Verification steps:
- Get the public key from this endpoint (cache it — it rarely changes)
- Reconstruct the signed message:
<timestamp>.<raw_body> - Verify the ED25519 signature against the message using the public key
Headers sent with each webhook:
X-Lamina-Webhook-Signature— ED25519 signature (hex-encoded)X-Lamina-Webhook-Timestamp— Unix timestamp (seconds) when signedX-Lamina-Webhook-Request-Id— Run ID (for idempotency)X-Lamina-Webhook-User-Id— User ID that triggered the runContent-Type: application/json
Retry policy: If your endpoint returns non-2xx or times out (15s), we retry 3 times with backoff: 5s, 30s, 2 minutes. Each retry has a fresh signature.
Replay protection: Reject webhooks with timestamps older than 5 minutes.
The signing key is returned as a JWK. Consume it directly — the x field
is a raw 32-byte Ed25519 public key (base64url), not a DER/SPKI blob.
Node.js verification example:
const crypto = require('crypto');
// Fetch once at startup: const { keys } = await fetch('.../v1/webhooks/signing-key').then(r => r.json());
// const PUBLIC_JWK = keys[0];
function verifyLaminaWebhook(rawBody, signatureHex, timestamp, jwk) {
const publicKey = crypto.createPublicKey({ key: jwk, format: 'jwk' });
const message = Buffer.from(timestamp + '.' + rawBody);
const signature = Buffer.from(signatureHex, 'hex');
return crypto.verify(null, message, publicKey, signature);
}
Python verification example:
import base64
from cryptography.hazmat.primitives.asymmetric.ed25519 import Ed25519PublicKey
# jwk = requests.get('.../v1/webhooks/signing-key').json()['keys'][0]
# raw = base64.urlsafe_b64decode(jwk['x'] + '==') # 32-byte Ed25519 public key
# public_key = Ed25519PublicKey.from_public_bytes(raw)
def verify_lamina_webhook(raw_body, signature_hex, timestamp, public_key):
message = f"{timestamp}.{raw_body}".encode()
signature = bytes.fromhex(signature_hex)
public_key.verify(signature, message) # Raises on failure
GET
/
v1
/
webhooks
/
signing-key
Get Webhook Signing Key
curl --request GET \
--url https://app.uselamina.ai/v1/webhooks/signing-keyimport requests
url = "https://app.uselamina.ai/v1/webhooks/signing-key"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://app.uselamina.ai/v1/webhooks/signing-key', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://app.uselamina.ai/v1/webhooks/signing-key",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://app.uselamina.ai/v1/webhooks/signing-key"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://app.uselamina.ai/v1/webhooks/signing-key")
.asString();require 'uri'
require 'net/http'
url = URI("https://app.uselamina.ai/v1/webhooks/signing-key")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"keys": [
{
"kty": "OKP",
"crv": "Ed25519",
"x": "WR64jqplhAMsH7qC20Mqhm59yZjkiHfzfy6vCMAeIOk",
"kid": "lamina-webhook-v1",
"use": "sig",
"alg": "EdDSA"
}
]
}Too many requests from this IP, please try again in a minute