Skip to content

Notifications API

View notification send history and per-task notification filtering.

Overview

Torale has two notification-related endpoints:

  1. GET /api/v1/notifications/sends - Global notification send history (email/webhook delivery records)
  2. GET /api/v1/tasks/{task_id}/notifications - Task-scoped: executions where condition was met

Endpoints

Notification Send History

View the delivery history of email and webhook notifications across all your tasks. This tracks actual send attempts, not just condition matches.

Endpoint: GET /api/v1/notifications/sends

Headers:

Authorization: Bearer {api_key}

Query parameters:

ParameterTypeDescription
notification_typestringFilter by email or webhook
task_idstringFilter by specific task UUID
limitintegerMax results (default: 50)
offsetintegerPagination offset (default: 0)

Response: 200 OK

json
{
  "sends": [
    {
      "id": "880e8400-e29b-41d4-a716-446655440000",
      "user_id": "550e8400-e29b-41d4-a716-446655440000",
      "task_id": "660e8400-e29b-41d4-a716-446655440000",
      "execution_id": "770e8400-e29b-41d4-a716-446655440000",
      "recipient": "[email protected]",
      "notification_type": "email",
      "status": "sent",
      "error_message": null,
      "created_at": "2025-01-15T09:00:10Z"
    }
  ],
  "total": 42
}

Examples:

bash
# Get all notification sends
curl -X GET https://api.torale.ai/api/v1/notifications/sends \
  -H "Authorization: Bearer sk_..."

# Filter by type
curl -X GET "https://api.torale.ai/api/v1/notifications/sends?notification_type=webhook" \
  -H "Authorization: Bearer sk_..."

# Filter by task
curl -X GET "https://api.torale.ai/api/v1/notifications/sends?task_id=660e8400..." \
  -H "Authorization: Bearer sk_..."

# Paginate
curl -X GET "https://api.torale.ai/api/v1/notifications/sends?limit=10&offset=20" \
  -H "Authorization: Bearer sk_..."

Notification Send Object

FieldTypeDescription
idUUIDSend record ID
user_idUUIDTask owner
task_idUUIDAssociated task
execution_idUUIDExecution that triggered the send
recipientstringEmail address (for email type)
notification_typestringemail or webhook
statusstringDelivery status
error_messagestring/nullError if delivery failed
created_attimestampWhen the send was attempted

Task-Scoped Notifications

Get executions where the condition was met for a specific task. This is a filtered view of the Executions API.

Endpoint: GET /api/v1/tasks/{task_id}/notifications

See Executions API - Task-Scoped Notifications for details.

Difference Between Endpoints

Feature/notifications/sends/tasks/{id}/notifications
ScopeAll tasksSingle task
What it tracksEmail/webhook delivery attemptsExecutions where condition was met
Response typeSend records with delivery statusExecution objects with results
Use caseAudit notification deliveryView what triggered alerts

Next Steps

Released under the MIT License.