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

# Updating a Webhook

> This endpoint updates a webhook

## Request URL

```http theme={null}
PUT https://app.tatango.com/api/v2/lists/{ID}/webhooks/{WEBHOOK_ID}
```


## OpenAPI

````yaml PUT /api/v2/lists/{ID}/webhooks/{WEBHOOK_ID}
openapi: 3.1.0
info:
  title: momoGood Messaging API v2
  description: >-
    The platform management API for momoGood Messaging (formerly the Tatango v2
    API). Manage lists, subscribers, custom fields, tags, webhooks, shortcodes,
    MOMT reports, and scheduled broadcasts from a single REST surface.
  version: 2.0.0
servers:
  - url: https://app.tatango.com
security:
  - basicAuth: []
paths:
  /api/v2/lists/{ID}/webhooks/{WEBHOOK_ID}:
    put:
      tags:
        - Webhooks
      summary: Updating a Webhook
      description: This endpoint updates a webhook
      parameters:
        - name: ID
          in: path
          description: The ID of the list
          required: true
          schema:
            type: integer
        - name: WEBHOOK_ID
          in: path
          required: true
          schema:
            type: integer
          description: The ID of the webhook
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                webhook:
                  type: object
                  properties:
                    callback_url:
                      type: string
                      description: >-
                        The URL to receive webhook events. Must be a valid HTTP
                        or HTTPS endpoint.
                      example: http://localhost.dev/null?api_key=foo_bar_baz
                    subscribe:
                      type: boolean
                      description: >-
                        Whether to receive subscription events (e.g., when a
                        user subscribes).
                      example: true
                    unsubscribe:
                      type: boolean
                      description: Whether to receive unsubscription events.
                      example: true
                    message_sent:
                      type: boolean
                      description: Whether to receive events when a message is sent.
                      example: false
                  required:
                    - callback_url
                    - subscribe
                    - unsubscribe
                    - message_sent
      responses:
        '200':
          description: Webhook updated successfully
          content:
            application/json:
              schema:
                $ref: '#/components/schemas/UpdateWebhookResponse'
              example:
                status: Webhook updated
                webhook:
                  callback_url: http://localhost.dev/null?api_key=foo_bar_baz
                  created_at: '2016-09-07T14:11:13-07:00'
                  enabled: true
                  id: 4
                  list_id: 29
                  message_sent: false
                  subscribe: true
                  unsubscribe: true
                  updated_at: '2016-09-07T14:11:13-07:00'
      x-codeSamples:
        - lang: cURL
          label: cURL
          source: >-
            curl "https://app.tatango.com/api/v2/lists/ID/webhooks/WEBHOOK_ID"
            -d '{"webhook":{"url":"https://example.com/webhook"}}' -X PUT \
              -H "Accept: application/json" \
              -H "Content-Type: application/json" \
              -u emailaddress@mydomain.com:my_api_key \
              -H "Host: example.org" \
              -H "Cookie: "
        - lang: Ruby
          label: Ruby
          source: >-
            require 'net/http'

            require 'uri'

            require 'json'


            uri =
            URI.parse('https://app.tatango.com/api/v2/lists/ID/webhooks/WEBHOOK_ID')

            http = Net::HTTP.new(uri.host, uri.port)

            http.use_ssl = true

            request = Net::HTTP::Put.new(uri.request_uri)

            request.basic_auth("emailaddress@mydomain.com", "my_api_key")

            request['Accept'] = 'application/json'

            request['Content-Type'] = 'application/json'

            request.body = {"webhook" => {"url" =>
            "https://example.com/webhook"}}.to_json

            response = http.request(request)
components:
  schemas:
    UpdateWebhookResponse:
      type: object
      properties:
        status:
          type: string
          example: Webhook updated
        webhook:
          type: object
          properties:
            callback_url:
              type: string
              example: http://localhost.dev/null?api_key=foo_bar_baz
            created_at:
              type: string
              example: '2016-09-07T14:11:13-07:00'
            enabled:
              type: boolean
              example: true
            id:
              type: integer
              example: 4
            list_id:
              type: integer
              example: 29
            message_sent:
              type: boolean
              example: false
            subscribe:
              type: boolean
              example: true
            unsubscribe:
              type: boolean
              example: true
            updated_at:
              type: string
              example: '2016-09-07T14:11:13-07:00'
      required:
        - status
        - webhook
  securitySchemes:
    basicAuth:
      type: http
      scheme: basic
      description: >-
        The momoGood Messaging API v2 authenticates requests by validating an
        API key passed via HTTP Basic Authentication. Use your login email as
        the username and your API key as the password.

````