Skip to content

API reference

Webhooks

Endpoints that receive signed event notifications, and their delivery log.

Payloads and signature verification are described in the webhooks guide.

List webhook events

GET/webhooks/events
Account keySite keyNo scope required

Every event a webhook can subscribe to, with a description. Test deliveries use the event ping. Every delivery is a JSON POST with headers X-SemanticsOn-Event, X-SemanticsOn-Delivery and X-SemanticsOn-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")>. Verify the signature, reject timestamps older than 5 minutes, and answer with any 2xx within 10 seconds. Failed deliveries are retried up to 6 attempts with backoff (1 min, 5 min, 30 min, 2 h, 12 h).

curl https://semanticson.com/api/v1/webhooks/events \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 200 OK

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

List webhooks

GET/webhooks

Webhooks of your own workspace (at most 10). Secrets are never returned here.

curl https://semanticson.com/api/v1/webhooks \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 200 OK

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

Create a webhook

POST/webhooks

Subscribes a URL to events in your workspace. The response includes the signing secret — shown only once, store it now. Every delivery is a JSON POST with headers X-SemanticsOn-Event, X-SemanticsOn-Delivery and X-SemanticsOn-Signature: t=<unix seconds>,v1=<hex HMAC-SHA256(secret, "<t>.<raw body>")>. Verify the signature, reject timestamps older than 5 minutes, and answer with any 2xx within 10 seconds. Failed deliveries are retried up to 6 attempts with backoff (1 min, 5 min, 30 min, 2 h, 12 h).

Request body

  • urlstringrequired

    Public http(s) URL that receives the events

    1–500 characters

  • eventsarray of stringsrequired

    Events to receive: tool.completed, tool.failed, report.ready, project.created, content.published, audit.completed, site.connected, site.disconnected, site.synced, change.proposed, change.approved, change.rejected, change.applied, change.failed, change.reverted, change.revert_requested, change.revert_rejected. See GET /webhooks/events.

    1–17 items

  • descriptionstringoptional

    at most 200 characters · default ""

  • enabledbooleanoptional

    default true

curl -X POST https://semanticson.com/api/v1/webhooks \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "https://example.com/hooks/semanticson",
  "events": [
    "change.applied",
    "report.ready"
  ],
  "description": "Production CMS"
}'

Response · 201 Created

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

Get a webhook

GET/webhooks/{webhookId}

Path parameters

  • webhookIdstringrequired

    The webhook id

    1–64 characters

curl https://semanticson.com/api/v1/webhooks/WEBHOOK_ID \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 200 OK

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

Update a webhook

PATCH/webhooks/{webhookId}

Send only the fields to change. events replaces the subscription list. Disabled webhooks receive nothing (test deliveries still work).

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • webhookIdstringrequired

    The webhook id

    1–64 characters

Request body

  • urlstringoptional

    Public http(s) URL that receives the events

    1–500 characters

  • eventsarray of stringsoptional

    Events to receive: tool.completed, tool.failed, report.ready, project.created, content.published, audit.completed, site.connected, site.disconnected, site.synced, change.proposed, change.approved, change.rejected, change.applied, change.failed, change.reverted, change.revert_requested, change.revert_rejected. See GET /webhooks/events.

    1–17 items

  • descriptionstringoptional

    at most 200 characters

  • enabledbooleanoptional
curl -X PATCH https://semanticson.com/api/v1/webhooks/WEBHOOK_ID \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "events": [
    "change.applied",
    "change.failed"
  ],
  "enabled": true
}'

Response · 200 OK

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

Delete a webhook

DELETE/webhooks/{webhookId}

Deletes the webhook and its delivery log. Pending retries are dropped.

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • webhookIdstringrequired

    The webhook id

    1–64 characters

curl -X DELETE https://semanticson.com/api/v1/webhooks/WEBHOOK_ID \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 204 No Content

Success returns an empty body (204) or a small confirmation object.

Errors use the standard error object.

Send a test event

POST/webhooks/{webhookId}/test

Sends a signed ping event right away (same headers and signature as real events, data.message explains it is a test) and returns the logged delivery with the endpoint's response status. Not retried on failure.

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • webhookIdstringrequired

    The webhook id

    1–64 characters

No request body. Send an empty body or {}.

curl -X POST https://semanticson.com/api/v1/webhooks/WEBHOOK_ID/test \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 201 Created

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.

List deliveries

GET/webhooks/{webhookId}/deliveries

The delivery log, newest first: event, payload, status (pending while retries remain, succeeded, failed), attempts, the endpoint's response status and body (first 2,000 characters), error and nextAttemptAt for scheduled retries.

Path parameters

  • webhookIdstringrequired

    The webhook id

    1–64 characters

Query parameters

  • limitintegeroptional

    Items per page, 1–100.

    1–100 · default 25

  • cursorstringoptional

    Pass nextCursor from the previous page to get the next one.

    at most 200 characters

  • statusstringoptional

    One of: pending, succeeded, failed

  • eventstringoptional

    at most 60 characters

curl https://semanticson.com/api/v1/webhooks/WEBHOOK_ID/deliveries \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 200 OK

A list object: { "object": "list", "data": [ … ], "hasMore": false, "nextCursor": null }. See pagination.

Errors use the standard error object.

Redeliver now

POST/webhooks/{webhookId}/deliveries/{deliveryId}/retry

Sends the delivery again immediately (also for succeeded ones) and returns the updated log entry. A manual retry is a single attempt and does not schedule further retries.

Accepts an Idempotency-Key header for safe retries.

Path parameters

  • webhookIdstringrequired

    The webhook id

    1–64 characters

  • deliveryIdstringrequired

    The delivery id

    1–64 characters

No request body. Send an empty body or {}.

curl -X POST https://semanticson.com/api/v1/webhooks/WEBHOOK_ID/deliveries/DELIVERY_ID/retry \
  -H "Authorization: Bearer $SEMANTICSON_API_KEY"

Response · 200 OK

A JSON object. Objects carry an object type and an id; timestamps are ISO 8601 strings.

Errors use the standard error object.