curl --request POST \
--url https://api.example.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"events": [
"humanization.completed",
"humanization.failed"
],
"url": "https://your-service.example.com/webhooks/kallima"
}
'import requests
url = "https://api.example.com/v1/webhooks"
payload = {
"enabled": True,
"events": ["humanization.completed", "humanization.failed"],
"url": "https://your-service.example.com/webhooks/kallima"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
events: ['humanization.completed', 'humanization.failed'],
url: 'https://your-service.example.com/webhooks/kallima'
})
};
fetch('https://api.example.com/v1/webhooks', 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://api.example.com/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'events' => [
'humanization.completed',
'humanization.failed'
],
'url' => 'https://your-service.example.com/webhooks/kallima'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/webhooks"
payload := strings.NewReader("{\n \"enabled\": true,\n \"events\": [\n \"humanization.completed\",\n \"humanization.failed\"\n ],\n \"url\": \"https://your-service.example.com/webhooks/kallima\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"events\": [\n \"humanization.completed\",\n \"humanization.failed\"\n ],\n \"url\": \"https://your-service.example.com/webhooks/kallima\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"events\": [\n \"humanization.completed\",\n \"humanization.failed\"\n ],\n \"url\": \"https://your-service.example.com/webhooks/kallima\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-04-23T10:00:00+00:00",
"enabled": true,
"events": [
"humanization.completed",
"humanization.failed"
],
"id": "aaaa0001-bbbb-0002-cccc-000300040005",
"object": "webhook",
"updated_at": "2026-04-23T10:00:00+00:00",
"url": "https://your-service.example.com/webhooks/kallima"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}Register a webhook endpoint
Register a new HTTPS endpoint to receive Kallima events.
Returns the full Webhook object including the secret field —
the only time the raw signing secret is exposed. Store it immediately;
it cannot be recovered. To issue a new secret, call
PATCH /v1/webhooks/{id} with rotate_secret=true.
Signing. Every delivery carries a Kallima-Signature header with
the format t=<unix-ts>,v1=<hex-hmac-sha256>. Verify with:
hmac.compare_digest(expected_sig, received_sig) using
HMAC-SHA256("<secret>", "<timestamp>.<raw-body>").
Replay protection. Reject deliveries where t is more than 300
seconds old to defend against captured-and-replayed requests.
Cost: write — burns rate + quota.
curl --request POST \
--url https://api.example.com/v1/webhooks \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"enabled": true,
"events": [
"humanization.completed",
"humanization.failed"
],
"url": "https://your-service.example.com/webhooks/kallima"
}
'import requests
url = "https://api.example.com/v1/webhooks"
payload = {
"enabled": True,
"events": ["humanization.completed", "humanization.failed"],
"url": "https://your-service.example.com/webhooks/kallima"
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
enabled: true,
events: ['humanization.completed', 'humanization.failed'],
url: 'https://your-service.example.com/webhooks/kallima'
})
};
fetch('https://api.example.com/v1/webhooks', 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://api.example.com/v1/webhooks",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'enabled' => true,
'events' => [
'humanization.completed',
'humanization.failed'
],
'url' => 'https://your-service.example.com/webhooks/kallima'
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.example.com/v1/webhooks"
payload := strings.NewReader("{\n \"enabled\": true,\n \"events\": [\n \"humanization.completed\",\n \"humanization.failed\"\n ],\n \"url\": \"https://your-service.example.com/webhooks/kallima\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.post("https://api.example.com/v1/webhooks")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"enabled\": true,\n \"events\": [\n \"humanization.completed\",\n \"humanization.failed\"\n ],\n \"url\": \"https://your-service.example.com/webhooks/kallima\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"enabled\": true,\n \"events\": [\n \"humanization.completed\",\n \"humanization.failed\"\n ],\n \"url\": \"https://your-service.example.com/webhooks/kallima\"\n}"
response = http.request(request)
puts response.read_body{
"created_at": "2026-04-23T10:00:00+00:00",
"enabled": true,
"events": [
"humanization.completed",
"humanization.failed"
],
"id": "aaaa0001-bbbb-0002-cccc-000300040005",
"object": "webhook",
"updated_at": "2026-04-23T10:00:00+00:00",
"url": "https://your-service.example.com/webhooks/kallima"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}{
"code": "insufficient_credits",
"credit_balance": 0,
"credit_cost": 1,
"detail": "Humanization costs 1 credit; balance is 0.",
"instance": "/v1/jobs",
"request_id": "req_01JBX6Y6ZK6N8Q7YJ0F5VX2C3D",
"status": 402,
"title": "Insufficient credits",
"type": "https://docs.kallima.bio/errors/insufficient_credits"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Body
Body for POST /v1/webhooks.
HTTPS endpoint Kallima will POST events to.
"https://your-service.example.com/webhooks/kallima"
Event types to subscribe to. null or empty list means all events. Example values: humanization.completed, structure_prediction.failed.
[
"humanization.completed",
"humanization.failed"
]
Whether deliveries are attempted immediately. Default true.
Response
Successful Response
Registered webhook endpoint.
Opaque webhook identifier (UUID).
"aaaa0001-bbbb-0002-cccc-000300040005"
HTTPS endpoint Kallima delivers events to.
"https://your-service.example.com/webhooks/kallima"
Whether deliveries are being attempted.
ISO-8601 creation timestamp (UTC).
ISO-8601 last-updated timestamp (UTC).
Polymorphic discriminator. Always webhook.
Subscribed event types. null means all events.
Webhook signing secret. Returned only at creation time — subsequent reads omit this field. Store it immediately; it cannot be recovered. Rotate via PATCH rotate_secret=true.
"whsec_AbCdEfGhIjKlMnOpQrStUvWx1234567890ABCDEF"