API Documentation
Dashboard

Alerts

Create keyword alerts to get notified when specific terms appear in new posts.

GET/api/v1/workspaces/{workspace_id}/alerts

List Alerts

Get all keyword alerts configured for the workspace.

Path Parameters

NameTypeRequiredDescription
workspace_iduuidRequiredWorkspace ID

Code Examples

bash
curl https://api.sentrasa.com/api/v1/workspaces/{workspace_id}/alerts \
  -H "X-API-Key: rp_your_api_key"

Response

200List of alerts
json
[
  {
    "id": "alert_550e8400-e29b-41d4-a716-446655440000",
    "name": "AI News Alert",
    "keywords": [
      "artificial intelligence",
      "machine learning"
    ],
    "subreddits": [
      "technology",
      "MachineLearning"
    ],
    "channel": "email",
    "channel_config": {},
    "is_active": true,
    "last_triggered_at": "2026-03-20T10:00:00Z",
    "trigger_count": 12,
    "created_at": "2026-03-01T09:00:00Z"
  }
]
POST/api/v1/workspaces/{workspace_id}/alerts

Create Alert

Create a new keyword alert. Notifications are sent via the specified channel when matching posts are found.

Path Parameters

NameTypeRequiredDescription
workspace_iduuidRequiredWorkspace ID

Request Body

NameTypeRequiredDescription
namestringRequiredAlert name (1-255 chars)
keywordsstring[]RequiredKeywords to monitor
subredditsstring[]OptionalLimit to specific subreddits
channelstringDefault: emailemail, discord, telegram, or webhook
channel_configobjectOptionalChannel-specific config (e.g. webhook URL)
json
{
  "name": "AI News Alert",
  "keywords": [
    "artificial intelligence",
    "GPT"
  ],
  "subreddits": [
    "technology"
  ],
  "channel": "discord",
  "channel_config": {
    "webhook_url": "https://discord.com/api/webhooks/..."
  }
}

Code Examples

bash
curl -X POST https://api.sentrasa.com/api/v1/workspaces/{workspace_id}/alerts \
  -H "Authorization: Bearer YOUR_TOKEN" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "AI News Alert",
    "keywords": ["artificial intelligence", "GPT"],
    "subreddits": ["technology"],
    "channel": "discord",
    "channel_config": {"webhook_url": "https://discord.com/api/webhooks/..."}
  }'

Response

201Alert created
json
{
  "id": "alert_661e9400-f39c-52e5-b827-557766551111",
  "name": "AI News Alert",
  "keywords": [
    "artificial intelligence",
    "GPT"
  ],
  "subreddits": [
    "technology"
  ],
  "channel": "discord",
  "channel_config": {
    "webhook_url": "https://discord.com/api/webhooks/..."
  },
  "is_active": true,
  "last_triggered_at": null,
  "trigger_count": 0,
  "created_at": "2026-03-20T14:00:00Z"
}
DELETE/api/v1/workspaces/{workspace_id}/alerts/{alert_id}

Delete Alert

Delete a keyword alert.

Path Parameters

NameTypeRequiredDescription
workspace_iduuidRequiredWorkspace ID
alert_iduuidRequiredAlert ID

Code Examples

bash
curl -X DELETE https://api.sentrasa.com/api/v1/workspaces/{workspace_id}/alerts/{alert_id} \
  -H "X-API-Key: rp_your_api_key"

Response

200Alert deleted
json
{
  "message": "Alert deleted successfully"
}