New Signing Secret
Make a new signing secret, answered once (webhook.secret). For a day (webhook.previous_secret_until) every event is signed with both the new and the old secret, space-separated in webhook-signature, so your app can switch without missing an event.
Path parameters
uuid string (uuid) Req
The endpoint's
uuid from /endpoints.Request body (optional)
end_previous_now boolean
true: the old secret stops at once (it leaked). Events are signed with the new one alone, and the ngris-events path check stops accepting the old one. Left out or false: both sign for a day.Response (200 OK)
The webhook with the new secret; no webhook.previous_secret_until when the old one was stopped.
Errors
400 Bad Request
The body isn't JSON, or has a field other than
end_previous_now.401 Unauthorized
Missing auth.
403 Forbidden
Your role lacks
endpoints:update in the active account, or your plan doesn't have user events ("code": "entitlement_required", "entitlement_required": "endpoint_user_events").404 Not Found
No such endpoint, or it has no user-events webhook.
Request
curl -X POST "https://api.ngris.com/v1/endpoints/019bb1e4-e785-77d2-9966-c3cff31d0a0e/user-events/secret" \
-H "X-API-KEY: <your_api_key>"
CLI
ngris api endpoint-user-events new-secret 019bb1e4-e785-77d2-9966-c3cff31d0a0e --yes
# the old secret leaked: stop it now
ngris api endpoint-user-events new-secret 019bb1e4-e785-77d2-9966-c3cff31d0a0e --end-previous-now --yes
Response — 200 OK
{
"endpoint_id": "019bb1e4-e785-77d2-9966-c3cff31d0a0e",
"available": true,
"webhook": {
"url": "https://…acme.com/…",
"events": [
"user.created",
"user.updated",
"user.deactivated",
"user.deleted",
"user.roles_changed"
],
"status": "active",
"paused_at": null,
"failing_since": null,
"last_success_at": null,
"created_at": "2026-11-19T14:02:11Z",
"updated_at": "2026-11-19T14:02:11Z",
"secret": "whsec_9fK2mQ7xLp3Vb8Nc1Zr6Ty4Wd0Hs5Ua2",
"previous_secret_until": "2026-11-20T15:50:00Z"
},
"receiver": {
"on_this_endpoint": true,
"sign_in_on": true,
"path": "/hooks/ngris",
"let_in": false,
"open": false
},
"event_types": [
"user.created",
"user.updated",
"user.deactivated",
"user.deleted",
"user.roles_changed",
"user.signed_in"
],
"default_events": [
"user.created",
"user.updated",
"user.deactivated",
"user.deleted",
"user.roles_changed"
]
}
Was this helpful?