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

# Update Subscription

> Update a webhook subscription (agent, template, change_type).



## OpenAPI

````yaml /api-reference/openapi.json patch /api/webhooks/subscriptions/{subscription_db_id}
openapi: 3.1.0
info:
  title: apowerb API
  description: REST API of the apowerb agentic framework (open-source edition).
  version: 0.1.2
  license:
    name: MIT
    url: https://github.com/apowerb/apowerb/blob/main/LICENSE
servers:
  - url: https://api.example.com
    description: Your apowerb instance
  - url: http://localhost:8000
    description: Local stack
security: []
paths:
  /api/webhooks/subscriptions/{subscription_db_id}:
    patch:
      tags:
        - webhooks
      summary: Update Subscription
      description: Update a webhook subscription (agent, template, change_type).
      operationId: >-
        update_subscription_api_webhooks_subscriptions__subscription_db_id__patch
      parameters:
        - name: subscription_db_id
          in: path
          required: true
          schema:
            type: integer
            title: Subscription Db Id
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookSubscriptionUpdate'
      responses:
        '200':
          description: Successful Response
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookSubscriptionResponse'
        '422':
          description: Validation Error
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/HTTPValidationError'
      security:
        - HTTPBearer: []
components:
  schemas:
    WebhookSubscriptionUpdate:
      properties:
        agent_id:
          anyOf:
            - type: integer
            - type: 'null'
          title: Agent Id
        agent_message_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Message Template
        change_type:
          anyOf:
            - type: string
            - type: 'null'
          title: Change Type
      type: object
      title: WebhookSubscriptionUpdate
      description: >-
        Request to update an existing webhook subscription (all fields
        optional).
    WebhookSubscriptionResponse:
      properties:
        id:
          type: integer
          title: Id
        provider:
          type: string
          title: Provider
        subscription_id:
          anyOf:
            - type: string
            - type: 'null'
          title: Subscription Id
        resource:
          type: string
          title: Resource
        change_type:
          type: string
          title: Change Type
        agent_id:
          type: integer
          title: Agent Id
        agent_message_template:
          anyOf:
            - type: string
            - type: 'null'
          title: Agent Message Template
        status:
          type: string
          title: Status
        expiration_datetime:
          anyOf:
            - type: string
            - type: 'null'
          title: Expiration Datetime
        created_at:
          anyOf:
            - type: string
            - type: 'null'
          title: Created At
      type: object
      required:
        - id
        - provider
        - subscription_id
        - resource
        - change_type
        - agent_id
        - agent_message_template
        - status
        - expiration_datetime
        - created_at
      title: WebhookSubscriptionResponse
      description: Response after creating a subscription.
    HTTPValidationError:
      properties:
        detail:
          items:
            $ref: '#/components/schemas/ValidationError'
          type: array
          title: Detail
      type: object
      title: HTTPValidationError
    ValidationError:
      properties:
        loc:
          items:
            anyOf:
              - type: string
              - type: integer
          type: array
          title: Location
        msg:
          type: string
          title: Message
        type:
          type: string
          title: Error Type
        input:
          title: Input
        ctx:
          type: object
          title: Context
      type: object
      required:
        - loc
        - msg
        - type
      title: ValidationError
  securitySchemes:
    HTTPBearer:
      type: http
      scheme: bearer

````

## Related topics

- [Webhooks](/guides/webhooks.md)
- [List Subscriptions](/api-reference/webhooks/list-subscriptions.md)
- [Retrigger Webhook Log](/api-reference/webhooks/retrigger-webhook-log.md)
- [Create Subscription](/api-reference/webhooks/create-subscription.md)
- [Delete Subscription](/api-reference/webhooks/delete-subscription.md)
