Skip to main content
Alerting & Response/Alert Templates
POSTAlertingSince 1.0SynchronousAuth Required

CreateAlertTemplate

Create a new message template for alert notifications

Execution Availability

Try It Out

Submit a mock request using the current auth context and example-driven inputs.

Request Inputs

Body Fields

  • nameStringRequired

    Human-readable template name

    Example: Custom Email Template

  • formatStringRequired

    Template format: markdown, html, json, or plain_text

    Example: markdown

  • contentStringRequired

    Template content with variable placeholders

    Example: # Alert: {{.AlertName}}

Responses

200 OK

On success, this API returns the following response structure.

  • uuidString

    Unique identifier of the template

    Example: tmpl-001

  • nameString

    Human-readable template name

    Example: Default Email Template

  • formatString

    Template format: markdown, html, json, or plain_text

    Example: markdown

  • contentString

    Template content with variable placeholders

    Example: # Alert: {{.AlertName}}

  • sourceString

    Template source: builtin or custom

    Example: builtin

  • createDateString

    Timestamp when the template was created

    Example: 2026-01-15T08:00:00Z

  • lastOpDateString

    Timestamp of the last template modification

    Example: 2026-01-15T08:00:00Z

Endpoint

POST/api/v1/alerting/templates

/api/v1/alerting/templates

Operation ID

CreateAlertTemplate

Permalink

Request Example

curl -X POST '{host}/api/v1/alerting/templates' -H 'Authorization: Bearer {token}' -H 'Content-Type: application/json' -d '{"name":"Custom Email Template","format":"markdown","content":"# Alert: {{.AlertName}}"}'

Response Example

200
{
  "uuid": "tmpl-001",
  "name": "Default Email Template",
  "format": "markdown",
  "content": "# Alert: {{.AlertName}}",
  "source": "builtin",
  "createDate": "example",
  "lastOpDate": "example"
}

Change History

This API has no change history records yet.

View all change history