Monitors

POST /notifiers

Changed on

Creates a notifier. Set exactly one channel under properties, such as slack, email, or webhook. Returns 400 if the channel type isn't enabled for your organization. labelIds replaces assignments when supplied; [] clears them. Omitted or null labelIds preserves assignments on updates and creates an unlabeled resource on creation. IDs must belong to existing labels in your organization and are validated before saving.

Request

Request body

createdAtstring date-time

Timestamp when the notifier was created

createdBystring

Email or ID of the user who created the notifier

createdByAgentboolean

true when the MCP server created this notifier

disabledboolean

Whether repeated delivery failures disabled the notifier. False when a user snoozed it with disabledUntil. Ignored on requests

disabledUntilstring

ISO timestamp until which the notifier is disabled (null if enabled)

lastErrorstring

The delivery error that disabled the notifier. Empty for email notifiers and when disabled is false. Ignored on requests

namestring required

Human-readable name for the notifier

updatedAtstring date-time

Timestamp when the notifier was last updated

labelIdsLabelID[]

Existing label IDs; replaces assignments when supplied, clears with [], and preserves them when omitted or null.

Example request

{
  "createdAt": "2024-01-15T10:30:00Z",
  "createdBy": "alice@example.com",
  "disabledUntil": "2024-03-20T15:00:00Z",
  "name": "Production Slack Alerts",
  "properties": {
    "chatgptWorkspaceAgent": {
      "triggerId": "agtch_example"
    },
    "claudeCode": {
      "routineId": "trig_01ABCDEFGHJKLMNOPQRSTUVW"
    },
    "cursor": {
      "webhookUrl": "https://api2.cursor.sh/automations/webhook/00000000-0000-0000-0000-000000000000"
    },
    "customWebhook": {
      "body": "{\"alert\": \"{{.AlertName}}\", \"severity\": \"{{.Severity}}\", \"message\": \"{{.Message}}\"}",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Version": "1.0"
      },
      "secretHeaders": {
        "Authorization": "Bearer {{token}}"
      },
      "url": "https://api.custom-service.com/alerts"
    },
    "discord": {
      "discordChannel": "123456789012345678",
      "discordToken": "Bot 123456789012345678",
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      }
    },
    "discordWebhook": {
      "discordWebhookUrl": "https://discord.com/api/webhooks/123456789012345678/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      }
    },
    "email": {
      "emails": [
        "oncall@example.com",
        "alerts@example.com"
      ],
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      }
    },
    "jiraServiceManagement": {
      "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    },
    "microsoftTeams": {
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      },
      "microsoftTeamsUrl": "https://outlook.office.com/webhook/123456789/IncomingWebhook/..."
    },
    "opsgenie": {
      "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "isEU": true
    },
    "pagerduty": {
      "routingKey": "1234567890abcdef1234567890abcdef",
      "token": "u+1234567890abcdef1234567890abcdef"
    },
    "slack": {
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      },
      "slackUrl": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "webhook": {
      "url": "https://api.example.com/webhooks/alerts"
    }
  },
  "updatedAt": "2024-01-15T11:00:00Z"
}

Response

Created notifier.

createdAtstring date-time

Timestamp when the notifier was created

createdBystring

Email or ID of the user who created the notifier

createdByAgentboolean

true when the MCP server created this notifier

disabledboolean

Whether repeated delivery failures disabled the notifier. False when a user snoozed it with disabledUntil. Ignored on requests

disabledUntilstring

ISO timestamp until which the notifier is disabled (null if enabled)

lastErrorstring

The delivery error that disabled the notifier. Empty for email notifiers and when disabled is false. Ignored on requests

namestring required

Human-readable name for the notifier

updatedAtstring date-time

Timestamp when the notifier was last updated

idstring

Unique identifier for the notifier

labelIdsLabelID[] required

IDs of labels assigned to this notifier.

labelNamesstring[] required

Names of assigned labels, including with exclude=labels; [] when unassigned.

Example response

{
  "createdAt": "2024-01-15T10:30:00Z",
  "createdBy": "alice@example.com",
  "disabledUntil": "2024-03-20T15:00:00Z",
  "name": "Production Slack Alerts",
  "properties": {
    "chatgptWorkspaceAgent": {
      "triggerId": "agtch_example"
    },
    "claudeCode": {
      "routineId": "trig_01ABCDEFGHJKLMNOPQRSTUVW"
    },
    "cursor": {
      "webhookUrl": "https://api2.cursor.sh/automations/webhook/00000000-0000-0000-0000-000000000000"
    },
    "customWebhook": {
      "body": "{\"alert\": \"{{.AlertName}}\", \"severity\": \"{{.Severity}}\", \"message\": \"{{.Message}}\"}",
      "headers": {
        "Content-Type": "application/json",
        "X-API-Version": "1.0"
      },
      "secretHeaders": {
        "Authorization": "Bearer {{token}}"
      },
      "url": "https://api.custom-service.com/alerts"
    },
    "discord": {
      "discordChannel": "123456789012345678",
      "discordToken": "Bot 123456789012345678",
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      }
    },
    "discordWebhook": {
      "discordWebhookUrl": "https://discord.com/api/webhooks/123456789012345678/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX",
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      }
    },
    "email": {
      "emails": [
        "oncall@example.com",
        "alerts@example.com"
      ],
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      }
    },
    "jiraServiceManagement": {
      "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"
    },
    "microsoftTeams": {
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      },
      "microsoftTeamsUrl": "https://outlook.office.com/webhook/123456789/IncomingWebhook/..."
    },
    "opsgenie": {
      "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "isEU": true
    },
    "pagerduty": {
      "routingKey": "1234567890abcdef1234567890abcdef",
      "token": "u+1234567890abcdef1234567890abcdef"
    },
    "slack": {
      "messageTemplate": {
        "body": "Value {{.Value}} crossed {{.Threshold}}.{{range .Groups}}\n{{index .Values \"service\"}}: {{.Value}}{{end}}",
        "title": "{{if eq .Action \"Open\"}}🔥{{else}}✅{{end}} {{.Name}}"
      },
      "slackUrl": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "webhook": {
      "url": "https://api.example.com/webhooks/alerts"
    }
  },
  "updatedAt": "2024-01-15T11:00:00Z",
  "id": "z0NfJw64aKagPOBBIJ"
}

Changes

    • breaking

      added subschema #2 to the request body allOf list

    • breaking

      the request's body type changed from object to no type

    • warning

      removed the request property

    • warning

      removed the request property

    • warning

      removed the request property

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property //// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ///// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the optional property ////// to the response with the status

    • info

      added the required property / to the response with the status

    • info

      added the non-success response with the status