Get Webhook
curl --request GET \
--url https://api.pro.daya.co/public/v1/webhooks/{id} \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/webhooks/{id}"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.pro.daya.co/public/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.pro.daya.co/public/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 => [
"X-Api-Key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/webhooks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
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.pro.daya.co/public/v1/webhooks/{id}")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Webhook retrieved successfully",
"data": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/webhooks/daya",
"description": "Order notifications",
"events": ["order.filled", "order.cancelled"],
"status": "active",
"failure_count": 0,
"last_success_at": "2024-01-15T10:30:00Z",
"last_failure_at": null,
"last_failure_reason": null,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"timestamp": "2024-01-15T10:30:00Z"
}
Webhooks API
Get Webhook
Get a specific webhook by ID
GET
/
public
/
v1
/
webhooks
/
{id}
Get Webhook
curl --request GET \
--url https://api.pro.daya.co/public/v1/webhooks/{id} \
--header 'X-Api-Key: <x-api-key>'import requests
url = "https://api.pro.daya.co/public/v1/webhooks/{id}"
headers = {"X-Api-Key": "<x-api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-Api-Key': '<x-api-key>'}};
fetch('https://api.pro.daya.co/public/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.pro.daya.co/public/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 => [
"X-Api-Key: <x-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"
"net/http"
"io"
)
func main() {
url := "https://api.pro.daya.co/public/v1/webhooks/{id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-Api-Key", "<x-api-key>")
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.pro.daya.co/public/v1/webhooks/{id}")
.header("X-Api-Key", "<x-api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.pro.daya.co/public/v1/webhooks/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-Api-Key"] = '<x-api-key>'
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Webhook retrieved successfully",
"data": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/webhooks/daya",
"description": "Order notifications",
"events": ["order.filled", "order.cancelled"],
"status": "active",
"failure_count": 0,
"last_success_at": "2024-01-15T10:30:00Z",
"last_failure_at": null,
"last_failure_reason": null,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"timestamp": "2024-01-15T10:30:00Z"
}
Overview
Retrieve details of a specific webhook endpoint by its ID.Authentication
Your API key with Write scope
X-Api-Key: daya_sk_YOUR_API_KEY
Path Parameters
Webhook ID (UUID)Example:
770e8400-e29b-41d4-a716-446655440000Request Examples
curl --request GET \
--url 'https://api.pro.daya.co/public/v1/webhooks/770e8400-e29b-41d4-a716-446655440000' \
--header 'X-Api-Key: daya_sk_YOUR_API_KEY'
const webhookId = '770e8400-e29b-41d4-a716-446655440000';
const response = await fetch(
`https://api.pro.daya.co/public/v1/webhooks/${webhookId}`,
{
headers: { 'X-Api-Key': 'daya_sk_YOUR_API_KEY' }
}
);
const data = await response.json();
console.log('Webhook:', data.data);
import requests
webhook_id = '770e8400-e29b-41d4-a716-446655440000'
headers = {'X-Api-Key': 'daya_sk_YOUR_API_KEY'}
response = requests.get(
f'https://api.pro.daya.co/public/v1/webhooks/{webhook_id}',
headers=headers
)
webhook = response.json()
print(f"Webhook: {webhook['data']}")
Response
Indicates if the request was successful
Human-readable response message
Webhook object
Show webhook properties
Show webhook properties
Unique webhook identifier (UUID)
Webhook endpoint URL
Webhook description
Events this webhook is subscribed to
Webhook status:
active, paused, disabledNumber of consecutive delivery failures
Last successful delivery timestamp
Last failed delivery timestamp
Reason for last delivery failure
ISO 8601 creation timestamp
ISO 8601 last update timestamp
Success Response
{
"success": true,
"message": "Webhook retrieved successfully",
"data": {
"id": "770e8400-e29b-41d4-a716-446655440000",
"url": "https://example.com/webhooks/daya",
"description": "Order notifications",
"events": ["order.filled", "order.cancelled"],
"status": "active",
"failure_count": 0,
"last_success_at": "2024-01-15T10:30:00Z",
"last_failure_at": null,
"last_failure_reason": null,
"created_at": "2024-01-01T00:00:00Z",
"updated_at": "2024-01-15T10:30:00Z"
},
"timestamp": "2024-01-15T10:30:00Z"
}
Error Responses
{
"success": false,
"message": "Validation error",
"error": {
"code": "VALIDATION_ERROR",
"message": "Invalid webhook ID format"
}
}
{
"success": false,
"message": "Webhook not found",
"error": {
"code": "WEBHOOK_NOT_FOUND",
"message": "No webhook found with the specified ID"
}
}
{
"success": false,
"message": "Unauthorized",
"error": {
"code": "API_KEY_INVALID",
"message": "The provided API key is invalid"
}
}
Rate Limits
- 100 requests per minute per API key
Next Steps
Update Webhook
Update webhook configuration
Get Deliveries
View webhook delivery logs
⌘I