API Documentation
The Pathwayful API is easy to use and free for all plans.
Delete Notification
Soft delete a notification.
DELETE
https://api.pathwayful.com/notifications/:id
Headers
-
AuthorizationREQUIRED STRINGBearer $TOKEN
Response body
{
"success": true
}
Code Examples
curl -X DELETE "https://api.pathwayful.com/notifications/your-notification-id" \
-H "Authorization: Bearer $TOKEN"
// Delete a notification
const notificationId = 'your-notification-id';
const response = await fetch(`https://api.pathwayful.com/notifications/${notificationId}`, {
method: 'DELETE',
headers: {
'Authorization': 'Bearer ' + yourToken
}
});
const result = await response.json();
console.log('Deleted:', result.success);
# Delete a notification
import requests
notification_id = 'your-notification-id'
headers = {
'Authorization': f'Bearer {your_token}'
}
response = requests.delete(
f'https://api.pathwayful.com/notifications/{notification_id}',
headers=headers
)
result = response.json()
print(f"Deleted: {result['success']}")
// Delete a notification
package main
import (
"encoding/json"
"fmt"
"net/http"
)
func main() {
notificationID := "your-notification-id"
req, _ := http.NewRequest("DELETE", "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 result map[string]interface{}
json.NewDecoder(resp.Body).Decode(&result)
fmt.Printf("Deleted: %v\n", result["success"])
}
# Delete a notification
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::Delete.new(uri)
request['Authorization'] = "Bearer #{your_token}"
response = http.request(request)
result = JSON.parse(response.body)
puts "Deleted: #{result['success']}"
<?php
// Delete a notification
$notificationId = 'your-notification-id';
$ch = curl_init("https://api.pathwayful.com/notifications/{$notificationId}");
curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'DELETE');
curl_setopt($ch, CURLOPT_HTTPHEADER, [
'Authorization: Bearer ' . $yourToken
]);
$response = curl_exec($ch);
curl_close($ch);
$result = json_decode($response, true);
echo "Deleted: " . ($result['success'] ? 'true' : 'false');