Skip to content

Webhooks

9 endpoints: list webhook endpoints, create a webhook endpoint, retrieve a webhook endpoint, update a webhook endpoint, delete a webhook endpoint, roll a webhook secret, send a test event, list deliveries, retry a delivery.

List webhook endpoints

GET /v1/webhook_endpoints

Lists the Workspace's webhook endpoints. Secrets are never listed.

Permission: webhooks:read

Response

FieldTypeRequiredDescription
object"list"Yes
dataarray of objectYes
data[].object"webhook_endpoint"Yes
data[].idstringYes(up to 128 characters)
data[].urlstringYes
data[].descriptionstring or nullYes
data[].enabled_eventsarray of stringYes
data[].project_idsarray of stringYes
data[].api_versionstringYes
data[].include_comment_contentbooleanYes
data[].statusenabled, disabledYes
data[].disabled_reasonstring or nullYesmanual, gone (the endpoint answered 410) or failing (five days of failures).
data[].failing_sincestring or nullYes
data[].secret_last4string or nullYes
data[].created_atstringYesISO 8601 date and time, UTC.
has_morebooleanYes
next_cursorstring or nullYes
curl https://api.nowscale.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"

Create a webhook endpoint

POST /v1/webhook_endpoints

Adds an https endpoint (port 443) that receives the events you choose, signed with its own whsec_ secret. The secret is in this response only; reveal it later in Settings.

Permission: webhooks:write · Accepts Idempotency-Key · Answers 201

Body

FieldTypeRequiredDescription
urlstringYes(up to 2048 characters)
descriptionstringNo(up to 200 characters)
enabled_eventsarray of *, post.created, post.published, post.partially_published, post.failed, post.deletedYesEvent types to receive, or ["*"] for all.
project_idsarray of stringNoOnly events from these Projects. Empty or absent: every Project.
include_comment_contentbooleanNoComment events carry the comment's text and author name.

Response

FieldTypeRequiredDescription
object"webhook_endpoint"Yes
idstringYes(up to 128 characters)
urlstringYes
descriptionstring or nullYes
enabled_eventsarray of stringYes
project_idsarray of stringYes
api_versionstringYes
include_comment_contentbooleanYes
statusenabled, disabledYes
disabled_reasonstring or nullYesmanual, gone (the endpoint answered 410) or failing (five days of failures).
failing_sincestring or nullYes
secret_last4string or nullYes
created_atstringYesISO 8601 date and time, UTC.
secretstringYesThe signing secret, shown once.
curl -X POST https://api.nowscale.com/v1/webhook_endpoints \
  -H "Authorization: Bearer $NOWSCALE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ ... }'

Retrieve a webhook endpoint

GET /v1/webhook_endpoints/{endpoint_id}

Returns one endpoint, with the last four characters of its secret.

Permission: webhooks:read

Path parameters

NameDescription
endpoint_idThe endpoint's id.

Response

FieldTypeRequiredDescription
object"webhook_endpoint"Yes
idstringYes(up to 128 characters)
urlstringYes
descriptionstring or nullYes
enabled_eventsarray of stringYes
project_idsarray of stringYes
api_versionstringYes
include_comment_contentbooleanYes
statusenabled, disabledYes
disabled_reasonstring or nullYesmanual, gone (the endpoint answered 410) or failing (five days of failures).
failing_sincestring or nullYes
secret_last4string or nullYes
created_atstringYesISO 8601 date and time, UTC.
curl https://api.nowscale.com/v1/webhook_endpoints/ENDPOINT_ID \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"

Update a webhook endpoint

PATCH /v1/webhook_endpoints/{endpoint_id}

Changes the URL, events, Projects or description, or turns the endpoint off and on. Turning it on clears a failing streak.

Permission: webhooks:write

Path parameters

NameDescription
endpoint_idThe endpoint's id.

Body

FieldTypeRequiredDescription
urlstringNo(up to 2048 characters)
descriptionstring or nullNo
enabled_eventsarray of *, post.created, post.published, post.partially_published, post.failed, post.deletedNoEvent types to receive, or ["*"] for all.
project_idsarray of stringNo
include_comment_contentbooleanNo
enabledbooleanNo

Response

FieldTypeRequiredDescription
object"webhook_endpoint"Yes
idstringYes(up to 128 characters)
urlstringYes
descriptionstring or nullYes
enabled_eventsarray of stringYes
project_idsarray of stringYes
api_versionstringYes
include_comment_contentbooleanYes
statusenabled, disabledYes
disabled_reasonstring or nullYesmanual, gone (the endpoint answered 410) or failing (five days of failures).
failing_sincestring or nullYes
secret_last4string or nullYes
created_atstringYesISO 8601 date and time, UTC.
curl -X PATCH https://api.nowscale.com/v1/webhook_endpoints/ENDPOINT_ID \
  -H "Authorization: Bearer $NOWSCALE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

