Ping by ID
Endpoint: /webhooks/v1/registrations/{id}/ping
Ping a webhook registration by ID to check the status. 202 response indicates that this is a valid webhook.
PUT
https://sandbox.crbcos.com/webhooks/v1/registrations/{id}/ping
Path Parameters
- idstringrequiredDescription
curl
curl --location --globoff --request PUT 'https://sandbox.crbcos.com/webhooks/v1/registrations/{id}/ping?id=8d6115c0-2a88-4a58-b731-b306002e8bc2' \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json'nodejs
var https = require('follow-redirects').https;
var fs = require('fs');
var options = {
'method': 'PUT',
'hostname': 'sandbox.crbcos.com',
'path': '/webhooks/v1/registrations/{id}/ping?id=8d6115c0-2a88-4a58-b731-b306002e8bc2',
'headers': {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
},
'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}/ping?id=8d6115c0-2a88-4a58-b731-b306002e8bc2"
payload = {}
headers = {
'Authorization': 'Bearer <token>',
'Content-Type': 'application/json'
}
response = requests.request("PUT", url, headers=headers, data=payload)
print(response.text)
ruby
require "uri"
require "net/http"
url = URI("https://sandbox.crbcos.com/webhooks/v1/registrations/{id}/ping?id=8d6115c0-2a88-4a58-b731-b306002e8bc2")
https = Net::HTTP.new(url.host, url.port)
https.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = "Bearer <token>"
request["Content-Type"] = "application/json"
response = https.request(request)
puts response.read_body
go
package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://sandbox.crbcos.com/webhooks/v1/registrations/{id}/ping?id=8d6115c0-2a88-4a58-b731-b306002e8bc2"
method := "PUT"
client := &http.Client {
}
req, err := http.NewRequest(method, url, nil)
if err != nil {
fmt.Println(err)
return
}
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
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))
}202