Register a webhook endpoint
curl --request POST \
--url https://api.kuahr.com/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"url": "https://your-app.com/kua/webhooks",
"description": "Production receiver",
"eventTypes": "payroll.run.disbursed,employee.created"
}
'import requests
url = "https://api.kuahr.com/v1/webhooks"
payload = {
"url": "https://your-app.com/kua/webhooks",
"description": "Production receiver",
"eventTypes": "payroll.run.disbursed,employee.created"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://your-app.com/kua/webhooks',
description: 'Production receiver',
eventTypes: 'payroll.run.disbursed,employee.created'
})
};
fetch('https://api.kuahr.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.kuahr.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([
'url' => 'https://your-app.com/kua/webhooks',
'description' => 'Production receiver',
'eventTypes' => 'payroll.run.disbursed,employee.created'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.kuahr.com/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://your-app.com/kua/webhooks\",\n \"description\": \"Production receiver\",\n \"eventTypes\": \"payroll.run.disbursed,employee.created\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.kuahr.com/v1/webhooks")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://your-app.com/kua/webhooks\",\n \"description\": \"Production receiver\",\n \"eventTypes\": \"payroll.run.disbursed,employee.created\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kuahr.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://your-app.com/kua/webhooks\",\n \"description\": \"Production receiver\",\n \"eventTypes\": \"payroll.run.disbursed,employee.created\"\n}"
response = http.request(request)
puts response.read_body{
"id": "d4e5f6a7-0000-0000-0000-000000000001",
"url": "https://your-app.com/kua/webhooks",
"description": "Production receiver",
"eventTypes": "payroll.run.disbursed,employee.created",
"isActive": true,
"secret": "whsec_3f8a9b2c1d4e5f6a7b8c9d0e1f2a3b4c"
}{
"code": "<string>",
"message": "<string>"
}Webhooks
Register a webhook endpoint
Registers a URL to receive events. The response includes the signing secret (whsec_…) once — store it to verify signatures. Set eventTypes to a comma-separated list, or * for all events.
POST
/
v1
/
webhooks
Register a webhook endpoint
curl --request POST \
--url https://api.kuahr.com/v1/webhooks \
--header 'Content-Type: application/json' \
--header 'X-Api-Key: <api-key>' \
--data '
{
"url": "https://your-app.com/kua/webhooks",
"description": "Production receiver",
"eventTypes": "payroll.run.disbursed,employee.created"
}
'import requests
url = "https://api.kuahr.com/v1/webhooks"
payload = {
"url": "https://your-app.com/kua/webhooks",
"description": "Production receiver",
"eventTypes": "payroll.run.disbursed,employee.created"
}
headers = {
"X-Api-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-Api-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
url: 'https://your-app.com/kua/webhooks',
description: 'Production receiver',
eventTypes: 'payroll.run.disbursed,employee.created'
})
};
fetch('https://api.kuahr.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.kuahr.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([
'url' => 'https://your-app.com/kua/webhooks',
'description' => 'Production receiver',
'eventTypes' => 'payroll.run.disbursed,employee.created'
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-Api-Key: <api-key>"
],
]);
$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.kuahr.com/v1/webhooks"
payload := strings.NewReader("{\n \"url\": \"https://your-app.com/kua/webhooks\",\n \"description\": \"Production receiver\",\n \"eventTypes\": \"payroll.run.disbursed,employee.created\"\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-Api-Key", "<api-key>")
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.kuahr.com/v1/webhooks")
.header("X-Api-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"url\": \"https://your-app.com/kua/webhooks\",\n \"description\": \"Production receiver\",\n \"eventTypes\": \"payroll.run.disbursed,employee.created\"\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kuahr.com/v1/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-Api-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"url\": \"https://your-app.com/kua/webhooks\",\n \"description\": \"Production receiver\",\n \"eventTypes\": \"payroll.run.disbursed,employee.created\"\n}"
response = http.request(request)
puts response.read_body{
"id": "d4e5f6a7-0000-0000-0000-000000000001",
"url": "https://your-app.com/kua/webhooks",
"description": "Production receiver",
"eventTypes": "payroll.run.disbursed,employee.created",
"isActive": true,
"secret": "whsec_3f8a9b2c1d4e5f6a7b8c9d0e1f2a3b4c"
}{
"code": "<string>",
"message": "<string>"
}Authorizations
Your API key, e.g. kua_live_… (or kua_test_… in test mode).
Body
application/json
Response
Created
A registered webhook endpoint. The signing secret is present
only on the create response — it can't be retrieved again.
The endpoint's unique id.
The URL Kua will POST events to.
Your label for this endpoint.
Comma-separated event types, or * for all.
Whether the endpoint is currently receiving events.
The signing secret (whsec_…). Shown once — store it now.
⌘I

