Retrieve a webhook subscription
curl --request GET \
--url https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}"
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/{subscriptionId}', 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/{subscriptionId}",
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/{subscriptionId}"
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/{subscriptionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}")
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{
"id": "c3d4e5f6-a1b2-4c3d-8e5f-6a7b8c9d0e1f",
"url": "https://partner.example.com/cobee/webhooks",
"eventTypes": [
"employee.consumption.registered"
],
"status": "enabled",
"createdAt": 1753939051
}{
"message": "Resource not found"
}{
"message": "Internal server error"
}[DRAFT] Retrieve webhook subscription
GET
/
webhooks
/
subscriptions
/
{subscriptionId}
Retrieve a webhook subscription
curl --request GET \
--url https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId} \
--header 'Authorization: Bearer <token>'import requests
url = "https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}"
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/{subscriptionId}', 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/{subscriptionId}",
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/{subscriptionId}"
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/{subscriptionId}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://pre-partners-api.cobee.io/api/v3/webhooks/subscriptions/{subscriptionId}")
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{
"id": "c3d4e5f6-a1b2-4c3d-8e5f-6a7b8c9d0e1f",
"url": "https://partner.example.com/cobee/webhooks",
"eventTypes": [
"employee.consumption.registered"
],
"status": "enabled",
"createdAt": 1753939051
}{
"message": "Resource not found"
}{
"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 a single webhook subscription by its identifier.
Important: the signingSecret is never included in this response. It is only returned when a subscription is created or its secret is rotated.
Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
The unique identifier of the webhook subscription
Response
Webhook subscription successfully retrieved
The unique identifier of the subscription.
Example:
"c3d4e5f6-a1b2-4c3d-8e5f-6a7b8c9d0e1f"
The HTTPS endpoint that will receive the webhook calls.
Example:
"https://partner.example.com/cobee/webhooks"
The event types this subscription will receive.
Available options:
employee.consumption.registered, company.payroll-cycle.closed, employee.committed-expense.requested, employee.committed-expense.finished, employee.committed-expense.cancelled, employee.committed-expense.payment.executed, employee.committed-expense.payment.cancelled The status of the subscription.
Available options:
enabled, disabled Example:
"enabled"
When the subscription was created, in timestamp format.
Example:
1753939051