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

# PUT /Webhooks/{event}

> Update the URL or credentials for an existing webhook subscription.

Update the URL or credentials for an existing webhook subscription.

<ParamField header="X-API-KEY" type="string" required>Your API key</ParamField>
<ParamField header="Content-Type" type="string" required>Must be `application/json`</ParamField>

<ParamField path="event" type="string" required>Event name. Valid values: `BOOKING_CREATED`, `BOOKING_UPDATED`, `GIFTCARDS_CREATED`, `GIFTCARDS_UPDATED`, `GIFTCARDS_CANCELLED`, `GIFTCARDS_REDEEMED`</ParamField>

<ParamField body="webhookUrl" type="string" required>New endpoint URL</ParamField>
<ParamField body="securityKey" type="string">Updated auth key</ParamField>
<ParamField body="securityToken" type="string">Updated auth token</ParamField>

<CodeGroup>
  ```shell curl theme={null}
  curl --location --request PUT '[BASE_URL]/Webhooks/BOOKING_CREATED' \
  --header 'X-API-KEY: your_api_key_here' \
  --header 'Content-Type: application/json' \
  --data '{ "webhookUrl": "https://your-system.com/webhooks/nbi/v2/booking-created" }'
  ```
</CodeGroup>

**Example 200 Response**

```json theme={null}
{
  "event": "BOOKING_CREATED",
  "webhookUrl": "https://your-system.com/webhooks/nbi/v2/booking-created",
  "locationId": "loc-9",
  "errorMessage": null
}
```

| Status | Description                                              |
| ------ | -------------------------------------------------------- |
| `200`  | Subscription updated                                     |
| `400`  | API key not associated with a venue                      |
| `400`  | `No Venue Subscribed to your App.`                       |
| `400`  | `Giftcard Webhook Request Failed Verification.`          |
| `401`  | X-API-KEY missing or invalid                             |
| `404`  | `Webhook Subscription for event '{event}' was not found` |


## OpenAPI

````yaml PUT /Webhooks/{event}
openapi: 3.0.4
info:
  title: NowBookIt IPOS Partner API
  description: >-
    REST API for integrating your POS or external system with NowBookIt's
    reservation, sales, and gift card platform.
  version: v1
  contact:
    email: platform.integrations@nowbookit.com
servers:
  - url: https://ipos.dev.nowbookit.com
    description: Development
  - url: https://ipos.nowbookit.com
    description: Production
security:
  - ApiKeyAuth: []
paths:
  /Webhooks/{event}:
    put:
      tags:
        - Webhooks
      summary: Update Webhook
      operationId: updateWebhook
      parameters:
        - name: event
          in: path
          description: >-
            The name of the event that the webhook subscription is being updated
            for.
          required: true
          schema:
            $ref: '#/components/schemas/WebhookEvents'
        - name: X-API-KEY
          in: header
          description: API Key authentication header
          required: true
          schema:
            type: string
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookRequest'
      responses:
        '200':
          description: Update Webhook Event
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
      security:
        - ApiKeyAuth: []
components:
  schemas:
    WebhookEvents:
      enum:
        - BOOKING_CREATED
        - BOOKING_UPDATED
        - GIFTCARDS_CREATED
        - GIFTCARDS_UPDATED
        - GIFTCARDS_CANCELLED
        - GIFTCARDS_REDEEMED
      type: string
    WebhookRequest:
      required:
        - webhookUrl
      type: object
      properties:
        webhookUrl:
          minLength: 1
          type: string
          format: uri
        securityKey:
          type: string
          nullable: true
        securityToken:
          type: string
          nullable: true
      additionalProperties: false
    WebhookResponse:
      type: object
      properties:
        event:
          type: string
          nullable: true
        webhookUrl:
          type: string
          nullable: true
        locationId:
          type: string
          nullable: true
        errorMessage:
          type: string
          nullable: true
      additionalProperties: false
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-KEY

````