Remove a webhook
curl --request DELETE \
--url https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId} \
--header 'Authorization: <api-key>'import requests
url = "https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}', 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-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <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-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "https://api.onecluster.co/errors/insufficient-funds",
"title": "Insufficient Funds",
"status": 422,
"detail": "The account balance is ₦0.00. You need at least ₦50,000.00 to complete this transfer.",
"instance": "/api/v1/payments/transfer",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "INSUFFICIENT_FUNDS"
}{
"type": "https://api.onecluster.co/errors/insufficient-funds",
"title": "Insufficient Funds",
"status": 422,
"detail": "The account balance is ₦0.00. You need at least ₦50,000.00 to complete this transfer.",
"instance": "/api/v1/payments/transfer",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "INSUFFICIENT_FUNDS"
}Collections Endpoints
Delete Webhook
Permanently removes a webhook endpoint. You will stop receiving notifications to this URL immediately.
DELETE
/
api
/
v1
/
collections
/
webhooks
/
{webhookId}
Remove a webhook
curl --request DELETE \
--url https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId} \
--header 'Authorization: <api-key>'import requests
url = "https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}"
headers = {"Authorization": "<api-key>"}
response = requests.delete(url, headers=headers)
print(response.text)const options = {method: 'DELETE', headers: {Authorization: '<api-key>'}};
fetch('https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}', 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-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_HTTPHEADER => [
"Authorization: <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-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}"
req, _ := http.NewRequest("DELETE", url, nil)
req.Header.Add("Authorization", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.delete("https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}")
.header("Authorization", "<api-key>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api-partner.onecluster.co/api/v1/collections/webhooks/{webhookId}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = '<api-key>'
response = http.request(request)
puts response.read_body{
"type": "https://api.onecluster.co/errors/insufficient-funds",
"title": "Insufficient Funds",
"status": 422,
"detail": "The account balance is ₦0.00. You need at least ₦50,000.00 to complete this transfer.",
"instance": "/api/v1/payments/transfer",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "INSUFFICIENT_FUNDS"
}{
"type": "https://api.onecluster.co/errors/insufficient-funds",
"title": "Insufficient Funds",
"status": 422,
"detail": "The account balance is ₦0.00. You need at least ₦50,000.00 to complete this transfer.",
"instance": "/api/v1/payments/transfer",
"correlationId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
"code": "INSUFFICIENT_FUNDS"
}Authorizations
Your API key, formatted as: ApiKey ubn_sb_your_key_here
- Sandbox keys start with
ubn_sb_ - Production keys start with
ubn_pk_ - Never use production keys during testing, they will charge real money
Headers
A UUID v4 you generate to trace this request through our systems. If you don't provide one, we generate it for you. Always include it in support requests, it helps us find your request in logs.
Example:
"7f3a9c21-4e8b-4a12-b6d1-3c8a7f2e1b09"
Path Parameters
Response
Webhook removed successfully
⌘I

