curl --request POST \
--url http://localhost:3500/v1/alert-topics/{id}/alerts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alert_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"filter": {
"mine": true,
"team_ids": [
"<string>"
],
"claim_ids": [
"<string>"
],
"has_claim": true,
"claim_statuses": [],
"invoice_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_invoice_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"agreement_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_agreement_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"supplier_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_supplier_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"recipient_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_recipient_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tag_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"topic_ids": [
"<string>"
],
"excluded_topic_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"has_topic": true,
"statuses": [],
"confidence_levels": [],
"currency_codes": [
"<string>"
],
"correction_types": [],
"impact_min": "<string>",
"impact_max": "<string>",
"issued_from": "<string>",
"issued_through": "<string>",
"created_from": "<string>",
"created_through": "<string>",
"search": "<string>"
},
"excluded_alert_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alert_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
filter: {
mine: true,
team_ids: ['<string>'],
claim_ids: ['<string>'],
has_claim: true,
claim_statuses: [],
invoice_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_invoice_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
agreement_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_agreement_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
supplier_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_supplier_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
recipient_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_recipient_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tag_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
topic_ids: ['<string>'],
excluded_topic_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
has_topic: true,
statuses: [],
confidence_levels: [],
currency_codes: ['<string>'],
correction_types: [],
impact_min: '<string>',
impact_max: '<string>',
issued_from: '<string>',
issued_through: '<string>',
created_from: '<string>',
created_through: '<string>',
search: '<string>'
},
excluded_alert_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('http://localhost:3500/v1/alert-topics/{id}/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/alert-topics/{id}/alerts"
payload = {
"alert_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"filter": {
"mine": True,
"team_ids": ["<string>"],
"claim_ids": ["<string>"],
"has_claim": True,
"claim_statuses": [],
"invoice_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_invoice_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"agreement_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_agreement_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"supplier_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_supplier_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"recipient_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_recipient_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tag_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"topic_ids": ["<string>"],
"excluded_topic_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"has_topic": True,
"statuses": [],
"confidence_levels": [],
"currency_codes": ["<string>"],
"correction_types": [],
"impact_min": "<string>",
"impact_max": "<string>",
"issued_from": "<string>",
"issued_through": "<string>",
"created_from": "<string>",
"created_through": "<string>",
"search": "<string>"
},
"excluded_alert_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"changed_count": 123,
"skipped_count": 123
}{
"error": {
"code": "validation_error",
"message": "Invalid request format, parameters, or body. Details contain up to 20 actionable field errors; the complete encoded request body must be at most 2 MiB (2,097,152 bytes).",
"request_id": "req_example"
}
}{
"error": {
"code": "invalid_token",
"message": "Missing or invalid bearer credential.",
"request_id": "req_example"
}
}{
"error": {
"code": "forbidden",
"message": "Access denied: forbidden, token_disabled, organization_required, insufficient_role, or mfa_required. Check the error code and effective permissions.",
"request_id": "req_example"
}
}{
"error": {
"code": "not_found",
"message": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}{
"error": {
"code": "conflict",
"message": "The filter selects too many alerts, topic membership changed while the command ran, or a selected team has invalid saved rules. Nothing changed.",
"request_id": "req_example"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The IP or authenticated credential exceeded its request limit.",
"request_id": "req_example"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected server failure. Include the request ID when contacting support.",
"request_id": "req_example"
}
}{
"error": {
"code": "service_unavailable",
"message": "Authentication infrastructure is unavailable or rate limited. Honor Retry-After when provided.",
"request_id": "req_example"
}
}Move alerts into a topic
Puts the selected alerts in this topic, moving them out of any other topic. An alert has at most one topic; emptied topics are kept. Alerts already in this topic are left alone. Topic locks do not restrict membership. With alert_ids, an alert outside the topic agreement returns 404. A filter covers alerts in the topic agreement; use topic_ids to move a whole topic, or topic_ids=[“null”] (has_topic=false) for uncategorized alerts. Select alerts with alert_ids or with filter. The command is one transaction and changes at most 5000 alerts; a filter that would change more returns 409 and changes nothing. Matching alerts already in the requested state, or left alone, do not count toward the limit, so a retry is safe.
curl --request POST \
--url http://localhost:3500/v1/alert-topics/{id}/alerts \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"alert_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"filter": {
"mine": true,
"team_ids": [
"<string>"
],
"claim_ids": [
"<string>"
],
"has_claim": true,
"claim_statuses": [],
"invoice_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_invoice_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"agreement_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_agreement_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"supplier_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_supplier_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"recipient_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"excluded_recipient_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"tag_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"topic_ids": [
"<string>"
],
"excluded_topic_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
],
"has_topic": true,
"statuses": [],
"confidence_levels": [],
"currency_codes": [
"<string>"
],
"correction_types": [],
"impact_min": "<string>",
"impact_max": "<string>",
"issued_from": "<string>",
"issued_through": "<string>",
"created_from": "<string>",
"created_through": "<string>",
"search": "<string>"
},
"excluded_alert_ids": [
"3c90c3cc-0d44-4b50-8888-8dd25736052a"
]
}
'const options = {
method: 'POST',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({
alert_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
filter: {
mine: true,
team_ids: ['<string>'],
claim_ids: ['<string>'],
has_claim: true,
claim_statuses: [],
invoice_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_invoice_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
agreement_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_agreement_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
supplier_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_supplier_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
recipient_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
excluded_recipient_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
tag_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
topic_ids: ['<string>'],
excluded_topic_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a'],
has_topic: true,
statuses: [],
confidence_levels: [],
currency_codes: ['<string>'],
correction_types: [],
impact_min: '<string>',
impact_max: '<string>',
issued_from: '<string>',
issued_through: '<string>',
created_from: '<string>',
created_through: '<string>',
search: '<string>'
},
excluded_alert_ids: ['3c90c3cc-0d44-4b50-8888-8dd25736052a']
})
};
fetch('http://localhost:3500/v1/alert-topics/{id}/alerts', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));import requests
url = "http://localhost:3500/v1/alert-topics/{id}/alerts"
payload = {
"alert_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"filter": {
"mine": True,
"team_ids": ["<string>"],
"claim_ids": ["<string>"],
"has_claim": True,
"claim_statuses": [],
"invoice_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_invoice_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"agreement_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_agreement_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"supplier_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_supplier_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"recipient_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"excluded_recipient_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"tag_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"topic_ids": ["<string>"],
"excluded_topic_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"],
"has_topic": True,
"statuses": [],
"confidence_levels": [],
"currency_codes": ["<string>"],
"correction_types": [],
"impact_min": "<string>",
"impact_max": "<string>",
"issued_from": "<string>",
"issued_through": "<string>",
"created_from": "<string>",
"created_through": "<string>",
"search": "<string>"
},
"excluded_alert_ids": ["3c90c3cc-0d44-4b50-8888-8dd25736052a"]
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text){
"changed_count": 123,
"skipped_count": 123
}{
"error": {
"code": "validation_error",
"message": "Invalid request format, parameters, or body. Details contain up to 20 actionable field errors; the complete encoded request body must be at most 2 MiB (2,097,152 bytes).",
"request_id": "req_example"
}
}{
"error": {
"code": "invalid_token",
"message": "Missing or invalid bearer credential.",
"request_id": "req_example"
}
}{
"error": {
"code": "forbidden",
"message": "Access denied: forbidden, token_disabled, organization_required, insufficient_role, or mfa_required. Check the error code and effective permissions.",
"request_id": "req_example"
}
}{
"error": {
"code": "not_found",
"message": "The resource does not exist in the current organization.",
"request_id": "req_example"
}
}{
"error": {
"code": "conflict",
"message": "The filter selects too many alerts, topic membership changed while the command ran, or a selected team has invalid saved rules. Nothing changed.",
"request_id": "req_example"
}
}{
"error": {
"code": "rate_limit_exceeded",
"message": "The IP or authenticated credential exceeded its request limit.",
"request_id": "req_example"
}
}{
"error": {
"code": "internal_error",
"message": "Unexpected server failure. Include the request ID when contacting support.",
"request_id": "req_example"
}
}{
"error": {
"code": "service_unavailable",
"message": "Authentication infrastructure is unavailable or rate limited. Honor Retry-After when provided.",
"request_id": "req_example"
}
}Authorizations
Personal API key. Send X-Organization-Id. The required cumulative level is listed in x-watchdog-permission.
Headers
Required for personal API keys. Target one organization you have access to. Migrated keys may omit it to use their original organization. For Clerk sessions, it must match the active organization.
Path Parameters
Body
Explicit alerts. The command applies to every listed alert or fails: an unknown ID returns 404 and an alert that may not be changed returns 409.
1 - 5000 elementsEvery alert matching this filter when the command runs. Takes the GET /v1/alerts filters with JSON lists and booleans. Matching alerts that may not be changed are left alone and counted in skipped_count.
Show child attributes
Show child attributes
Alerts to leave out of a filter selection. Only valid with filter.
1 - 5000 elementsResponse
How many alerts moved into the topic. skipped_count is always 0.