# Set the webhook

URL: https://docs.lastscanned.com/reference/webhooks/setWebhook

`PUT https://api.lastscanned.com/v1/webhook`

Sets the URL and/or format. The signing secret is made on first use and kept when the URL changes; `rotateSecret` makes a new one.

Body:

```json
{
  "url": "https://example.com/hooks/tracking",
  "format": "lastscanned"
}
```

Responses:
- 200: The webhook.
- 400: Not an https URL

Full spec: https://docs.lastscanned.com/openapi.yaml