Mark announcement read
curl --request POST \
--url https://api.truthlocks.com/v1/messages/{id}/read \
--header 'X-API-Key: <api-key>'const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/messages/{id}/read', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/messages/{id}/read"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/messages/{id}/read"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Announcements
Mark announcement as read
Mark a single announcement as read for your tenant.
POST
/
v1
/
messages
/
{id}
/
read
Mark announcement read
curl --request POST \
--url https://api.truthlocks.com/v1/messages/{id}/read \
--header 'X-API-Key: <api-key>'const options = {method: 'POST', headers: {'X-API-Key': '<api-key>'}};
fetch('https://api.truthlocks.com/v1/messages/{id}/read', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "https://api.truthlocks.com/v1/messages/{id}/read"
headers = {"X-API-Key": "<api-key>"}
response = requests.post(url, headers=headers)
print(response.text)package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.truthlocks.com/v1/messages/{id}/read"
req, _ := http.NewRequest("POST", url, nil)
req.Header.Add("X-API-Key", "<api-key>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}{
"code": "AUTH_REQUIRED",
"message": "Authentication required",
"http_status": 401
}Marks the specified announcement as read. This updates the
is_read field to true and removes the unread indicator in the console.

