Skip to main content
POST
/
notifications
/
push
/
v1
/
providers
/
custom
Save Custom Provider for Push Notifications
curl --request POST \
  --url https://{appid}.api-{region}.cometchat.io/v3/notifications/push/v1/providers/custom \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "isEnabled": true,
  "webhookURL": "<string>",
  "useBasicAuth": true,
  "basicAuthUsername": "<string>",
  "basicAuthPassword": "<string>"
}'
{
  "data": {
    "pushProviders": [
      {
        "basicAuthUsername": "user123",
        "basicAuthPassword": "pass123",
        "useBasicAuth": true,
        "isEnabled": true,
        "webhookURL": "https://trigger-push.example.com/cometchat"
      }
    ]
  }
}

Authorizations

apikey
string
header
required

API Key with fullAccess scope(i.e. Rest API Key from the Dashboard).

Body

application/json
isEnabled
boolean
required

Use custom provider

webhookURL
string
required

The webhook URL to be triggered for the respective events.

useBasicAuth
boolean
required

To enable basic auth for the URL

basicAuthUsername
string
required

The username for Basic auth

basicAuthPassword
string
required

The password for Basic auth

Response

200 - application/json

Save push notification's custom provider

The response is of type object.

I