API Documentation
The Pathwayful API is easy to use and free for all plans.
Mark as Read
Mark a notification as read by setting the read_at timestamp.
PATCH
https://api.pathwayful.com/notifications/:id
Headers
-
AuthorizationREQUIRED STRINGBearer $TOKEN
Response body
{
"id": "uuid",
"html": "<p>Your issue <strong>Dark mode</strong> was moved to <strong>In Progress</strong></p>",
"txt": "Your issue Dark mode was moved to In Progress",
"read_at": "2024-01-15T12:00:00Z",
"created_at": "2024-01-15T10:30:00Z"
}
Code Examples
curl -X PATCH "https://api.pathwayful.com/notifications/your-notification-id" \
-H "Authorization: Bearer $TOKEN"
// Mark a notification as read
const notificationId = 'your-notification-id';
const response = await fetch(`https://api.pathwayful.com/notifications/${notificationId}`, {
method: 'PATCH',
headers: {
'Authorization': 'Bearer ' + yourToken
}
});
const notification = await response.json();
console.log('Marked as read:', notification);
# Mark a notification as read
import requests
notification_id = 'your-notification-id'
headers = {
'Authorization': f'Bearer {your_token}'
}
response = requests.patch(
f'https://api.pathwayful.com/notifications/{notification_id}',
headers=headers
)
notification = response.json()
print(f"Marked as read: {notification}")
// Mark a notification as read
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
notificationID := "your-notification-id"
req, _ := http.NewRequest("PATCH", "https://api.pathwayful.com/notifications/"+notificationID, nil)
req.Header.Set("Authorization", "Bearer "+yourToken)
client := &http.Client{}
resp, err := client.Do(req)
if err != nil {
panic(err)
}
defer resp.Body.Close()
var notification map[string]interface{}
json.NewDecoder(resp.Body).Decode(¬ification)
fmt.Printf("Marked as read: %v\n", notification)
}
# Mark a notification as read
require 'net/http'
require 'json'
require 'uri'
notification_id = 'your-notification-id'
uri = URI("https://api.pathwayful.com/notifications/#{notification_id}")
http = Net::HTTP.new(uri.host, uri.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(uri)
request['Authorization'] = "Bearer #{your_token}"
response = http.request(request)
notification = JSON.parse(response.body)
puts "Marked as read: #{notification}"
<?php
// Mark a notification as read
$notificationId = 'your-notification-id';
$ch = curl_init("https://api.pathwayful.com/notifications/{$notificationId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'PATCH');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $yourToken
]);
$response = curl_exec($ch);
curl_close($ch);
$notification = json_decode($response, true);
print_r($notification);