List webhook endpoints
curl -sS https://api.speccapture.com/v1/webhooks \ -H "Authorization: Bearer $SPECCAPTURE_API_KEY"using System.Text.Json;
using HttpClient http = new() { BaseAddress = new Uri("https://api.speccapture.com") };http.DefaultRequestHeaders.Authorization = new("Bearer", Environment.GetEnvironmentVariable("SPECCAPTURE_API_KEY"));
HttpResponseMessage response = await Call(HttpMethod.Get, "/v1/webhooks");Console.WriteLine(await response.Content.ReadAsStringAsync());
// Sends a request; stops with the problem's code and detail if the API refuses it.async Task<HttpResponseMessage> Call(HttpMethod method, string path, HttpContent? body = null, string? idempotencyKey = null) { using HttpRequestMessage request = new(method, path) { Content = body }; if (idempotencyKey is not null) request.Headers.Add("Idempotency-Key", idempotencyKey); HttpResponseMessage response = await http.SendAsync(request); if (!response.IsSuccessStatusCode) { JsonElement problem = await Json(response); string? detail = (problem.TryGetProperty("detail", out JsonElement text) ? text : problem.GetProperty("title")).GetString(); Console.Error.WriteLine($"{(int)response.StatusCode} {problem.GetProperty("code")}: {detail}"); Environment.Exit(1); } return response;}
// Reads an answer as JSON.static async Task<JsonElement> Json(HttpResponseMessage response) => JsonDocument.Parse(await response.Content.ReadAsStringAsync()).RootElement;import osimport sys
import requests
API = "https://api.speccapture.com"session = requests.Session()session.headers["Authorization"] = f"Bearer {os.environ['SPECCAPTURE_API_KEY']}"
def call(method, path, **kwargs): """Send a request; stop with the problem's code and detail if the API refuses it.""" response = session.request(method, API + path, **kwargs) if not response.ok: problem = response.json() sys.exit(f"{response.status_code} {problem['code']}: {problem.get('detail', problem['title'])}") return response
print(call("GET", "/v1/webhooks").text)const API = "https://api.speccapture.com";const headers = { Authorization: `Bearer ${process.env.SPECCAPTURE_API_KEY}` };
console.log(await call("GET", "/v1/webhooks").then((response) => response.text()));
// Sends a request; stops with the problem's code and detail if the API refuses it.async function call(method, path, init = {}) { const response = await fetch(API + path, { ...init, method, headers: { ...headers, ...init.headers } }); if (!response.ok) { const problem = await response.json(); console.error(`${response.status} ${problem.code}: ${problem.detail ?? problem.title}`); process.exit(1); } return response;}The workspace’s endpoints, newest first: each one’s url, description, the first characters of its signing secret (never the secret), when it was added and, once it answered 410 Gone, when it was stopped. A workspace has at most 10, so they come in one page: hasMore is false and nextCursor null.
Authorizations
Section titled “Authorizations”Responses
Section titled “Responses”OK
The workspace’s endpoints, newest first: at most 10, so the whole list comes in one page, in the shape every list has - hasMore false and nextCursor null.
object
The workspace’s endpoints.
One webhook endpoint, as listed: GET /v1/webhooks. Never its signing secret, only its first characters.
object
The endpoint’s id: what deleting it, turning it back on and reading its deliveries name.
Where events are delivered.
The note that tells it apart (“ERP import”); null when none was given.
The signing secret’s first characters (whsec_Ab12), to tell endpoints apart.
When it was added.
When the endpoint was stopped because it answered a delivery with 410 Gone - its way of saying it accepts no more events - so nothing is sent to it until it is turned back on (POST /v1/webhooks/{webhookId}/resume); null while it receives events.
Always false: a workspace’s endpoints come in one page.
Always null, for the same reason.
Examples
The workspace's endpoints, the second stopped after it answered 410 Gone
{ "data": [ { "webhookId": "0f8fad5b-d9cb-469f-a165-70867728950e", "url": "https://erp.example.com/hooks/speccapture", "description": "ERP import", "secretPrefix": "whsec_2m+y", "createdAt": "2026-10-01T08:12:40+00:00", "stoppedAt": null }, { "webhookId": "2c3d4e5f-6a7b-4c8d-9e0f-1a2b3c4d5e6f", "url": "https://staging.example.com/hooks/speccapture", "description": "Staging", "secretPrefix": "whsec_Qp7c", "createdAt": "2026-09-12T10:30:00+00:00", "stoppedAt": "2026-10-09T18:44:02+00:00" } ], "hasMore": false, "nextCursor": null}