Alerts
Create keyword alerts to get notified when specific terms appear in new posts.
GET
/api/v1/workspaces/{workspace_id}/alertsList Alerts
Get all keyword alerts configured for the workspace.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workspace_id | uuid | Required | Workspace 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 alertsjson
[
{
"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}/alertsCreate Alert
Create a new keyword alert. Notifications are sent via the specified channel when matching posts are found.
Path Parameters
| Name | Type | Required | Description |
|---|---|---|---|
| workspace_id | uuid | Required | Workspace ID |
Request Body
| Name | Type | Required | Description |
|---|---|---|---|
| name | string | Required | Alert name (1-255 chars) |
| keywords | string[] | Required | Keywords to monitor |
| subreddits | string[] | Optional | Limit to specific subreddits |
| channel | string | Default: email | email, discord, telegram, or webhook |
| channel_config | object | Optional | Channel-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 createdjson
{
"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
| Name | Type | Required | Description |
|---|---|---|---|
| workspace_id | uuid | Required | Workspace ID |
| alert_id | uuid | Required | Alert 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 deletedjson
{
"message": "Alert deleted successfully"
}