API reference

Webhook endpoints

6 endpoints, served at https://orbitwrite.com/api/v1. Each one lists the credentials it accepts, its parameters and every response it can give.

List a workspace's webhook endpoints#

GET/api/v1/webhook-endpoints

Returns endpoints (never the signing secret — only its masked hint) plus the workspace's tags for the optional tag filter. Requires webhook:read, which every role holds.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Query parameters

organizationIdstring

Session callers only — an API key already determines the workspace.

At least 1 character.

Responses

200WebhookEndpointList

The workspace's webhook endpoints

Response attributes
endpointsWebhookEndpoint[]Required
Child attributes
idstringRequired
labelstring | nullRequired
urlstringRequired
secretHintstring | nullRequired

Masked secret preview — the full value is never returned

eventsstring[]Required
tagIdstring | nullRequired
enabledbooleanRequired
tagsWebhookTag[]Required

The workspace's tags, for the optional per-endpoint tag filter. Empty for a caller without tag:read — the endpoints are still returned.

Child attributes
idstringRequired
namestringRequired
colorstringRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
GET /api/v1/webhook-endpoints
curl -X GET "https://orbitwrite.com/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "endpoints": [
    {
      "id": "string",
      "label": "string",
      "url": "string",
      "secretHint": "string",
      "events": [
        "string"
      ],
      "tagId": "string",
      "enabled": true
    }
  ],
  "tags": [
    {
      "id": "string",
      "name": "string",
      "color": "string"
    }
  ]
}

Add a webhook endpoint#

POST/api/v1/webhook-endpoints

Registers a receiver and returns its signing secret exactly once — there is no route that returns it again, so store it now. Requires webhook:create (owner/admin, or a key scoped to it).

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Body application/json

urlstringRequired

At least 1 character.

eventsstring[]Required

At least 1 item.

  • "post_published"
  • "post_failed"
  • "approval_requested"
  • "approval_decided"
  • "account_needs_reconnect"
labelstring | null
tagIdstring | null

Narrow the rule to posts carrying this tag. Null (or omitted) means all posts; a tag from another workspace is rejected.

organizationIdstring

Required for session callers with no active organization. Ignored for API keys, which are already scoped to one workspace.

At least 1 character.

Responses

200WebhookSecretResult

The endpoint was added; secret is shown once

Response attributes
okbooleanRequired
secretstringRequired

The signing secret — surfaced exactly once, never retrievable again

endpointWebhookEndpointRequired
Child attributes
idstringRequired
labelstring | nullRequired
urlstringRequired
secretHintstring | nullRequired

Masked secret preview — the full value is never returned

eventsstring[]Required
tagIdstring | nullRequired
enabledbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
POST /api/v1/webhook-endpoints
curl -X POST "https://orbitwrite.com/api/v1/webhook-endpoints" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "string",
  "events": [
    "post_published"
  ]
}'
Response
{
  "ok": true,
  "secret": "string",
  "endpoint": {
    "id": "string",
    "label": "string",
    "url": "string",
    "secretHint": "string",
    "events": [
      "string"
    ],
    "tagId": "string",
    "enabled": true
  }
}

Enable or pause a webhook endpoint#

POST/api/v1/webhook-endpoints/{endpointId}/toggle

Requires webhook:update. A paused endpoint keeps its secret and routing but receives nothing.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Path parameters

endpointIdstringRequired

At least 1 character.

Body application/json

organizationIdstring

Required for session callers with no active organization. Ignored for API keys, which are already scoped to one workspace.

At least 1 character.

enabledbooleanRequired

Responses

200WebhookEndpointMutationResult

The mutation was applied

Response attributes
okbooleanRequired
endpointWebhookEndpointRequired
Child attributes
idstringRequired
labelstring | nullRequired
urlstringRequired
secretHintstring | nullRequired

Masked secret preview — the full value is never returned

eventsstring[]Required
tagIdstring | nullRequired
enabledbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
POST /api/v1/webhook-endpoints/{endpointId}/toggle
curl -X POST "https://orbitwrite.com/api/v1/webhook-endpoints/{endpointId}/toggle" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "enabled": true
}'
Response
{
  "ok": true,
  "endpoint": {
    "id": "string",
    "label": "string",
    "url": "string",
    "secretHint": "string",
    "events": [
      "string"
    ],
    "tagId": "string",
    "enabled": true
  }
}

Rotate an endpoint's signing secret#

