POST /services/mimir/alertmanager/api/v2/silences

Creates or updates a silence that targets this system's alerts.

The proxy automatically injects a system_key matcher for this system into the silence, overwriting any client-supplied system_key matcher. This ensures silences can only target this system's alerts.

Access control: Requires HTTP Basic Auth with valid system credentials.

Silence matchers: The silence must include at least one matcher (e.g., alertname). The system_key matcher is added automatically and cannot be customized.

application/json

Body Required

object object

Silence object with matchers, startsAt, endsAt, createdBy, comment

Responses

  • 200

    Silence created or updated successfully

  • 400 application/json

    Bad request - validation error

    Hide response attributes Show response attributes object
    • code integer

      HTTP error code

    • message string

      Error message

    • data object
      Hide data attributes Show data attributes object
      • type string

        Type of error

        Values are validation_error or external_api_error.

      • errors array[object]
        Hide errors attributes Show errors attributes object
        • key string

          Field name that failed validation

        • message string

          Error code or message

        • value string

          Value that failed validation

      • details

        Additional error details

  • 401 application/json

    Unauthorized - invalid or missing token

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
  • 413 application/json

    Payload too large

    Hide response attributes Show response attributes object
    • code integer

      HTTP error code

    • message string

      Error message

    • data object
      Hide data attributes Show data attributes object
      • type string

        Type of error

        Values are validation_error or external_api_error.

      • errors array[object]
        Hide errors attributes Show errors attributes object
        • key string

          Field name that failed validation

        • message string

          Error code or message

        • value string

          Value that failed validation

      • details

        Additional error details

  • 502 application/json

    Internal server error

    Hide response attributes Show response attributes object
    • code integer
    • message string
    • data object | null
POST /services/mimir/alertmanager/api/v2/silences
curl \
 --request POST 'https://collect.your-domain.com/api/services/mimir/alertmanager/api/v2/silences' \
 --user "username:password" \
 --header "Content-Type: application/json"
Request examples
{}
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 (413)
{
  "code": 400,
  "message": "validation failed",
  "data": {
    "type": "validation_error",
    "errors": [
      {
        "key": "username",
        "message": "required",
        "value": "string"
      }
    ]
  }
}
Response examples (502)
{
  "code": 500,
  "message": "internal server error",
  "data": {}
}