---
title: "Create or replace the account webhook, optionally rotating its signing secret"
method: PUT
path: "/v1/webhooks"
tags: ["Webhooks"]
---

# Create or replace the account webhook, optionally rotating its signing secret

`PUT /v1/webhooks`

## Request

- Base URL: `https://api.scripthaul.com`
- URL: `https://api.scripthaul.com/v1/webhooks`
- Auth: HTTP bearer

The signing secret is returned once: when the webhook is first configured and whenever rotate_secret is true. Rotation does not re-sign deliveries already enqueued; they keep the secret snapshot they were created with.

## Request body

- WebhookConfig
  - `url` string, uri, required
  - `low_balance_threshold` integer, nullable
  - `rotate_secret` boolean: Issue a new signing secret and return it once in this response.

## Response `200`

Webhook configured

## Other responses

- `400`: Typed API error
- `401`: Typed API error
- `403`: Typed API error

---

[API](https://skmtc.dev/scripthaul/apis/scripthaul-api.md) · [All operations](https://skmtc.dev/scripthaul/apis/scripthaul-api/llms.txt) · [OpenAPI document](https://skmtc.dev/scripthaul/apis/scripthaul-api/revisions/f476d69f4a6b?raw)
