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

# Create or update webhook

> Sets the webhook URL for the account. Returns the signing secret only on creation or when `rotate_secret` is true.



## OpenAPI

````yaml put /v1/webhook
openapi: 3.1.0
info:
  title: Pointset API
  version: v1
  description: >-
    The Pointset location intelligence API. Subscribe to cities and entity types
    to receive continuously updated data about real-world places.
servers:
  - url: https://api.pointset.io
security: []
paths:
  /v1/webhook:
    put:
      tags:
        - Webhook
      summary: Create or update webhook config
      description: >-
        Sets the webhook URL for the account. Returns the signing secret only on
        creation or when `rotate_secret` is true.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                url:
                  type: string
                  format: uri
                  example: https://example.com/hooks/pointset
                rotate_secret:
                  type: boolean
                  description: >-
                    Rotate the signing secret. Triggers a new secret to be
                    returned.
              required:
                - url
      responses:
        '200':
          description: Updated
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConfig'
        '201':
          description: Created. The `secret` field contains the signing secret.
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookConfig'
        '422':
          description: Validation error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
        '500':
          description: Server error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/Error'
      security:
        - bearerAuth: []
components:
  schemas:
    WebhookConfig:
      type: object
      properties:
        id:
          type: string
          format: uuid
        account_id:
          type: string
          format: uuid
        url:
          type: string
          format: uri
        created_at:
          type: string
        updated_at:
          type: string
        secret:
          type: string
          description: Only returned on creation or when rotate_secret is true.
      required:
        - id
        - account_id
        - url
        - created_at
        - updated_at
    Error:
      type: object
      properties:
        error:
          type: string
      required:
        - error
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer

````