curl --request PATCH \
--url https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"retriever_id": "<string>",
"system_condition": {
"params": {
"stall_minutes": 30
}
},
"namespace_selector": {
"mode": "all",
"namespace_ids": [
"ns_production",
"ns_staging"
]
},
"notification_config": {
"channels": [
{
"channel_id": "wh_safety_team",
"channel_type": "webhook"
},
{
"channel_id": "sl_alerts",
"channel_type": "slack"
}
],
"include_matches": true,
"include_scores": true
},
"enabled": true,
"metadata": {}
}
'import requests
url = "https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}"
payload = {
"name": "<string>",
"description": "<string>",
"retriever_id": "<string>",
"system_condition": { "params": { "stall_minutes": 30 } },
"namespace_selector": {
"mode": "all",
"namespace_ids": ["ns_production", "ns_staging"]
},
"notification_config": {
"channels": [
{
"channel_id": "wh_safety_team",
"channel_type": "webhook"
},
{
"channel_id": "sl_alerts",
"channel_type": "slack"
}
],
"include_matches": True,
"include_scores": True
},
"enabled": True,
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
retriever_id: '<string>',
system_condition: {params: {stall_minutes: 30}},
namespace_selector: {mode: 'all', namespace_ids: ['ns_production', 'ns_staging']},
notification_config: {
channels: [
{channel_id: 'wh_safety_team', channel_type: 'webhook'},
{channel_id: 'sl_alerts', channel_type: 'slack'}
],
include_matches: true,
include_scores: true
},
enabled: true,
metadata: {}
})
};
fetch('https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'retriever_id' => '<string>',
'system_condition' => [
'params' => [
'stall_minutes' => 30
]
],
'namespace_selector' => [
'mode' => 'all',
'namespace_ids' => [
'ns_production',
'ns_staging'
]
],
'notification_config' => [
'channels' => [
[
'channel_id' => 'wh_safety_team',
'channel_type' => 'webhook'
],
[
'channel_id' => 'sl_alerts',
'channel_type' => 'slack'
]
],
'include_matches' => true,
'include_scores' => true
],
'enabled' => true,
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"retriever_id\": \"<string>\",\n \"system_condition\": {\n \"params\": {\n \"stall_minutes\": 30\n }\n },\n \"namespace_selector\": {\n \"mode\": \"all\",\n \"namespace_ids\": [\n \"ns_production\",\n \"ns_staging\"\n ]\n },\n \"notification_config\": {\n \"channels\": [\n {\n \"channel_id\": \"wh_safety_team\",\n \"channel_type\": \"webhook\"\n },\n {\n \"channel_id\": \"sl_alerts\",\n \"channel_type\": \"slack\"\n }\n ],\n \"include_matches\": true,\n \"include_scores\": true\n },\n \"enabled\": true,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"retriever_id\": \"<string>\",\n \"system_condition\": {\n \"params\": {\n \"stall_minutes\": 30\n }\n },\n \"namespace_selector\": {\n \"mode\": \"all\",\n \"namespace_ids\": [\n \"ns_production\",\n \"ns_staging\"\n ]\n },\n \"notification_config\": {\n \"channels\": [\n {\n \"channel_id\": \"wh_safety_team\",\n \"channel_type\": \"webhook\"\n },\n {\n \"channel_id\": \"sl_alerts\",\n \"channel_type\": \"slack\"\n }\n ],\n \"include_matches\": true,\n \"include_scores\": true\n },\n \"enabled\": true,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"retriever_id\": \"<string>\",\n \"system_condition\": {\n \"params\": {\n \"stall_minutes\": 30\n }\n },\n \"namespace_selector\": {\n \"mode\": \"all\",\n \"namespace_ids\": [\n \"ns_production\",\n \"ns_staging\"\n ]\n },\n \"notification_config\": {\n \"channels\": [\n {\n \"channel_id\": \"wh_safety_team\",\n \"channel_type\": \"webhook\"\n },\n {\n \"channel_id\": \"sl_alerts\",\n \"channel_type\": \"slack\"\n }\n ],\n \"include_matches\": true,\n \"include_scores\": true\n },\n \"enabled\": true,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"alert_id": "alt_safety_001",
"description": "Alerts when new videos match known safety incidents",
"enabled": true,
"name": "Safety Incident Detector",
"notification_config": {
"channels": [
{
"channel_id": "wh_safety_team",
"channel_type": "webhook"
}
],
"include_matches": true,
"include_scores": true
},
"retriever_id": "ret_safety_search"
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}Update Org-Scoped Alert
Partially update an org-scoped alert (e.g. enable/disable, channels).
curl --request PATCH \
--url https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"name": "<string>",
"description": "<string>",
"retriever_id": "<string>",
"system_condition": {
"params": {
"stall_minutes": 30
}
},
"namespace_selector": {
"mode": "all",
"namespace_ids": [
"ns_production",
"ns_staging"
]
},
"notification_config": {
"channels": [
{
"channel_id": "wh_safety_team",
"channel_type": "webhook"
},
{
"channel_id": "sl_alerts",
"channel_type": "slack"
}
],
"include_matches": true,
"include_scores": true
},
"enabled": true,
"metadata": {}
}
'import requests
url = "https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}"
payload = {
"name": "<string>",
"description": "<string>",
"retriever_id": "<string>",
"system_condition": { "params": { "stall_minutes": 30 } },
"namespace_selector": {
"mode": "all",
"namespace_ids": ["ns_production", "ns_staging"]
},
"notification_config": {
"channels": [
{
"channel_id": "wh_safety_team",
"channel_type": "webhook"
},
{
"channel_id": "sl_alerts",
"channel_type": "slack"
}
],
"include_matches": True,
"include_scores": True
},
"enabled": True,
"metadata": {}
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: '<string>',
description: '<string>',
retriever_id: '<string>',
system_condition: {params: {stall_minutes: 30}},
namespace_selector: {mode: 'all', namespace_ids: ['ns_production', 'ns_staging']},
notification_config: {
channels: [
{channel_id: 'wh_safety_team', channel_type: 'webhook'},
{channel_id: 'sl_alerts', channel_type: 'slack'}
],
include_matches: true,
include_scores: true
},
enabled: true,
metadata: {}
})
};
fetch('https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'name' => '<string>',
'description' => '<string>',
'retriever_id' => '<string>',
'system_condition' => [
'params' => [
'stall_minutes' => 30
]
],
'namespace_selector' => [
'mode' => 'all',
'namespace_ids' => [
'ns_production',
'ns_staging'
]
],
'notification_config' => [
'channels' => [
[
'channel_id' => 'wh_safety_team',
'channel_type' => 'webhook'
],
[
'channel_id' => 'sl_alerts',
'channel_type' => 'slack'
]
],
'include_matches' => true,
'include_scores' => true
],
'enabled' => true,
'metadata' => [
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}"
payload := strings.NewReader("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"retriever_id\": \"<string>\",\n \"system_condition\": {\n \"params\": {\n \"stall_minutes\": 30\n }\n },\n \"namespace_selector\": {\n \"mode\": \"all\",\n \"namespace_ids\": [\n \"ns_production\",\n \"ns_staging\"\n ]\n },\n \"notification_config\": {\n \"channels\": [\n {\n \"channel_id\": \"wh_safety_team\",\n \"channel_type\": \"webhook\"\n },\n {\n \"channel_id\": \"sl_alerts\",\n \"channel_type\": \"slack\"\n }\n ],\n \"include_matches\": true,\n \"include_scores\": true\n },\n \"enabled\": true,\n \"metadata\": {}\n}")
req, _ := http.NewRequest("PATCH", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.patch("https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"retriever_id\": \"<string>\",\n \"system_condition\": {\n \"params\": {\n \"stall_minutes\": 30\n }\n },\n \"namespace_selector\": {\n \"mode\": \"all\",\n \"namespace_ids\": [\n \"ns_production\",\n \"ns_staging\"\n ]\n },\n \"notification_config\": {\n \"channels\": [\n {\n \"channel_id\": \"wh_safety_team\",\n \"channel_type\": \"webhook\"\n },\n {\n \"channel_id\": \"sl_alerts\",\n \"channel_type\": \"slack\"\n }\n ],\n \"include_matches\": true,\n \"include_scores\": true\n },\n \"enabled\": true,\n \"metadata\": {}\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.mixpeek.com/v1/organizations/alerts/{alert_identifier}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"<string>\",\n \"description\": \"<string>\",\n \"retriever_id\": \"<string>\",\n \"system_condition\": {\n \"params\": {\n \"stall_minutes\": 30\n }\n },\n \"namespace_selector\": {\n \"mode\": \"all\",\n \"namespace_ids\": [\n \"ns_production\",\n \"ns_staging\"\n ]\n },\n \"notification_config\": {\n \"channels\": [\n {\n \"channel_id\": \"wh_safety_team\",\n \"channel_type\": \"webhook\"\n },\n {\n \"channel_id\": \"sl_alerts\",\n \"channel_type\": \"slack\"\n }\n ],\n \"include_matches\": true,\n \"include_scores\": true\n },\n \"enabled\": true,\n \"metadata\": {}\n}"
response = http.request(request)
puts response.read_body{
"alert_id": "alt_safety_001",
"description": "Alerts when new videos match known safety incidents",
"enabled": true,
"name": "Safety Incident Detector",
"notification_config": {
"channels": [
{
"channel_id": "wh_safety_team",
"channel_type": "webhook"
}
],
"include_matches": true,
"include_scores": true
},
"retriever_id": "ret_safety_search"
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"input": "<unknown>",
"ctx": {}
}
]
}{
"error": {
"details": {
"id": "ns_123",
"resource": "namespace"
},
"message": "Namespace not found",
"type": "NotFoundError"
},
"status": 404,
"success": false
}Authorizations
Mixpeek API key, sent as Authorization: Bearer mxp_sk_.... Create one in Studio under Settings → API Keys, or with an admin key via POST /v1/organizations/users/{user_email}/api-keys. A missing header returns 403; an invalid or revoked key returns 401.
Path Parameters
Alert ID (alt_...) or name
Body
Request model to update an alert.
All fields are optional - provide only what you want to update. Core fields (retriever_id, notification_config) can be updated since alerts don't have join history like taxonomies.
Updated name for the alert
1 - 200Updated description for the alert
1000Updated retriever ID (source=retriever only)
Updated trigger condition: 'results' or 'no_results'
results, no_results Updated system condition (source=system only)
Show child attributes
Show child attributes
Updated org-level namespace scoping
Show child attributes
Show child attributes
Updated notification configuration
Show child attributes
Show child attributes
{
"channels": [
{
"channel_id": "wh_safety_team",
"channel_type": "webhook"
},
{
"channel_id": "sl_alerts",
"channel_type": "slack"
}
],
"include_matches": true,
"include_scores": true
}
Updated enabled status
Updated metadata
Response
Successful Response
Response model for a single alert.
Human-readable name for the alert
1 - 200"Safety Incident Detector"
"Prohibited Content Alert"
How and where to send notifications when alert triggers
Show child attributes
Show child attributes
{
"channels": [
{
"channel_id": "wh_safety_team",
"channel_type": "webhook"
},
{
"channel_id": "sl_alerts",
"channel_type": "slack"
}
],
"include_matches": true,
"include_scores": true
}
Unique identifier for the alert
"alt_abc123xyz789"
Namespace this alert belongs to
"ns_production"
Optional description of what this alert monitors
1000"Alerts when new videos match known safety incidents"
Trigger source: 'retriever' (runs a retriever) or 'system' (built-in metric)
retriever, system ID of the retriever to execute (source=retriever only). The retriever defines filters, scoring, limits.
"ret_safety_search"
For source=retriever: fire on 'results' (matches found) or 'no_results' (retriever went dark).
results, no_results Built-in data-plane condition to watch (source=system only)
Show child attributes
Show child attributes
Org-level namespace scoping (all vs selected). When omitted, the alert is scoped to its own namespace_id.
Show child attributes
Show child attributes
Whether the alert is active and will execute
Timestamp when the alert was created
Timestamp when the alert was last updated
Additional user-defined metadata for the alert
Was this page helpful?

