---
title: "Rotate an automation's webhook secret"
method: POST
path: "/automations/{automationId}/webhook/rotate-secret"
tags: ["Automations"]
---

# Rotate an automation's webhook secret

`POST /automations/{automationId}/webhook/rotate-secret`

## Request

- Base URL: `https://api.sazabi.com/v1`
- URL: `https://api.sazabi.com/v1/automations/{automationId}/webhook/rotate-secret`
- Auth: none declared

Issue a new signing secret for a webhook automation's hook. The hook URL does not change, and the previous secret keeps verifying deliveries for 24 hours.

## Path parameters

- `automationId` string, uuid, required: Automation ID.

## Request body

- object
  - `projectId` string, uuid: Project that owns the automation. Auto-filled from CLI and SDK context when omitted.

## Response `200`

OK

- object
  - `webhook` object, required
    - `hookId` string, required: Public id of the hook, the last segment of its URL.
    - `url` string, nullable, required: URL to POST deliveries to. Null only when the deployment has no public webhook URL configured.
    - `lastDeliveryAt` string, date-time, nullable, required: When the hook last received a verified delivery.
    - `secretRotatedAt` string, date-time, nullable, required: When the signing secret was last rotated. Null if never.
  - `secret` string, required: The webhook's new signing secret, returned only here. The previous secret keeps verifying deliveries for 24 hours.

## Changes

- **2026-10-20** `b32270ee84f4`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/sazabi/apis/sazabi-public-api/changes/automations/:automationId/webhook/rotate-secret/post.md)

---

[API](https://skmtc.dev/sazabi/apis/sazabi-public-api.md) - [All operations](https://skmtc.dev/sazabi/apis/sazabi-public-api/llms.txt) - [OpenAPI document](https://skmtc.dev/sazabi/apis/sazabi-public-api/revisions/965b6230cf45?raw)
