Generates an Alertmanager configuration with per-severity routing and pushes it to Mimir. SMTP settings are injected server-side. The user provides email recipients, webhooks, and optional system_key exceptions per severity.
Query parameters
-
Target organization ID. Required for Owner, Distributor, and Reseller roles. Customer role uses their own organization automatically.
POST
/api/alerting/config
curl \
--request POST 'https://collect.your-domain.com/api/api/alerting/config' \
--header "Authorization: Bearer $ACCESS_TOKEN" \
--header "Content-Type: application/json" \
--data '{"warning":{"emails":["team@example.com"]},"critical":{"emails":["oncall@example.com"],"webhooks":[{"url":"https://hooks.slack.com/services/T00/B00/XXX","name":"slack"}],"exceptions":["NOC-SKIP-0001"]}}'
Request examples
{
"warning": {
"emails": [
"team@example.com"
]
},
"critical": {
"emails": [
"oncall@example.com"
],
"webhooks": [
{
"url": "https://hooks.slack.com/services/T00/B00/XXX",
"name": "slack"
}
],
"exceptions": [
"NOC-SKIP-0001"
]
}
}
Response examples (200)
{
"code": 200,
"message": "string",
"data": {}
}
Response examples (400)
{
"code": 400,
"message": "validation failed",
"data": {
"type": "validation_error",
"errors": [
{
"key": "username",
"message": "required",
"value": "string"
}
]
}
}
Response examples (401)
{
"code": 401,
"message": "invalid token",
"data": {}
}
Response examples (403)
{
"code": 403,
"message": "insufficient permissions",
"data": {}
}
Response examples (500)
{
"code": 500,
"message": "internal server error",
"data": {}
}