Skip to main content
POST
/
v1
/
alerts
/
list
List Alerts
curl --request POST \
  --url https://api.mixpeek.com/v1/alerts/list \
  --header 'Content-Type: application/json' \
  --data '
{
  "search": "<string>",
  "filters": {
    "AND": [
      {
        "field": "name",
        "operator": "eq",
        "value": "John"
      },
      {
        "field": "age",
        "operator": "gte",
        "value": 30
      }
    ],
    "OR": [
      {
        "field": "status",
        "operator": "eq",
        "value": "active"
      },
      {
        "field": "role",
        "operator": "eq",
        "value": "admin"
      }
    ],
    "NOT": [
      {
        "field": "department",
        "operator": "eq",
        "value": "HR"
      },
      {
        "field": "location",
        "operator": "eq",
        "value": "remote"
      }
    ],
    "case_sensitive": true
  },
  "sort": {
    "field": "created_at",
    "direction": "desc"
  },
  "case_sensitive": false
}
'
{
  "results": [
    {
      "name": "<string>",
      "retriever_id": "<string>",
      "notification_config": {
        "channels": [
          {
            "channel_type": "<string>",
            "channel_id": "wh_safety_team",
            "config": {
              "url": "https://example.com/webhook"
            }
          }
        ],
        "include_matches": true,
        "include_scores": true,
        "template_id": "<string>"
      },
      "alert_id": "<string>",
      "namespace_id": "ns_production",
      "description": "Alerts when new videos match known safety incidents",
      "enabled": true,
      "created_at": "2023-11-07T05:31:56Z",
      "updated_at": "2023-11-07T05:31:56Z",
      "metadata": {}
    }
  ],
  "pagination": {},
  "total_count": 123,
  "stats": {
    "total_alerts": 0,
    "enabled_alerts": 0,
    "disabled_alerts": 0,
    "alerts_by_channel_type": {}
  }
}

Headers

Authorization
string

REQUIRED: Bearer token authentication using your API key. Format: 'Bearer sk_xxxxxxxxxxxxx'. You can create API keys in the Mixpeek dashboard under Organization Settings.

Examples:

"Bearer YOUR_API_KEY"

"Bearer YOUR_STRIPE_API_KEY"

X-Namespace
string

REQUIRED: Namespace identifier for scoping this request. All resources (collections, buckets, taxonomies, etc.) are scoped to a namespace. You can provide either the namespace name or namespace ID. Format: ns_xxxxxxxxxxxxx (ID) or a custom name like 'my-namespace'

Examples:

"ns_abc123def456"

"production"

"my-namespace"

Query Parameters

limit
integer | null
Required range: 1 <= x <= 1000
offset
integer | null
Required range: 0 <= x <= 10000
cursor
string | null
include_total
boolean
default:false

Body

application/json

Request model to list alerts.

search
string | null

Search term for wildcard search across alert_id, name, description

filters
LogicalOperator · object

Filters to apply to the alert list

sort
SortOption · object

Sort configuration for the alert list

case_sensitive
boolean
default:false

If True, filters and search will be case-sensitive

Response

Successful Response

Response model for listing alerts.

results
AlertResponse · object[]
required

List of alerts

pagination
Pagination · object
required

Pagination information

total_count
integer
required

Total number of alerts matching query

stats
AlertListStats · object

Aggregate statistics across all alerts in the result