> ## Documentation Index
> Fetch the complete documentation index at: https://docs.60db.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# Rotate Webhook Signing Secret

> Issue a new signing secret for an agent's tool and event webhooks.

Issue a new signing secret for the agent's webhooks. Every request 60db sends to your `tool_webhook_url` and `event_webhook_url` is signed with it (`X-60db-Signature`). The new secret is returned **once** — store it.

> [!WARNING]
>
> The old secret stops working immediately. Update your servers right after rotating, ideally when no call is running.

## Request

### Headers

**Authorization** `string` *required*

Bearer token with your API key (scope `agents`)

### Path

**agentId** `string` *required*

The agent `id` (UUID)

## Response

**200 OK**

```json theme={null}
{
  "success": true,
  "data": {
    "id": "6f1c1e2a-1111-4000-8000-000000000001",
    "webhook_secret": "whsec_…"
  }
}
```

## Errors

| Status | Code | Meaning |
| - | - | - |
| 404 | `AGENT_NOT_FOUND` | No agent with this ID in your workspace |

## Example

```bash cURL theme={null}
curl -X POST https://api.60db.ai/agents/AGENT_ID/rotate-webhook-secret \
  -H "Authorization: Bearer your-api-key"
```

```javascript JavaScript theme={null}
const { webhook_secret } = await client.agents.rotateWebhookSecret("AGENT_ID");
```

```python Python theme={null}
result = client.agents.rotate_webhook_secret("AGENT_ID")
print(result["webhook_secret"])
```

See [Tools and webhooks](https://docs.60db.ai/features/agents-tools-and-webhooks.md) for verifying signatures.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.