Skip to main content
POST
Rotate the webhook signing key
Requires an Environment API key with the environment:webhook_signing_key:rotate scope. It rotates the key of the environment the API key belongs to.
Replaces the key Nango uses to sign webhooks. The new key is returned in the response, and stays readable under Environment Settings > Webhooks > Signing key. To import an existing key, pass webhook_signing_key in the body. The value must be a UUID v4; uppercase characters are normalized to lowercase. You should generate it using a cryptographically secure random generator, such as crypto.randomUUID(). The security of a supplied key depends on how you generate and protect it; Nango validates its format but cannot verify its randomness. Omit the request body or send {} to generate a random key.
For up to 5 minutes after a rotation, webhooks are signed with either the old or the new key. Accept both until then.

Authorizations

Authorization
string
header
required

An Environment API key from your Nango environment, or an Account API key for account-level endpoints.

Body

application/json
webhook_signing_key
string<uuid>

Optional UUID v4 signing key to import. If omitted, Nango generates a random key.

Pattern: ^[0-9a-fA-F]{8}-[0-9a-fA-F]{4}-4[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}$
Example:

"8a27fe09-327c-43ec-8f75-b1f212904f45"

Response

The new webhook signing key

data
object
required