List webhook subscriptions
curl --request GET \
--url https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions', 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://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"subscriptions": [
{
"id": "c3d4e5f6-a1b2-4c3d-8e5f-6a7b8c9d0e1f",
"url": "https://partner.example.com/cobee/webhooks",
"eventTypes": [
"employee.consumption.registered"
],
"status": "enabled",
"createdAt": 1753939051
}
]
}{
"message": "Internal server error"
}Manage Subscriptions
[DRAFT] List webhook subscriptions
GET
/
webhooks
/
subscriptions
List webhook subscriptions
curl --request GET \
--url https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions', 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://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$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://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"subscriptions": [
{
"id": "c3d4e5f6-a1b2-4c3d-8e5f-6a7b8c9d0e1f",
"url": "https://partner.example.com/cobee/webhooks",
"eventTypes": [
"employee.consumption.registered"
],
"status": "enabled",
"createdAt": 1753939051
}
]
}{
"message": "Internal server error"
}Coming soon: The Webhooks API is currently under design review. This documentation describes the target interface and may change before release.
Overview
Retrieves all the webhook subscriptions registered by your integration.
Important: the signingSecret is never included in this response. It is only returned when a subscription is created or its secret is rotated.