Skip to main content
PUT
/
apps
/
{appId}
/
webhooks
/
{webhookId}
Update Webhook
curl --request PUT \
  --url https://apimgmt.cometchat.io/apps/{appId}/webhooks/{webhookId} \
  --header 'Content-Type: application/json' \
  --header 'key: <key>' \
  --header 'secret: <secret>' \
  --data '{
  "name": "<string>",
  "useBasicAuth": true,
  "username": "<string>",
  "password": "<string>",
  "webhookURL": "<string>",
  "retryOnFailure": false,
  "enabled": true
}'
{
  "data": [
    {
      "data": {
        "id": "test_webhook201",
        "name": "updated webhook",
        "webhookURL": "https://example.com/test",
        "createdAt": 1684141151,
        "updatedAt": 1684145021
      }
    }
  ]
}

Headers

key
string
required

Authorization Key

secret
string
required

Authorization Secret

X-Webhook-Version
integer

The "X-Webhook-Version" header is an optional integer property.When this header is omitted from the request, the system defaults to the legacy webhook, ensuring backward compatibility and seamless operation.Conversely, setting the value of this header to "2" indicates the preference for the new webhook implementation.

Path Parameters

appId
string
required

AppID in which the extension has to be enabled/disabled

webhookId
string
required

Id of the webhook

Body

application/json
name
string

name of the Webhook.

useBasicAuth
boolean

Boolean value for Basic Auth.

username
string

Username of the user

password
string

Password of the user

webhookURL
string

Webhook URL of the app

retryOnFailure
boolean
default:false

Enables automatic retries for failed webhook deliveries due to non-2xx HTTP responses or network errors.

enabled
boolean

Webhook should be enabled/ disabled

Response

200 - application/json

Update Webhook

data
object
I