POST/api/v1/webhook-endpoints/{endpointId}/regenerate-secret

The old secret stops verifying immediately (its ciphertext is overwritten) and the new one is surfaced once here and never again, so update the receiver in the same breath. Requires webhook:update — the same authority that can already re-point the endpoint.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Path parameters

endpointIdstringRequired

At least 1 character.

Body application/json

organizationIdstring

Required for session callers with no active organization. Ignored for API keys, which are already scoped to one workspace.

At least 1 character.

Responses

200WebhookSecretResult

The secret was rotated; the new value is shown once

Response attributes
okbooleanRequired
secretstringRequired

The signing secret — surfaced exactly once, never retrievable again

endpointWebhookEndpointRequired
Child attributes
idstringRequired
labelstring | nullRequired
urlstringRequired
secretHintstring | nullRequired

Masked secret preview — the full value is never returned

eventsstring[]Required
tagIdstring | nullRequired
enabledbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
POST /api/v1/webhook-endpoints/{endpointId}/regenerate-secret
curl -X POST "https://orbitwrite.com/api/v1/webhook-endpoints/{endpointId}/regenerate-secret" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "organizationId": "string"
}'
Response
{
  "ok": true,
  "secret": "string",
  "endpoint": {
    "id": "string",
    "label": "string",
    "url": "string",
    "secretHint": "string",
    "events": [
      "string"
    ],
    "tagId": "string",
    "enabled": true
  }
}

Update a webhook endpoint#

PATCH/api/v1/webhook-endpoints/{endpointId}

Edits everything except the secret, which rotates through its own route. Requires webhook:update.

Despite the verb this replaces the editable fields rather than merging them: url and events are required, and label and tagId are optional only in the sense that omitting one (or sending null) clears it — it does not leave the stored value alone. Send the endpoint's full desired state.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Path parameters

endpointIdstringRequired

At least 1 character.

Body application/json

urlstringRequired

At least 1 character.

eventsstring[]Required

At least 1 item.

  • "post_published"
  • "post_failed"
  • "approval_requested"
  • "approval_decided"
  • "account_needs_reconnect"
labelstring | null
tagIdstring | null

Narrow the rule to posts carrying this tag. Null (or omitted) means all posts; a tag from another workspace is rejected.

organizationIdstring

Required for session callers with no active organization. Ignored for API keys, which are already scoped to one workspace.

At least 1 character.

Responses

200WebhookEndpointMutationResult

The mutation was applied

Response attributes
okbooleanRequired
endpointWebhookEndpointRequired
Child attributes
idstringRequired
labelstring | nullRequired
urlstringRequired
secretHintstring | nullRequired

Masked secret preview — the full value is never returned

eventsstring[]Required
tagIdstring | nullRequired
enabledbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
PATCH /api/v1/webhook-endpoints/{endpointId}
curl -X PATCH "https://orbitwrite.com/api/v1/webhook-endpoints/{endpointId}" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "url": "string",
  "events": [
    "post_published"
  ]
}'
Response
{
  "ok": true,
  "endpoint": {
    "id": "string",
    "label": "string",
    "url": "string",
    "secretHint": "string",
    "events": [
      "string"
    ],
    "tagId": "string",
    "enabled": true
  }
}

Remove a webhook endpoint#

DELETE/api/v1/webhook-endpoints/{endpointId}

Requires webhook:delete. Deliveries stop immediately and the signing secret goes with the row.

Authentication

An API key or OAuth access token as a bearer token, or a signed-in session.

Path parameters

endpointIdstringRequired

At least 1 character.

Query parameters

organizationIdstring

Session callers only — an API key already determines the workspace.

At least 1 character.

Responses

200WebhookEndpointDeleteResult

The endpoint was removed

Response attributes
okbooleanRequired
400Error

Invalid request

Response attributes
errorstringRequired
issuesany[]
401Error

Not signed in

Response attributes
errorstringRequired
issuesany[]
403Error

Not a member of the organization

Response attributes
errorstringRequired
issuesany[]
404Error

The resource does not exist

Response attributes
errorstringRequired
issuesany[]
DELETE /api/v1/webhook-endpoints/{endpointId}
curl -X DELETE "https://orbitwrite.com/api/v1/webhook-endpoints/{endpointId}" \
  -H "Authorization: Bearer $ORBITWRITE_API_KEY"
Response
{
  "ok": true
}