RaylightAPI

Webhooks

Roll the signing secret

Mints a new secret. The old one keeps verifying for 24 hours, during which deliveries carry two v1 signatures and previousSecretExpiresAt says when it stops. If Raylight could no longer read the old secret (the delivery log says so), it is dropped at once instead: deliveries carry only the new signature and previousSecretExpiresAt is null.

POST/v1/webhooks/{id}/roll-secret

API key with the productions scope.

Parameters

FieldInTypeDescription
idrequiredpathuuidThe endpoint id.

Responses

200The endpoint with its new secret.
400Invalid request.
401Missing, invalid or revoked key.
403The key lacks the productions scope (code api_key_missing_scope), or its owner has view-only access to the workspace (code forbidden).
404No such endpoint or workspace for this key (code not_found).
409The secret was rolled somewhere else at the same moment (code conflict). Nothing changed from this call; try again.
429Rate limited, or a monthly cap reached.
503Webhooks are not switched on for this server (code disabled). Every webhook route answers this while they are off.

200 response body

FieldTypeDescription
endpointrequiredobject
endpoint.idrequireduuid
endpoint.workspaceIdrequireduuid
endpoint.urlrequiredurl
endpoint.descriptionrequiredstring | null
endpoint.eventsrequiredenum[]
endpoint.enabledrequiredboolean
endpoint.disabledReasonrequiredstring | null
endpoint.consecutiveFailuresrequiredinteger
endpoint.lastAttemptAtrequireddatetime | null
endpoint.lastSuccessAtrequireddatetime | null
endpoint.previousSecretExpiresAtrequireddatetime | null
endpoint.createdAtrequireddatetime
endpoint.updatedAtrequireddatetime
endpoint.secretrequiredstring

Example

curl
curl -X POST https://api.raylight.app/v1/webhooks/$ID/roll-secret \  -H "Authorization: Bearer $RAYLIGHT_API_KEY"