Delete a webhook endpoint

DELETE /v1/webhook_endpoints/{endpoint_id}

Deletes the endpoint and the deliveries still waiting for it.

Permission: webhooks:write

Path parameters

NameDescription
endpoint_idThe endpoint's id.

Response

FieldTypeRequiredDescription
object"webhook_endpoint"Yes
idstringYes(up to 128 characters)
deletedtrueYes
curl -X DELETE https://api.nowscale.com/v1/webhook_endpoints/ENDPOINT_ID \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"

Roll a webhook secret

POST /v1/webhook_endpoints/{endpoint_id}/roll_secret

Creates a new signing secret. The old one keeps signing alongside it for 24 hours (two signatures per delivery) unless expire_now is true.

Permission: webhooks:write · Accepts Idempotency-Key

Path parameters

NameDescription
endpoint_idThe endpoint's id.

Body

FieldTypeRequiredDescription
expire_nowbooleanNo

Response

FieldTypeRequiredDescription
object"webhook_endpoint"Yes
idstringYes(up to 128 characters)
urlstringYes
descriptionstring or nullYes
enabled_eventsarray of stringYes
project_idsarray of stringYes
api_versionstringYes
include_comment_contentbooleanYes
statusenabled, disabledYes
disabled_reasonstring or nullYesmanual, gone (the endpoint answered 410) or failing (five days of failures).
failing_sincestring or nullYes
secret_last4string or nullYes
created_atstringYesISO 8601 date and time, UTC.
secretstringYes
curl -X POST https://api.nowscale.com/v1/webhook_endpoints/ENDPOINT_ID/roll_secret \
  -H "Authorization: Bearer $NOWSCALE_API_KEY" \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: $(uuidgen)" \
  -d '{ ... }'

Send a test event

POST /v1/webhook_endpoints/{endpoint_id}/test

Queues a webhook_endpoint.test event to this endpoint, whatever its event filter.

Permission: webhooks:write · Answers 202

Path parameters

NameDescription
endpoint_idThe endpoint's id.

Response

FieldTypeRequiredDescription
object"webhook_delivery"Yes
idstringYes(up to 128 characters)
event_idstringYes(up to 128 characters)
status"pending"Yes
curl -X POST https://api.nowscale.com/v1/webhook_endpoints/ENDPOINT_ID/test \
  -H "Authorization: Bearer $NOWSCALE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'

List deliveries

GET /v1/webhook_endpoints/{endpoint_id}/deliveries

Lists an endpoint's deliveries of the last 30 days, newest first, with their attempts' outcome.

Permission: webhooks:read

Path parameters

NameDescription
endpoint_idThe endpoint's id.

Query parameters

FieldTypeRequiredDescription
limitintegerNoItems per page, 1 to 100. (1 to 100, default 25)
cursorstringNoThe next_cursor of the previous page. (up to 512 characters)
statuspending, delivering, succeeded, failedNo

Response

FieldTypeRequiredDescription
object"list"Yes
dataarray of objectYes
data[].object"webhook_delivery"Yes
data[].idstringYes(up to 128 characters)
data[].endpoint_idstringYes(up to 128 characters)
data[].event_idstringYes(up to 128 characters)
data[].event_typestringYes
data[].statuspending, delivering, succeeded, failedYes
data[].attemptsintegerYes(-9007199254740991 to 9007199254740991)
data[].next_attempt_atstring or nullYes
data[].last_status_codeinteger or nullYes
data[].last_errorstring or nullYes
data[].delivered_atstring or nullYes
data[].created_atstringYesISO 8601 date and time, UTC.
has_morebooleanYes
next_cursorstring or nullYes
curl https://api.nowscale.com/v1/webhook_endpoints/ENDPOINT_ID/deliveries \
  -H "Authorization: Bearer $NOWSCALE_API_KEY"

Retry a delivery

POST /v1/webhook_deliveries/{delivery_id}/retry

Sends a delivery again now, keeping its webhook-id, whatever its status.

Permission: webhooks:write · Answers 202

Path parameters

NameDescription
delivery_idThe delivery's id.

Response

FieldTypeRequiredDescription
object"webhook_delivery"Yes
idstringYes(up to 128 characters)
endpoint_idstringYes(up to 128 characters)
event_idstringYes(up to 128 characters)
event_typestringYes
statuspending, delivering, succeeded, failedYes
attemptsintegerYes(-9007199254740991 to 9007199254740991)
next_attempt_atstring or nullYes
last_status_codeinteger or nullYes
last_errorstring or nullYes
delivered_atstring or nullYes
created_atstringYesISO 8601 date and time, UTC.
curl -X POST https://api.nowscale.com/v1/webhook_deliveries/DELIVERY_ID/retry \
  -H "Authorization: Bearer $NOWSCALE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{ ... }'