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

# Update Webhook

> Set your own webhook URL for order status notifications — self-service, no admin needed.

Set or change the webhook URL Rails calls when your orders change state
(`settled`, `refunded`, `expired`). Authenticated with your API key — you
manage this yourself.

To view your current webhook, call [Get Account](/api-reference/endpoint-get-account).

### Header Parameters

<ParamField header="API-Key" type="string" required>
  Unique API key issued manually through Telegram.
</ParamField>

### Request Body

<ParamField body="webhook_url" type="string" required>
  A valid HTTPS URL Rails will POST status events to.
</ParamField>

<ParamField body="scopes" type="array">
  Optional domain whitelist. Only updated when provided — omit it and your
  existing whitelist is preserved.
</ParamField>

### Response

<ResponseField name="status" type="string">Response state (`success`).</ResponseField>

<ResponseField name="data" type="object">
  <ResponseField name="sender_profile_id" type="string">Your sender profile id.</ResponseField>
  <ResponseField name="webhook_url" type="string">The stored webhook URL.</ResponseField>
  <ResponseField name="domain_whitelist" type="array">The current whitelist.</ResponseField>
</ResponseField>

<RequestExample>
  ```json Request theme={null}
  { "webhook_url": "https://your-app.com/hooks/rails" }
  ```
</RequestExample>

<ResponseExample>
  ```json Response (200 OK) theme={null}
  {
    "status": "success",
    "message": "Webhook URL updated",
    "data": {
      "sender_profile_id": "e7c194a0-3c4c-48c4-8235-4ba7dc94fa40",
      "webhook_url": "https://your-app.com/hooks/rails",
      "domain_whitelist": ["https://your-app.com"]
    }
  }
  ```
</ResponseExample>
