Get a webhook - Spacefast Docs

Get a webhook

Returns one webhook with its endpoint, subscribed filters, status, and secret preview. The secret itself is never returned.

HTTP Request

GET /v1/webhooks/{webhookId}

Authorization

Authorization Bearer token · header required

Authorization: Bearer <token> with an API key (sfa_ prefix), an OAuth access token, a session token, or a Space machine credential (sfm_ prefix).

or

Authorization OAuth2 access token · header required

OAuth 2.0 with Spacefast scopes. People use the authorization code flow; machines use client credentials.

Scopes:

Path parameters

webhookId string required
min length 1

Responses

200 Response for status 200

{
  "$schema": "string<uri>",
  "data": {
    "id": "string",
    "url": "string<uri>",
    "events": ["string"],
    "status": "string",
    "secret": "string",
    "secretPreview": "string",
    "previousSecretExpiresAt": "string<date-time> | any",
    "createdAt": "string<date-time>",
    "updatedAt": "string<date-time>"
  }
}

Error Response

{
  "$schema": "string<uri>",
  "type": "string",
  "title": "string",
  "status": "integer",
  "detail": "string",
  "code": "string",
  "pointer": "string",
  "details": {
    "property1": null,
    "property2": null
  },
  "suggestions": ["string"],
  "next": ["string"],
  "requestId": "string"
}

Try it

Server

Base URL: https://api.spacefast.com

Parameters

webhookId path required

Request Examples

cURL

curl -X GET "https://api.spacefast.com/v1/webhooks/string" \
  -H "Authorization: Bearer YOUR_TOKEN"

JavaScript

const response = await fetch("https://api.spacefast.com/v1/webhooks/string", {
  method: "GET",
  headers: {
    "Authorization": "Bearer YOUR_TOKEN"
  }
});

Python

import requests

response = requests.get(
    "https://api.spacefast.com/v1/webhooks/string",
    headers={
        "Authorization": "Bearer YOUR_TOKEN"
    },
)