Generate a connection's signing secret
Changed onGenerates a random signing secret for a connection's webhook URL, stores it, and returns it in plain text together with the URL that carries it. Use this endpoint for a provider that sends no signature of its own (provides_bearer_secret is true on its triggers), after CreateTriggerIngressEndpoint. Pass the connection ID in the path; the body is empty. The provider presents the secret back on every event, in an Authorization: Bearer <secret> header, the X-Scalekit-Webhook-Secret header, or the final path segment of url_with_secret, and an event without it is rejected. The first call on an endpoint with no secret sets one. A call where a secret already exists starts a rotation rather than replacing it, exactly as SetTriggerSigningSecret does: both secrets are accepted until you confirm the rotation with ConfirmTriggerSigningSecretRotation, or for at most 24 hours. A provider that signs its own events takes its secret from its app configuration through SetTriggerSigningSecret instead, and is refused here. Returns the secret in plain text, url_with_secret, and the endpoint with its masked secret and rotation state. The plain-text secret appears only in this response and is never returned again; generate another if it is lost.
Request
- Base URLhttps://$SCALEKIT_ENVIRONMENT_URL
- AuthOAuth 2Client credentialsToken URLhttps://$SCALEKIT_ENVIRONMENT_URL/oauth/token
- TypeScriptA function with typed inputs. Its response is checked against the schema.
Path parameters
The connection whose webhook URL receives the generated secret. Between 1 and 64 characters.
Request body
Response
The generated secret in plain text, the webhook URL with the secret appended, and the endpoint's state, including whether a rotation is now in progress
Example response
{
"endpoint": {
"connection_id": "conn_28128748834787840",
"id": "tie_28128748834787840",
"masked_signing_secret": "************************a4f9",
"signing_secret_configured": true,
"url": "https://acme.scalekit.dev/triggers/v1/kq3T9vX2bL8mN4pR7sW1yZ"
}
}Changes
- info
endpoint added
- info