List registered webhooks
curl --request GET \
--url https://api.hypermid.io/v1/partner/webhooks \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hypermid.io/v1/partner/webhooks"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hypermid.io/v1/partner/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.hypermid.io/v1/partner/webhooks",
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: <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.hypermid.io/v1/partner/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.hypermid.io/v1/partner/webhooks")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypermid.io/v1/partner/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"webhooks": [
{
"id": "whk_abc123def456",
"url": "https://yourapp.com/webhooks/hypermid",
"events": ["swap.completed", "swap.failed", "onramp.completed"],
"active": true,
"createdAt": "2024-03-25T10:30:00Z",
"lastDeliveredAt": "2024-03-25T14:22:00Z"
},
{
"id": "whk_xyz789ghi012",
"url": "https://staging.yourapp.com/webhooks/hypermid",
"events": ["swap.completed"],
"active": true,
"createdAt": "2024-02-10T08:00:00Z",
"lastDeliveredAt": null
}
]
},
"error": null,
"meta": {
"requestId": "a7d8e9f0-a1b2-3456-0123-567890123456",
"timestamp": 1711234585,
"rateLimit": {
"limit": 2000,
"remaining": 1973,
"reset": 1711234627
}
}
}
Partner
List Webhooks
List all registered webhook endpoints
GET
/
v1
/
partner
/
webhooks
List registered webhooks
curl --request GET \
--url https://api.hypermid.io/v1/partner/webhooks \
--header 'X-API-Key: <api-key>'import requests
url = "https://api.hypermid.io/v1/partner/webhooks"
headers = {"X-API-Key": "<api-key>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.hypermid.io/v1/partner/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.hypermid.io/v1/partner/webhooks",
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: <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.hypermid.io/v1/partner/webhooks"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("X-API-Key", "<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.hypermid.io/v1/partner/webhooks")
.header("X-API-Key", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.hypermid.io/v1/partner/webhooks")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["X-API-Key"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"data": {
"webhooks": [
{
"id": "whk_abc123def456",
"url": "https://yourapp.com/webhooks/hypermid",
"events": ["swap.completed", "swap.failed", "onramp.completed"],
"active": true,
"createdAt": "2024-03-25T10:30:00Z",
"lastDeliveredAt": "2024-03-25T14:22:00Z"
},
{
"id": "whk_xyz789ghi012",
"url": "https://staging.yourapp.com/webhooks/hypermid",
"events": ["swap.completed"],
"active": true,
"createdAt": "2024-02-10T08:00:00Z",
"lastDeliveredAt": null
}
]
},
"error": null,
"meta": {
"requestId": "a7d8e9f0-a1b2-3456-0123-567890123456",
"timestamp": 1711234585,
"rateLimit": {
"limit": 2000,
"remaining": 1973,
"reset": 1711234627
}
}
}
Returns all webhook endpoints registered for your partner account.
{
"data": {
"webhooks": [
{
"id": "whk_abc123def456",
"url": "https://yourapp.com/webhooks/hypermid",
"events": ["swap.completed", "swap.failed", "onramp.completed"],
"active": true,
"createdAt": "2024-03-25T10:30:00Z",
"lastDeliveredAt": "2024-03-25T14:22:00Z"
},
{
"id": "whk_xyz789ghi012",
"url": "https://staging.yourapp.com/webhooks/hypermid",
"events": ["swap.completed"],
"active": true,
"createdAt": "2024-02-10T08:00:00Z",
"lastDeliveredAt": null
}
]
},
"error": null,
"meta": {
"requestId": "a7d8e9f0-a1b2-3456-0123-567890123456",
"timestamp": 1711234585,
"rateLimit": {
"limit": 2000,
"remaining": 1973,
"reset": 1711234627
}
}
}
const webhooks = await client.listWebhooks();
for (const wh of webhooks.data.webhooks) {
console.log(`${wh.id}: ${wh.url} (${wh.active ? "active" : "inactive"})`);
console.log(` Events: ${wh.events.join(", ")}`);
}
curl https://api.hypermid.io/v1/partner/webhooks \
-H "X-API-Key: your-api-key"
req, _ := http.NewRequest("GET",
"https://api.hypermid.io/v1/partner/webhooks", nil)
req.Header.Set("X-API-Key", "your-api-key")
resp, _ := http.DefaultClient.Do(req)
⌘I