Dashboard

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_KEY

Response:

{
  "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

EventDescription
workflow_completeWorkflow run completed successfully
workflow_failedWorkflow run failed
credits_lowCredits balance below threshold
api_key_createdNew API key was created

List Notifications

GET /api/v1/notifications?page=1&limit=50
x-api-key: YOUR_API_KEY

Mark as Read

POST /api/v1/notifications/:id/read
x-api-key: YOUR_API_KEY

Webhook 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
  }
}