List webhooks - Spacefast Docs
List webhooks
Returns the webhooks on the teams the caller can read, newest first. Page with cursor. A tenant-rooted credential also sees the tenant’s own subscriptions. Deleted webhooks are left out.
GET /v1/webhooks
Authorization
Authorization: Bearer <token>
with an API key (sfa_ prefix), an OAuth access token, a session token, or a Space machine credential (sfm_ prefix).
Query parameters
limitinteger required
min 1 · max 100 · default: 20cursorstring
min length 1 · max length 4096
Responses
200 Response for status 200
$schemastring
Canonical JSON Schema URL for this response body. The server also sends it in theLink: rel="describedby"response header.dataobject[] required
Array of object
idstring requiredurlstringrequired eventsstring[] required
Event filters this webhook is subscribed to.statusstring requiredactivedelivers.failingfollows 8 consecutive failures and still delivers.disabledfollows 32 and stops.deletedis kept for audit only. Any success resets the count.
Allowed:active,disabled,failing,deletedsecretstring
Signing secret, present only in the response that created the webhook or rotated its secret. Store it then; it cannot be read back.secretPreviewstring requiredpreviousSecretExpiresAtstring| any required
ISO 8601 timestamp when the secret replaced by the last rotation stops being accepted. Null when no earlier secret is still valid.createdAtstringrequired updatedAtstringrequired
pagination object required
nextCursorstring | any required
Cursor for the next page. Null on the last page.hasMoreboolean required
True when another page exists.
Error Responses
$schemastringtypestring requiredtitlestring requiredstatusinteger requireddetailstring requiredcodestring requiredpointerstringdetailsobjectsuggestionsstring[]nextstring[]requestIdstring required
Try it
Server
Base URL: https://api.spacefast.com
Request Example
curl -X GET "https://api.spacefast.com/v1/webhooks?limit=20" \
-H "Authorization: Bearer YOUR_TOKEN"
Response Example
{
"$schema": "http://example.com",
"data": [
{
"id": "string",
"url": "http://example.com",
"events": [
"string"
],
"status": "active",
"secret": "string",
"secretPreview": "string",
"previousSecretExpiresAt": "2019-08-24T14:15:22Z",
"createdAt": "2019-08-24T14:15:22Z",
"updatedAt": "2019-08-24T14:15:22Z"
}
],
"pagination": {
"nextCursor": "string",
"hasMore": true
}
}