Skip to main content
POST
/
notifications
/
email
/
v1
/
providers
/
custom
Save Custom Provider for Email Notifications
curl --request POST \
  --url https://{appid}.api-{region}.cometchat.io/v3/notifications/email/v1/providers/custom \
  --header 'Content-Type: application/json' \
  --header 'apikey: <api-key>' \
  --data '{
  "isEnabled": true,
  "useStoredEmailID": true,
  "webhookURL": "<string>",
  "useBasicAuth": true,
  "basicAuthUsername": "<string>",
  "basicAuthPassword": "<string>"
}'
{
  "data": {
    "basicAuthUsername": "user889",
    "basicAuthPassword": "pass122",
    "isEnabled": true,
    "useBasicAuth": true,
    "useStoredEmailID": false,
    "webhookURL": "https://trigger-email.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

useStoredEmailID
boolean
required

If enabled, the webhook will be triggered for a user only if their email address is stored within CometChat.

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 the push notification's SMS custom provider

The response is of type object.

I