# webhook

> Shoplazza CLI webhook commands to create, list, get, update, delete, and count the event subscriptions that push store events to your Shoplazza App.

Register and manage webhook event subscriptions. 6 API commands.

All webhook commands share these flags:

| Flag | Short | Description |
|------|-------|-------------|
| `--params` | | Path/query parameters as JSON |
| `--data` | | Request body as JSON |
| `--jq` | `-q` | jq expression to filter output |
| `--dry-run` | | Preview the request without executing |

## create

Register a new webhook.

```shell
shoplazza webhook create --data '<json_body>'
```

The request body must include `address` (notification URL) and `topic` (event name).

### Example

```shell
shoplazza webhook create --data '{
  "webhook": {
    "topic": "orders/create",
    "address": "https://example.com/hook"
  }
}'
```

## list

List all registered webhooks.

```shell
shoplazza webhook list
```

### Example

```shell
shoplazza webhook list --format table
```

## get

Get details of a specific webhook.

```shell
shoplazza webhook get --params '{"webhook_id":"123"}'
```

## update

Update a webhook subscription.

```shell
shoplazza webhook update --params '{"webhook_id":"123"}' --data @webhook.json
```

### Example

```shell
shoplazza webhook update --params '{"webhook_id":"123"}' --data '{
  "webhook": {
    "address": "https://example.com/webhooks/orders-v2"
  }
}'
```

## delete

Delete a webhook subscription.

```shell
shoplazza webhook delete --params '{"webhook_id":"123"}'
```

## count

Count registered webhooks.

```shell
shoplazza webhook count
```

## Related

* [Webhook overview](/docs/app/building-blocks/webhooks/overview) — Event types and payload format
* [Supported webhook events](/docs/app/building-blocks/webhooks/supported-webhook-events/) — Full event reference
