Delete by ID
Endpoint: /webhooks/v1/registrations/{id}
Deletes a webhook registration by ID
DELETE
https://sandbox.crbcos.com/webhooks/v1/registrations/{id}
Path Parameters
- idstringrequiredDescription
Response
- idstringDescription
- partnerIdstringDescription
- eventNamestringDescription
- callbackURLstringDescription
- authUsernamestringDescription
- authPasswordstringDescription
- consecutiveErrorsintegerDescription
- lastErrorstringDescription
- statusstringDescription
- typestringDescription
- formatstringDescription
curl
curl --location --globoff --request DELETE 'https://sandbox.crbcos.com/webhooks/v1/registrations/{id}?id=8d6115c0-2a88-4a58-b731-b306002e8bc2' \
--header 'Authorization: Bearer <token>'nodejs
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'DELETE',
'hostname': 'sandbox.crbcos.com',
'path': '/webhooks/v1/registrations/{id}?id=8d6115c0-2a88-4a58-b731-b306002e8bc2',
'headers': {
'Authorization': 'Bearer <token>'
},
'maxRedirects': 20
};
var req = https.request(options, function (res) {
var chunks = [];
res.on("data", function (chunk) {
chunks.push(chunk);
});
res.on("end", function (chunk) {
var body = Buffer.concat(chunks);
console.log(body.toString());
});
res.on("error", function (error) {
console.error(error);
});
});
req.end();python
import requests
url = "https://sandbox.crbcos.com/webhooks/v1/registrations/{id}?id=8d6115c0-2a88-4a58-b731-b306002e8bc2"
payload = ""
headers = {
'Authorization': 'Bearer <token>'
}
response = requests.request("DELETE", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "net/http"
url = URI("https://sandbox.crbcos.com/webhooks/v1/registrations/{id}?id=8d6115c0-2a88-4a58-b731-b306002e8bc2")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Authorization"] = "Bearer <token>"
response = https.request(request)
puts response.read_body
go
package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://sandbox.crbcos.com/webhooks/v1/registrations/{id}?id=8d6115c0-2a88-4a58-b731-b306002e8bc2"
method := "DELETE"
payload := strings.NewReader(``)
client := &http.Client {
}
req, err := http.NewRequest(method, url, payload)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer <token>")
res, err := client.Do(req)
if err != nil {
fmt.Println(err)
return
}
defer res.Body.Close()
body, err := io.ReadAll(res.Body)
if err != nil {
fmt.Println(err)
return
}
fmt.Println(string(body))
}200
{
"id": "8d6115c0-2a88-4a58-b731-b306002e8bc2",
"partnerId": "19222b81-0e1e-452d-a842-b2f1011c16f3",
"eventName": "Cards.Card.Activated",
"callbackUrl": "https://webhook.site/27b9814b-16eb-4099--32594aee5e04",
"consecutiveErrors": 0,
"status": "Active",
"type": "Push",
"format": "Extended"
}