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

# Update Webhook

> Update a webhook subscriptions.




## OpenAPI

````yaml put /webhooks/{id}
openapi: 3.1.0
info:
  title: Programmatic Webhooks API
  version: v1
  description: API used for creating, retrieving, updating, and deleting webhooks.
servers:
  - url: https://api.loopreturns.com/api/v1
security: []
tags:
  - name: Programmatic Webhooks
paths:
  /webhooks/{id}:
    put:
      tags:
        - Programmatic Webhooks
      summary: Update Webhook
      description: |
        Update a webhook subscriptions.
      operationId: updateWebhook
      parameters:
        - in: path
          name: id
          schema:
            type: integer
          required: true
          example: 12345
          description: The webhook's unique identifier.
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/UpdateWebhookRequest'
      responses:
        '204':
          description: No Content
        '401':
          description: Unauthorized
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnauthorizedResponse'
        '404':
          description: Not Found
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/NotFoundResponse'
        '422':
          description: Unprocessable
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UnprocessableResponse'
      security:
        - oauth2:
            - developer_tools
        - api_key: []
components:
  schemas:
    UpdateWebhookRequest:
      type: object
      required:
        - topic
        - trigger
        - url
      properties:
        topic:
          $ref: '#/components/schemas/TopicEnum'
        trigger:
          $ref: '#/components/schemas/TriggerEnum'
        url:
          $ref: '#/components/schemas/WebhookUrl'
        status:
          $ref: '#/components/schemas/StatusEnum'
    UnauthorizedResponse:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
              examples:
                - '401'
            http_code:
              type: string
              examples:
                - GEN-UNAUTHORIZED
            message:
              type: string
              examples:
                - Unauthorized.
    NotFoundResponse:
      type: object
      properties:
        errors:
          type: object
          properties:
            code:
              type: string
              examples:
                - NOT_FOUND
    UnprocessableResponse:
      type: object
      properties:
        message:
          type: string
          examples:
            - Must be one of the following values:return,label,restock
        errors:
          type: object
    TopicEnum:
      type: string
      description: The webhook's topic.
      enum:
        - return
        - label
        - restock
        - label.request
        - giftcard
        - happy.returns.shipment
      examples:
        - return
    TriggerEnum:
      type: string
      description: The condition which triggers the webhook.
      enum:
        - return.created
        - return.updated
        - return.closed
        - label.created
        - label.updated
        - restock.requested
        - label.request.issued
        - label.request.cancelled
        - giftcard.requested
        - shipment.processed
      examples:
        - return.created
    WebhookUrl:
      type: string
      examples:
        - https://example.com/webhook
      description: The webhook's URL.
    StatusEnum:
      type: string
      description: The webhook's status.
      enum:
        - active
        - inactive
  securitySchemes:
    oauth2:
      type: oauth2
      description: OAuth 2.0 authorization
      flows:
        authorizationCode:
          authorizationUrl: https://oauth.loopreturns.com/authorize
          tokenUrl: https://oauth.loopreturns.com/oauth/token
          scopes:
            developer_tools: Access to developer tools including webhooks
    api_key:
      type: apiKey
      name: X-Authorization
      in: header

````