Skip to content

Notifications

Manage your in-app notification feed and configure delivery preferences per event category.

List Notifications

http
GET /v1/notifications

Returns a paginated list of notifications for the authenticated tenant, ordered by most recent first.

Query Parameters

ParameterTypeRequiredDefaultDescription
limitintegerNo50Max records to return
offsetintegerNo0Records to skip
unread_onlybooleanNofalseWhen true, returns only unread notifications

Example Request

bash
curl "https://api.rymi.live/v1/notifications?limit=20&unread_only=true" \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "data": [
    {
      "id": "notif_abc123",
      "tenant_id": "550e8400-...",
      "event_category": "billing.low_balance",
      "title": "Low Balance Warning",
      "message": "Your account balance is below $5.00. Top up to avoid call interruptions.",
      "is_read": false,
      "metadata": {
        "balance_usd": 4.20
      },
      "created_at": "2026-04-01T14:30:00Z"
    }
  ],
  "total": 1,
  "offset": 0,
  "limit": 20
}

Errors

StatusMeaning
401Missing or invalid API key

Mark All as Read

http
PUT /v1/notifications/read-all

Marks all unread notifications as read for the authenticated tenant. No request body required.

Example Request

bash
curl -X PUT https://api.rymi.live/v1/notifications/read-all \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "success": true
}

Errors

StatusMeaning
401Missing or invalid API key

Mark Notification as Read

http
PUT /v1/notifications/:id/read

Marks a single notification as read.

Path Parameters

ParameterTypeDescription
idstringNotification ID

Example Request

bash
curl -X PUT https://api.rymi.live/v1/notifications/notif_abc123/read \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "success": true
}

Errors

StatusMeaning
401Missing or invalid API key
404Notification not found for this tenant

Get Notification Preferences

http
GET /v1/notifications/preferences

Returns delivery preferences for each event category. Preferences control which channels (email, SMS, in-app, webhook) receive notifications.

Example Request

bash
curl https://api.rymi.live/v1/notifications/preferences \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "data": [
    {
      "event_category": "billing.low_balance",
      "email_enabled": true,
      "sms_enabled": false,
      "in_app_enabled": true,
      "webhook_enabled": false
    },
    {
      "event_category": "call.failed",
      "email_enabled": true,
      "sms_enabled": false,
      "in_app_enabled": true,
      "webhook_enabled": true
    }
  ]
}

Errors

StatusMeaning
401Missing or invalid API key

Update Notification Preference

http
PUT /v1/notifications/preferences

Update delivery channels for a specific event category. Creates the preference if it doesn't exist.

Request Body

FieldTypeRequiredDefaultDescription
event_categorystringYesEvent category to configure (e.g., billing.low_balance, call.failed)
email_enabledbooleanNoUnchangedEnable or disable email delivery
sms_enabledbooleanNoUnchangedEnable or disable SMS delivery
in_app_enabledbooleanNoUnchangedEnable or disable in-app notification
webhook_enabledbooleanNoUnchangedEnable or disable webhook delivery

Example Request

bash
curl -X PUT https://api.rymi.live/v1/notifications/preferences \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "event_category": "billing.low_balance",
    "email_enabled": true,
    "sms_enabled": true,
    "in_app_enabled": true,
    "webhook_enabled": false
  }'

Response 200

json
{
  "data": {
    "event_category": "billing.low_balance",
    "email_enabled": true,
    "sms_enabled": true,
    "in_app_enabled": true,
    "webhook_enabled": false
  }
}

Errors

StatusMeaning
400Missing event_category
401Missing or invalid API key

Send Test Notification

http
POST /v1/notifications/test

Triggers a test notification to verify your notification delivery pipeline. Useful for testing preference channels. No request body required.

Example Request

bash
curl -X POST https://api.rymi.live/v1/notifications/test \
  -H "Authorization: Bearer YOUR_API_KEY"

Response 200

json
{
  "success": true,
  "jobId": "job_notif_123"
}

Errors

StatusMeaning
401Missing or invalid API key
500Notification service not configured