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

# Update webhook status

> Update webhook active status

<Info>
  ### Related tutorial: [Programmatic webhooks](/docs/how-to-create-webhooks-on-the-go-using-the-sdk)
</Info>

## Node.js SDK

🔗 **SDK Method:** [updateWebhookActiveStatus](/nodejs-sdk/webhook-apis/updateWebhookActiveStatus)

Use this API endpoint with the Neynar Node.js SDK for typed responses and better developer experience.


## OpenAPI

````yaml patch /v2/farcaster/webhook/
openapi: 3.0.4
info:
  contact:
    email: team@neynar.com
    name: Neynar
    url: https://neynar.com/
  description: >-
    The Neynar API allows you to interact with the Farcaster protocol among
    other things. See the [Neynar docs](https://docs.neynar.com/reference) for
    more details.
  title: Neynar API
  version: 3.173.0
servers:
  - url: https://api.neynar.com
security:
  - ApiKeyAuth: []
tags:
  - description: Operations related to user
    externalDocs:
      description: More info about user
      url: https://docs.neynar.com/reference/user-operations
    name: User
  - description: Operations related to signer
    externalDocs:
      description: More info about signer
      url: https://docs.neynar.com/reference/signer-operations
    name: Signer
  - description: Operations related to cast
    externalDocs:
      description: More info about cast
      url: https://docs.neynar.com/reference/cast-operations
    name: Cast
  - description: Operations related to feed
    externalDocs:
      description: More info about feed
      url: https://docs.neynar.com/reference/feed-operations
    name: Feed
  - description: Operations related to reaction
    externalDocs:
      description: More info about reaction
      url: https://docs.neynar.com/reference/reaction-operations
    name: Reaction
  - description: Operations related to notifications
    externalDocs:
      description: More info about notifications
      url: https://docs.neynar.com/reference/notifications-operations
    name: Notifications
  - description: Operations related to channels
    externalDocs:
      description: More info about channels
      url: https://docs.neynar.com/reference/channel-operations
    name: Channel
  - description: Operations related to follows
    externalDocs:
      description: More info about follows
      url: https://docs.neynar.com/reference/follows-operations
    name: Follows
  - description: Operations related to storage
    externalDocs:
      description: More info about storage
      url: https://docs.neynar.com/reference/storage-operations
    name: Storage
  - description: Operations related to mini apps
    name: Frame
  - description: Operations for building AI agents
    name: Agents
  - description: Operations related to fname
    name: fname
  - description: Operations related to a webhook
    name: Webhook
  - description: >-
      Securely communicate and perform actions on behalf of users across
      different apps
    externalDocs:
      description: More info about farcaster actions
      url: https://docs.neynar.com/docs/farcaster-actions-spec
    name: Action
  - description: Operations related to a subscriptions
    name: Subscribers
  - description: Operations related to a mute
    name: Mute
  - description: Operations related to a block
    name: Block
  - description: Operations related to a ban
    name: Ban
  - description: Operations related to onchain data
    name: Onchain
  - description: Operations related to login
    name: Login
  - description: Operations related to retrieving metrics
    name: Metrics
  - description: Operations related to mini app host notifications
    externalDocs:
      description: More info about mini app host notifications
      url: https://docs.neynar.com/docs/app-host-notifications
    name: App Host
paths:
  /v2/farcaster/webhook/:
    patch:
      tags:
        - Webhook
      summary: Update webhook status
      description: Update webhook active status
      operationId: update-webhook-active-status
      requestBody:
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/WebhookPatchReqBody'
        required: true
      responses:
        '200':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/WebhookResponse'
          description: Success
        '400':
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/ErrorRes'
          description: Bad Request
      externalDocs:
        url: https://docs.neynar.com/reference/update-webhook-active-status
components:
  schemas:
    WebhookPatchReqBody:
      properties:
        active:
          enum:
            - 'true'
            - 'false'
          type: string
        webhook_id:
          type: string
      required:
        - webhook_id
        - active
      title: WebhookPatchReqBody
      type: object
    WebhookResponse:
      properties:
        message:
          type: string
        success:
          type: boolean
        webhook:
          $ref: '#/components/schemas/Webhook'
      title: WebhookResponse
      type: object
    ErrorRes:
      description: Details for the error response
      properties:
        code:
          type: string
        message:
          type: string
        property:
          type: string
        status:
          format: int32
          type: integer
      required:
        - message
      title: ErrorRes
      type: object
    Webhook:
      properties:
        active:
          type: boolean
        created_at:
          format: date-time
          type: string
        deleted_at:
          format: date-time
          nullable: true
          type: string
        description:
          type: string
        developer_uuid:
          type: string
        http_timeout:
          type: string
        object:
          enum:
            - webhook
          type: string
        rate_limit:
          type: integer
        rate_limit_duration:
          type: string
        secrets:
          items:
            $ref: '#/components/schemas/WebhookSecret'
          type: array
        subscription:
          $ref: '#/components/schemas/WebhookSubscription'
        target_url:
          type: string
        title:
          type: string
        updated_at:
          format: date-time
          type: string
        webhook_id:
          type: string
      required:
        - object
        - webhook_id
        - developer_uuid
        - target_url
        - title
        - secrets
        - description
        - http_timeout
        - rate_limit
        - active
        - rate_limit_duration
        - created_at
        - updated_at
        - deleted_at
      title: Webhook
      type: object
    WebhookSecret:
      properties:
        created_at:
          type: string
        deleted_at:
          nullable: true
          type: string
        expires_at:
          type: string
        uid:
          type: string
        updated_at:
          type: string
        value:
          type: string
      required:
        - uid
        - value
        - expires_at
        - created_at
        - updated_at
        - deleted_at
      title: WebhookSecret
      type: object
    WebhookSubscription:
      properties:
        created_at:
          format: date-time
          type: string
        filters:
          $ref: '#/components/schemas/WebhookSubscriptionFilters'
        object:
          enum:
            - webhook_subscription
          type: string
        subscription_id:
          type: string
        updated_at:
          format: date-time
          type: string
      required:
        - object
        - subscription_id
        - filters
        - created_at
        - updated_at
      title: WebhookSubscription
      type: object
    WebhookSubscriptionFilters:
      properties:
        cast.created:
          $ref: '#/components/schemas/WebhookSubscriptionFiltersCast'
        cast.deleted:
          $ref: '#/components/schemas/WebhookSubscriptionFiltersCast'
        follow.created:
          $ref: '#/components/schemas/WebhookSubscriptionFiltersFollow'
        follow.deleted:
          $ref: '#/components/schemas/WebhookSubscriptionFiltersFollow'
        reaction.created:
          $ref: '#/components/schemas/WebhookSubscriptionFiltersReaction'
        reaction.deleted:
          $ref: '#/components/schemas/WebhookSubscriptionFiltersReaction'
        trade.created:
          $ref: '#/components/schemas/WebhookSubscriptionFiltersTrade'
        user.created:
          properties: {}
          type: object
        user.updated:
          properties:
            fids:
              items:
                type: integer
              type: array
          type: object
      title: WebhookSubscriptionFilters
      type: object
    WebhookSubscriptionFiltersCast:
      properties:
        author_fids:
          items:
            type: integer
          type: array
        embedded_cast_author_fids:
          description: Filter for casts that contain embedded casts authored by these FIDs
          items:
            type: number
          type: array
        embedded_cast_hashes:
          description: Filter for casts that quote/embed these specific cast hashes
          items:
            type: string
          type: array
        embeds:
          description: >-
            Regex pattern to match the embeded_url (key embeds) of the cast.

            **Note:** 

            1) Regex must be parsed by Go's RE2 engine (Test your expression
            here: https://www.lddgo.net/en/string/golangregex)

            2) Use backslashes to escape special characters.

            For example: \\b(farcaster|neynar)\\b should be written as
            \\\\b(farcaster|neynar)\\\\b
          example: "\b(farcaster|neynar)\b"
          type: string
        exclude_author_fids:
          description: |-
            Exclude casts that matches these authors.
            **Note:**
            This is applied as an AND operation against rest of the filters.
            Rest of the filters are bundled as an OR operation.
          items:
            type: integer
          type: array
        mentioned_fids:
          items:
            type: integer
          type: array
        minimum_author_score:
          default: 0
          maximum: 1
          minimum: 0
          type: number
        parent_author_fids:
          items:
            type: integer
          type: array
        parent_hashes:
          items:
            type: string
          type: array
        parent_urls:
          items:
            type: string
          type: array
        root_parent_urls:
          items:
            type: string
          type: array
        text:
          description: >-
            Regex pattern to match the text key of the cast.

            **Note:** 

            1) Regex must be parsed by Go's RE2 engine (Test your expression
            here: https://www.lddgo.net/en/string/golangregex)

            2) Use backslashes to escape special characters.

            For example: (?i)\\$degen should be written as (?i)\\\\$degen
          example: (?i)\$degen
          type: string
      title: WebhookSubscriptionFiltersCast
      type: object
    WebhookSubscriptionFiltersFollow:
      properties:
        fids:
          items:
            type: integer
          type: array
        target_fids:
          items:
            type: integer
          type: array
      title: WebhookSubscriptionFiltersFollow
      type: object
    WebhookSubscriptionFiltersReaction:
      properties:
        fids:
          items:
            type: integer
          type: array
        target_cast_hashes:
          items:
            example: '0x71d5225f77e0164388b1d4c120825f3a2c1f131c'
            pattern: ^(0x)?[a-fA-F0-9]{40}$
            type: string
          type: array
        target_fids:
          items:
            type: integer
          type: array
      title: WebhookSubscriptionFiltersReaction
      type: object
    WebhookSubscriptionFiltersTrade:
      properties:
        fids:
          items:
            type: integer
          type: array
        minimum_token_amount_usdc:
          minimum: 0
          type: number
        minimum_trader_neynar_score:
          maximum: 1
          minimum: 0
          type: number
      title: WebhookSubscriptionFiltersTrade
      type: object
  securitySchemes:
    ApiKeyAuth:
      description: API key to authorize requests
      in: header
      name: x-api-key
      type: apiKey
      x-default: NEYNAR_API_DOCS

````