Notifications API
The Notifications API allows you to create and manage search term notifications. Get notified via webhooks or email when new podcast transcriptions match your specified search terms.
Create Notification ¶
Create a new notification for a search term.
bash
POST
/api/notifications
$
curl -X POST "https://api.audioscrape.com/api/notifications" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{
"search_term": "artificial intelligence",
"webhook_url": "https://your-webhook.com/endpoint",
"email_recipient": "[email protected]"
}'
Response:
{
"id": 123,
"search_term": "artificial intelligence",
"webhook_url": "https://your-webhook.com/endpoint",
"email_recipient": "[email protected]",
"created_at": "2024-01-15T10:00:00Z",
"delivery_stats": {
"total_deliveries": 0,
"successful_deliveries": 0,
"failed_deliveries": 0,
"last_delivery": null
}
}
Parameters
Parameter | Type | Description |
---|---|---|
search_term | string | The term to search for in new transcriptions |
webhook_url | string | Optional URL to receive webhook notifications |
email_recipient | string | Optional email address to receive notifications |
List Notifications ¶
Retrieve all notifications for the authenticated user.
bash
GET
/api/notifications
$
curl "https://api.audioscrape.com/api/notifications" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
[
{
"id": 123,
"search_term": "artificial intelligence",
"webhook_url": "https://your-webhook.com/endpoint",
"email_recipient": "[email protected]",
"created_at": "2024-01-15T10:00:00Z",
"delivery_stats": {
"total_deliveries": 5,
"successful_deliveries": 4,
"failed_deliveries": 1,
"last_delivery": "2024-01-16T15:30:00Z"
}
}
]
Delete Notification ¶
Delete a specific notification.
bash
DELETE
/api/notifications/:id
$
curl -X DELETE "https://api.audioscrape.com/api/notifications/123" \
-H "Authorization: Bearer YOUR_API_KEY"
Response:
204 No Content
Delivery Statistics ¶
The delivery_stats object provides information about notification deliveries:
Field | Type | Description |
---|---|---|
total_deliveries | integer | Total number of delivery attempts |
successful_deliveries | integer | Number of successful deliveries |
failed_deliveries | integer | Number of failed deliveries |
last_delivery | string | Timestamp of the most recent delivery attempt |