/v2/agents/triggers/{trigger_id}/rotate-secretRotateTriggerSecret issues a new webhook secret.
Webhook triggers only (409 for cron). Issues a new secret (shown once) and moves the old value to the previous slot, where it keeps verifying deliveries until previous_secret_expires_at. Default grace is 5 minutes when grace_period_seconds is omitted, so deliveries already in flight (signed with the old value) still succeed while the customer updates their external system. After that instant the old value is refused with 401. Pass grace_period_seconds=0 to retire the old secret on this call (breach response), or a positive value (up to the server max, default 1 hour) for a custom window; above the max is 400.
- IdempotentThe SDK sends
Idempotency-Key, so a retried request is only applied once.
A 400 is returned: Invalid grace_period_seconds. A 401 is returned: Authentication failed due to invalid credentials. A 404 is returned: The resource was not found. A 409 is returned: The trigger is not a webhook trigger. A 429 is returned: The API rate limit has been exceeded. A 500 is returned: There was a server error. Any other status is an error: There was an unexpected error.