Notifications API
Manage notification preferences and delivery channels for workflow completions, errors, and system events.
Get Notification Settings
GET /api/v1/notifications/settings
x-api-key: YOUR_API_KEYResponse:
{
"success": true,
"data": {
"email": {
"enabled": true,
"address": "[email protected]"
},
"webhook": {
"enabled": false,
"url": null
},
"events": {
"workflow_complete": true,
"workflow_failed": true,
"credits_low": true,
"api_key_created": false
}
}
}Update Notification Settings
PUT /api/v1/notifications/settings
Content-Type: application/json
x-api-key: YOUR_API_KEY
{
"email": {
"enabled": true,
"address": "[email protected]"
},
"webhook": {
"enabled": true,
"url": "https://your-server.com/notifications"
},
"events": {
"workflow_complete": true,
"workflow_failed": true,
"credits_low": true,
"api_key_created": true
}
}Notification Events
| Event | Description |
|---|---|
workflow_complete | Workflow run completed successfully |
workflow_failed | Workflow run failed |
credits_low | Credits balance below threshold |
api_key_created | New API key was created |
List Notifications
GET /api/v1/notifications?page=1&limit=50
x-api-key: YOUR_API_KEYMark as Read
POST /api/v1/notifications/:id/read
x-api-key: YOUR_API_KEYWebhook Payload
When webhook delivery is enabled, notifications are sent as POST requests:
{
"event": "workflow_complete",
"timestamp": "2025-01-20T15:30:00Z",
"data": {
"workflowId": "wf_abc123",
"runId": "run_xyz789",
"status": "completed",
"duration": 45000
}
}