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

# Update a Price Webhook

> Change the URL, the secret or the name of a price webhook, or rotate its secret. Free.

`POST /v1/webhook/price/{id}/endpoint` · **Free**

Changes the `callbackUrl`, the `secret` or the `name` of a price webhook (`name: null` removes it), at least one of them. `rotate: true` generates a new secret and returns it in this response only (not with `secret`). A new URL is checked like at creation. The next attempts of every delivery use the new URL and secret. Free.

```bash cURL theme={null}
curl -X POST 'https://api.serialized.xyz/v1/webhook/price/tpsl/endpoint' \
  -H 'Authorization: YOUR_API_KEY' -H 'Content-Type: application/json' \
  -d '{"callbackUrl":"https://example.com/hooks/price-v2","rotate":true}'
```

```json Response theme={null}
{
  "data": {
    "id": "tpsl",
    "name": "Orders",
    "callbackUrl": "https://example.com/hooks/price-v2",
    "updatedAt": 1792541500000,
    "secret": "whsec_Q8mV3pXt7nB1cLa9rJd0yKe4sWfZ2uHg"
  }
}
```


## OpenAPI

````yaml openapi.json POST /v1/webhook/price/{id}/endpoint
openapi: 3.1.0
info:
  title: Serialized Data API
  description: >-
    On-chain data for trading apps - tokens, candles, token filters. Built on
    our own indexers. 18 EVM chains + Solana, live.
  version: 0.1.0
servers:
  - url: https://demo.serialized.xyz
    description: 'Demo: no key needed, read endpoints, rate-limited per IP'
  - url: https://api.serialized.xyz
    description: 'Production: your API key in the Authorization header'
security:
  - apiKey: []
  - {}
paths:
  /v1/webhook/price/{id}/endpoint:
    post:
      summary: Update a Price Webhook
      description: >-
        Changes the `callbackUrl`, the `secret` or the `name` of a price
        webhook, at least one of them. `rotate: true` generates a new secret and
        returns it in this response only. The next attempts of every delivery
        use the new URL and secret. Free.
      operationId: price-webhook-endpoint
      parameters:
        - schema:
            type: string
            x-default: tpsl
          in: path
          name: id
          required: true
          description: 'The price webhook id: yours, or the `wh_…` id we generated.'
          example: tpsl
      requestBody:
        required: true
        content:
          application/json:
            schema:
              additionalProperties: false
              type: object
              properties:
                callbackUrl:
                  description: A new callback URL, same rules as at creation.
                  type: string
                secret:
                  description: >-
                    A new secret of your own: 16 to 256 printable ASCII
                    characters without spaces.
                  type: string
                rotate:
                  description: >-
                    `true`: we generate a new secret and return it once. Not
                    with `secret`.
                  type: boolean
                  enum:
                    - true
                name:
                  description: A new name (1 to 128 characters), or null to remove it.
      responses:
        '200':
          description: Standard `{ data, meta }` envelope.
components:
  securitySchemes:
    apiKey:
      type: apiKey
      name: Authorization
      in: header
      description: Your raw API key (not needed on the demo server).

````

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