Get Webhook Endpoint
curl --request GET \
--url https://api.example.com/v1/webhooks/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/webhooks/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks/{id}")
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{
"id": "550e8400-e29b-41d4-a716-446655440000",
"tenant": "partner-name",
"name": "KYC Status Webhook",
"url": "https://api.partner.com/webhooks/kyc",
"apiKey": "whk_****...****5678",
"eventTypes": ["kyc.status.changed", "card.activated"],
"isActive": true,
"metadata": { "environment": "production" },
"createdAt": "2025-12-29T10:00:00.000Z",
"updatedAt": "2025-12-29T12:00:00.000Z"
}
Webhooks
Get Webhook Endpoint
Retrieve a specific webhook configuration by ID
GET
/
v1
/
webhooks
/
{id}
Get Webhook Endpoint
curl --request GET \
--url https://api.example.com/v1/webhooks/{id} \
--header 'Authorization: <authorization>'import requests
url = "https://api.example.com/v1/webhooks/{id}"
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/{id}', 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/{id}",
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/{id}"
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/{id}")
.header("Authorization", "<authorization>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.example.com/v1/webhooks/{id}")
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{
"id": "550e8400-e29b-41d4-a716-446655440000",
"tenant": "partner-name",
"name": "KYC Status Webhook",
"url": "https://api.partner.com/webhooks/kyc",
"apiKey": "whk_****...****5678",
"eventTypes": ["kyc.status.changed", "card.activated"],
"isActive": true,
"metadata": { "environment": "production" },
"createdAt": "2025-12-29T10:00:00.000Z",
"updatedAt": "2025-12-29T12:00:00.000Z"
}
Get Webhook Endpoint
GET https://api.baanx.com/v1/webhooks/{id} Retrieves a specific webhook configuration by ID.Overview
Returns webhook details including its URL, subscribed event types, active status, and a masked API key. Use this to inspect the current configuration of a single webhook.Authentication
This endpoint requires authentication via Bearer token:Authorization: Bearer YOUR_ACCESS_TOKEN
Request
Headers
string
required
Bearer token for authentication
Path Parameters
string (UUID)
required
Unique identifier of the webhook configuration
Request Example
curl -X GET https://api.baanx.com/v1/webhooks/550e8400-e29b-41d4-a716-446655440000 \
-H "Authorization: Bearer YOUR_ACCESS_TOKEN"
const webhookId = '550e8400-e29b-41d4-a716-446655440000';
const response = await fetch(`https://api.baanx.com/v1/webhooks/${webhookId}`, {
method: 'GET',
headers: {
'Authorization': 'Bearer YOUR_ACCESS_TOKEN'
}
});
const data = await response.json();
console.log(data);
import requests
webhook_id = "550e8400-e29b-41d4-a716-446655440000"
url = f"https://api.baanx.com/v1/webhooks/{webhook_id}"
headers = {
"Authorization": "Bearer YOUR_ACCESS_TOKEN"
}
response = requests.get(url, headers=headers)
print(response.json())
const getWebhook = async (webhookId: string) => {
const response = await fetch(`https://api.baanx.com/v1/webhooks/${webhookId}`, {
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
string (UUID)
Unique identifier for the webhook configuration
string
Partner tenant identifier
string
Human-readable name for the webhook
string
HTTPS endpoint URL for webhook delivery
string
Masked API key (e.g.,
whk_****...****5678). Use Rotate Key if you need a new key.array
List of event types this webhook subscribes to
boolean
Whether the webhook is currently active
object
Custom metadata attached to the webhook
string (ISO 8601)
Timestamp when the webhook was created
string (ISO 8601)
Timestamp when the webhook was last updated
{
"id": "550e8400-e29b-41d4-a716-446655440000",
"tenant": "partner-name",
"name": "KYC Status Webhook",
"url": "https://api.partner.com/webhooks/kyc",
"apiKey": "whk_****...****5678",
"eventTypes": ["kyc.status.changed", "card.activated"],
"isActive": true,
"metadata": { "environment": "production" },
"createdAt": "2025-12-29T10:00:00.000Z",
"updatedAt": "2025-12-29T12:00:00.000Z"
}
Error Responses
{
"message": "Not authenticated"
}
{
"message": "Not authorized"
}
{
"message": "Webhook config not found"
}
{
"message": "Notification service is not configured for this environment"
}
Related Endpoints
GET /v1/webhooks- List all webhook endpointsPUT /v1/webhooks/{id}- Update this webhookDELETE /v1/webhooks/{id}- Delete this webhookGET /v1/webhooks/{id}/logs- View delivery logs for this webhook
Was this page helpful?