Overview

Update notifier

Update notifier

PUT/v2/notifiers/{id}
Features

Send the token in the Authorization: Bearer API_TOKEN header. See Tokens for which token types this endpoint accepts.

Input4
Authorizationheaderrequired
Sent from your browser straight to the API — never to Docsbook, never stored.
idstring · pathrequired
(path)
disabledUntilstring · body
ISO timestamp until which the notifier is disabled (null if enabled)
namestring · bodyrequired
Human-readable name for the notifier
propertiesobject · bodyrequired
Configuration options for different notification channels. Only one channel should be configured per notifier.
Show child attributes9
customWebhookobject
Configuration for custom webhook notifications with flexible headers and body template. Supports variable substitution in the body template using {{.Variable}} syntax.
discordobject
Configuration for Discord notifications using bot token
discordWebhookobject
Configuration for Discord notifications using webhooks
emailobject
Configuration for email notifications
microsoftTeamsobject
Configuration for Microsoft Teams notifications
opsgenieobject
Configuration for OpsGenie integration
pagerdutyobject
Configuration for PagerDuty integration
slackobject
Configuration for Slack notifications using incoming webhooks
webhookobject
Configuration for simple webhook notifications
Output4
disabledUntilstring
ISO timestamp until which the notifier is disabled (null if enabled)
namestring
Human-readable name for the notifier
propertiesobject
Configuration options for different notification channels. Only one channel should be configured per notifier.
Show child attributes9
customWebhookobject
Configuration for custom webhook notifications with flexible headers and body template. Supports variable substitution in the body template using {{.Variable}} syntax.
discordobject
Configuration for Discord notifications using bot token
discordWebhookobject
Configuration for Discord notifications using webhooks
emailobject
Configuration for email notifications
microsoftTeamsobject
Configuration for Microsoft Teams notifications
opsgenieobject
Configuration for OpsGenie integration
pagerdutyobject
Configuration for PagerDuty integration
slackobject
Configuration for Slack notifications using incoming webhooks
webhookobject
Configuration for simple webhook notifications
idstring
Unique identifier for the notifier
Responses
200Notifier
Example input
curl -X PUT 'https://api.axiom.co/v2/notifiers/{id}' \
  -H 'Authorization: Bearer API_TOKEN' \
  -H 'Content-Type: application/json' \
  -d '{
    "name": "Production Slack Alerts",
    "properties": {
      "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"
      },
      "discordWebhook": {
        "discordWebhookUrl": "https://discord.com/api/webhooks/123456789012345678/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "email": {
        "emails": [
          "oncall@example.com",
          "alerts@example.com"
        ]
      },
      "microsoftTeams": {
        "microsoftTeamsUrl": "https://outlook.office.com/webhook/123456789/IncomingWebhook/..."
      },
      "opsgenie": {
        "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
        "isEU": true
      },
      "pagerduty": {
        "routingKey": "1234567890abcdef1234567890abcdef",
        "token": "u+1234567890abcdef1234567890abcdef"
      },
      "slack": {
        "slackUrl": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
      },
      "webhook": {
        "url": "https://api.example.com/webhooks/alerts"
      }
    }
  }'
Example output
{
  "createdAt": "2024-01-15T10:30:00Z",
  "createdBy": "alice@example.com",
  "disabledUntil": "2024-03-20T15:00:00Z",
  "name": "Production Slack Alerts",
  "properties": {
    "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"
    },
    "discordWebhook": {
      "discordWebhookUrl": "https://discord.com/api/webhooks/123456789012345678/XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "email": {
      "emails": [
        "oncall@example.com",
        "alerts@example.com"
      ]
    },
    "microsoftTeams": {
      "microsoftTeamsUrl": "https://outlook.office.com/webhook/123456789/IncomingWebhook/..."
    },
    "opsgenie": {
      "apiKey": "xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx",
      "isEU": true
    },
    "pagerduty": {
      "routingKey": "1234567890abcdef1234567890abcdef",
      "token": "u+1234567890abcdef1234567890abcdef"
    },
    "slack": {
      "slackUrl": "https://hooks.slack.com/services/T00000000/B00000000/XXXXXXXXXXXXXXXXXXXXXXXX"
    },
    "webhook": {
      "url": "https://api.example.com/webhooks/alerts"
    }
  },
  "updatedAt": "2024-01-15T11:00:00Z",
  "id": "notify_slack_prod"
}

Updated

Was this page helpful?