List Events
curl --request GET \
--url https://api.example.com/v1/webhooks/events \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/webhooks/events"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/v1/webhooks/events', 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/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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://api.example.com/v1/webhooks/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/webhooks/events")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"total": 100,
"events": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"eventId": "660e8400-e29b-41d4-a716-446655440001",
"tenant": "partner-name",
"eventType": "kyc.status.changed",
"payload": {
"userId": "user-123",
"status": "approved"
},
"userId": "user-123",
"sourceService": "kyc-service",
"status": "completed",
"createdAt": "2025-12-29T10:00:00.000Z",
"processedAt": "2025-12-29T10:00:05.000Z",
"queuedAt": "2025-12-29T10:00:01.000Z"
}
]
}
Webhooks
List Events
Retrieve a list of events for the authenticated partner
GET
/
v1
/
webhooks
/
events
List Events
curl --request GET \
--url https://api.example.com/v1/webhooks/events \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/webhooks/events"
headers = {"Authorization": "<authorization>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: '<authorization>'}};
fetch('https://api.example.com/v1/webhooks/events', 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/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: <authorization>"
],
]);
$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://api.example.com/v1/webhooks/events"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "<authorization>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.example.com/v1/webhooks/events")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = '<authorization>'
response = http.request(request)
puts response.read_body{
"total": 100,
"events": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"eventId": "660e8400-e29b-41d4-a716-446655440001",
"tenant": "partner-name",
"eventType": "kyc.status.changed",
"payload": {
"userId": "user-123",
"status": "approved"
},
"userId": "user-123",
"sourceService": "kyc-service",
"status": "completed",
"createdAt": "2025-12-29T10:00:00.000Z",
"processedAt": "2025-12-29T10:00:05.000Z",
"queuedAt": "2025-12-29T10:00:01.000Z"
}
]
}
List Events
GET https://api.baanx.com/v1/webhooks/events Retrieves a list of events for the authenticated partner.Overview
Events are notifications generated by the system that have been or will be delivered to your configured webhooks. Use this endpoint to monitor event processing status, identify failed events, and review recent activity.Authentication
This endpoint requires authentication via Bearer token:Authorization: Bearer YOUR_ACCESS_TOKEN
Request
Headers
Query Parameters
Filter events by processing status.Accepted values:
pending, processing, completed, failed, skippedRequest Example
curl -X GET "https://api.baanx.com/v1/webhooks/events?status=failed&limit=25" \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const response = await fetch(
'https://api.baanx.com/v1/webhooks/events?status=failed&limit=25',
{
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
}
);
const data = await response.json();
console.log(data);
import requests
url = "https://api.baanx.com/v1/webhooks/events"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
params = {
"status": "failed",
"limit": 25
}
response = requests.get(url, headers=headers, params=params)
print(response.json())
type EventStatus = 'pending' | 'processing' | 'completed' | 'failed' | 'skipped';
const listEvents = async (status?: EventStatus, limit = 50) => {
const url = new URL('https://api.baanx.com/v1/webhooks/events');
if (status) url.searchParams.set('status', status);
url.searchParams.set('limit', String(limit));
const response = await fetch(url.toString(), {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
if (!response.ok) {
throw new Error(`HTTP error! status: ${response.status}`);
}
return await response.json();
};
Response
200 Success
{
"total": 100,
"events": [
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"eventId": "660e8400-e29b-41d4-a716-446655440001",
"tenant": "partner-name",
"eventType": "kyc.status.changed",
"payload": {
"userId": "user-123",
"status": "approved"
},
"userId": "user-123",
"sourceService": "kyc-service",
"status": "completed",
"createdAt": "2025-12-29T10:00:00.000Z",
"processedAt": "2025-12-29T10:00:05.000Z",
"queuedAt": "2025-12-29T10:00:01.000Z"
}
]
}
Error Responses
{
"message": "Not authenticated"
}
{
"message": "Not authorized"
}
{
"message": "Notification service is not configured for this environment"
}
Related Endpoints
GET /v1/webhooks/events/{eventId}/status- Get status of a specific eventGET /v1/webhooks/events/{eventId}/logs- View delivery logs for a specific eventPOST /v1/webhooks/events/{eventId}/retry- Retry delivery of a failed event
Was this page helpful?