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

# Update a webhook subscription

> Updates a webhook subscription. Any combination of the subscribed event types, state (ACTIVE or DISABLED), and description may be changed, and at least one field must be supplied. Setting state to ACTIVE re-enables a subscription that was auto-blocked after sustained delivery failures.



## OpenAPI

````yaml /api-reference/webhooks.yaml patch /webhooks/{id}
openapi: 3.1.0
info:
  title: Webhooks
  version: v1
servers:
  - description: Droidrun Cloud API
    url: https://api.mobilerun.ai/v1
security:
  - bearerAuth: []
paths:
  /webhooks/{id}:
    patch:
      tags:
        - Webhooks
      summary: Update a webhook subscription
      description: >-
        Updates a webhook subscription. Any combination of the subscribed event
        types, state (ACTIVE or DISABLED), and description may be changed, and
        at least one field must be supplied. Setting state to ACTIVE re-enables
        a subscription that was auto-blocked after sustained delivery failures.
      operationId: updateWebhook
      parameters:
        - in: path
          name: id
          required: true
          schema:
            example: 550e8400-e29b-41d4-a716-446655440000
            format: uuid
            type: string
      requestBody:
        content:
          application/json:
            schema:
              properties:
                description:
                  maxLength: 500
                  type:
                    - string
                    - 'null'
                eventTypes:
                  items:
                    maxLength: 256
                    minLength: 1
                    type: string
                  maxItems: 100
                  type: array
                state:
                  enum:
                    - ACTIVE
                    - DISABLED
                  type: string
              type: object
      responses:
        '200':
          content:
            application/json:
              schema:
                properties:
                  data:
                    properties:
                      blockedAt:
                        type:
                          - string
                          - 'null'
                      blockedReason:
                        type:
                          - string
                          - 'null'
                      createdAt:
                        type: string
                      createdBy:
                        description: >-
                          Id of the actor who created this endpoint. Null when
                          no creator was recorded.
                        format: uuid
                        type:
                          - string
                          - 'null'
                      description:
                        type:
                          - string
                          - 'null'
                      eventTypes:
                        items:
                          type: string
                        type: array
                      health:
                        description: >-
                          System-observed delivery health. `blocked` endpoints
                          are auto-disabled after sustained failure; PATCH
                          state=ACTIVE to re-enable.
                        enum:
                          - healthy
                          - failing
                          - blocked
                        type: string
                      id:
                        format: uuid
                        type: string
                      signingEnabled:
                        type: boolean
                      state:
                        enum:
                          - ACTIVE
                          - DISABLED
                          - DELETED
                        type: string
                      updatedAt:
                        type: string
                      url:
                        type: string
                    required:
                      - id
                      - url
                      - eventTypes
                      - state
                      - health
                      - blockedAt
                      - blockedReason
                      - signingEnabled
                      - description
                      - createdBy
                      - createdAt
                      - updatedAt
                    type: object
                required:
                  - data
                type: object
          description: Updated webhook subscription
        '400':
          description: Bad Request
        '401':
          description: Unauthorized
        '404':
          content:
            application/json:
              schema:
                properties:
                  error:
                    type: string
                required:
                  - error
                type: object
          description: Not Found
        '500':
          description: Internal Server Error
      x-codeSamples:
        - lang: JavaScript
          source: >-
            import Mobilerun from '@mobilerun/sdk';


            const client = new Mobilerun({
              apiKey: process.env['MOBILERUN_CLOUD_API_KEY'], // This is the default and can be omitted
            });


            const webhook = await
            client.webhooks.update('550e8400-e29b-41d4-a716-446655440000');


            console.log(webhook.data);
        - lang: Python
          source: |-
            import os
            from mobilerun_sdk import Mobilerun

            client = Mobilerun(
                api_key=os.environ.get("MOBILERUN_CLOUD_API_KEY"),  # This is the default and can be omitted
            )
            webhook = client.webhooks.update(
                id="550e8400-e29b-41d4-a716-446655440000",
            )
            print(webhook.data)
components:
  securitySchemes:
    bearerAuth:
      bearerFormat: Opaque
      description: Bearer token via Authorization header
      scheme: bearer
      type: http

````

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