Skip to main content
POST
/
notification-feed
/
{id}
/
read
Mark a feed item as read
curl --request POST \
  --url https://{appId}.api-{region}.cometchat.io/v3/campaigns/notification-feed/{id}/read \
  --header 'apikey: <api-key>' \
  --header 'appid: <appid>' \
  --header 'onbehalfof: <onbehalfof>'
import requests

url = "https://{appId}.api-{region}.cometchat.io/v3/campaigns/notification-feed/{id}/read"

headers = {
"onbehalfof": "<onbehalfof>",
"appid": "<appid>",
"apikey": "<api-key>"
}

response = requests.post(url, headers=headers)

print(response.text)
const options = {
method: 'POST',
headers: {onbehalfof: '<onbehalfof>', appid: '<appid>', apikey: '<api-key>'}
};

fetch('https://{appId}.api-{region}.cometchat.io/v3/campaigns/notification-feed/{id}/read', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));
<?php

$curl = curl_init();

curl_setopt_array($curl, [
CURLOPT_URL => "https://{appId}.api-{region}.cometchat.io/v3/campaigns/notification-feed/{id}/read",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_HTTPHEADER => [
"apikey: <api-key>",
"appid: <appid>",
"onbehalfof: <onbehalfof>"
],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}
package main

import (
"fmt"
"net/http"
"io"
)

func main() {

url := "https://{appId}.api-{region}.cometchat.io/v3/campaigns/notification-feed/{id}/read"

req, _ := http.NewRequest("POST", url, nil)

req.Header.Add("onbehalfof", "<onbehalfof>")
req.Header.Add("appid", "<appid>")
req.Header.Add("apikey", "<api-key>")

res, _ := http.DefaultClient.Do(req)

defer res.Body.Close()
body, _ := io.ReadAll(res.Body)

fmt.Println(string(body))

}
HttpResponse<String> response = Unirest.post("https://{appId}.api-{region}.cometchat.io/v3/campaigns/notification-feed/{id}/read")
.header("onbehalfof", "<onbehalfof>")
.header("appid", "<appid>")
.header("apikey", "<api-key>")
.asString();
require 'uri'
require 'net/http'

url = URI("https://{appId}.api-{region}.cometchat.io/v3/campaigns/notification-feed/{id}/read")

http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true

request = Net::HTTP::Post.new(url)
request["onbehalfof"] = '<onbehalfof>'
request["appid"] = '<appid>'
request["apikey"] = '<api-key>'

response = http.request(request)
puts response.read_body

Authorizations

apikey
string
header
required

Your CometChat REST API Key.

Headers

onbehalfof
string
required

UID of user making client request

appid
string
required

Tenant application ID

Path Parameters

id
string
required

Response