Update an outgoing webhook integration

Update an outgoing webhook integration's URL, event toggles or request template. Only provide the fields you want to change. To edit the saved template in place, send its id in custom_webhook_template_attributes, and change headers by name with its set_headers and remove_headers. trigger_type can't be changed after create.

PATCH https://incidents.betterstack.com/api/v3/outgoing-webhook-integrations/{id}
id string required

The ID of the outgoing webhook integration to update.

team_id string

Team to use, such as t123. Get the ID via List teams. Required when you can access more than one team.

Authorization string required

Bearer $TOKEN

Content-Type string

application/json

name string or null

The integration's name, shown in the dashboard.

url string

The URL the webhook is sent to. For an incident_change webhook, it can use the $INCIDENT_ID, $TEAM_ID and $METADATA variables.

metadata_api_version string

How the $METADATA variables in the URL and body_template render.
Valid values:
v2: Renders $METADATA.<key> as the key's last plain-text value.
v3: Renders $METADATA.<key> as all the key's values joined by commas. $METADATA_ARRAY and $METADATA.<key>.values list each value with its type.

on_incident_started boolean

Whether to send the webhook when an incident starts. Only for an incident_change webhook.

on_incident_acknowledged boolean

Whether to send the webhook when an incident is acknowledged. Only for an incident_change webhook.

on_incident_resolved boolean

Whether to send the webhook when an incident is resolved. Only for an incident_change webhook.

on_incident_reopened boolean

Whether to send the webhook when an incident is reopened. Only for an incident_change webhook.

on_incident_comment boolean

Whether to send the webhook when a comment is added to an incident. Without a custom template, the body of a comment webhook also has a comment object, whose attributes hold the comment's content, created_at, updated_at, user_id and user_email. Only for an incident_change webhook.

notify_alongside_primary_responder boolean

Whether to send the webhook when the on-call person is alerted about an incident without an escalation policy. Only for an incident_change webhook.

custom_webhook_template_attributes object

Custom request method, headers, body and basic authentication. Without a custom template, an incident_change or monitor_change webhook sends the incident or monitor under data, with what happened in event, such as started or created. Without a custom template, an on_call_change webhook sends the on-call schedule's message, emails, on_holiday_emails, change, calendar_id, calendar_name and primary_calendar under data. Returned as custom_webhook_template.

custom_webhook_template_attributes.id string

ID of the template saved on the integration.

custom_webhook_template_attributes.http_method string

The HTTP method of the request, post by default. A GET request is sent without a body. Possible values: head, get, post, put, patch, options.

custom_webhook_template_attributes.headers_template array of objects

Custom request headers, as a list of objects with name and value. Header values are sent as written, without template variables.

custom_webhook_template_attributes.headers_template[].name string

The header's name, such as Content-Type.

custom_webhook_template_attributes.headers_template[].value string

The header's value, sent as written.

custom_webhook_template_attributes.body_template string or object

Request body template, as text or as a JSON object. Reads return it as text. An incident_change template can use $INCIDENT_ID, $INCIDENT_URL, $NAME, $STATUS, $CAUSE, $URL, $HTTP_METHOD, $MONITOR_ID, $RESOURCE_ID, $RESOURCE_TYPE, $TEAM_ID, $TEAM_NAME, $INCIDENT_GROUP_ID, $REQUESTER, $STARTED_AT, $ACKNOWLEDGED_AT, $ACKNOWLEDGED_BY, $RESOLVED_AT, $RESOLVED_BY, $RESPONSE_URL, $RESPONSE_CONTENT, $RESPONSE_OPTIONS, $SCREENSHOT_URL, $INTEGRATION_IMAGE_URL, $REGIONS, $ESCALATION_POLICY_ID, $CALL, $SMS, $EMAIL, $PUSH, $CRITICAL_ALERT, $INTEGRATION_ALERT_ID, $PLAYWRIGHT_SUMMARY, $COMMENT_ID, $COMMENT_CONTENT, $COMMENT_CREATED_AT, $COMMENT_AUTHOR_NAME and $COMMENT_AUTHOR_EMAIL. A monitor_change template can use $MONITOR_ID, $PRONOUNCEABLE_NAME, $URL, $MONITOR_TYPE, $STATUS, $MONITOR_GROUP_ID, $ESCALATION_POLICY_ID, $EXPIRATION_ESCALATION_POLICY_ID, $LAST_CHECKED_AT, $REQUIRED_KEYWORD, $VERIFY_SSL, $CHECK_FREQUENCY, $CALL, $SMS, $EMAIL, $PUSH, $CRITICAL_ALERT, $TEAM_WAIT, $HTTP_METHOD, $REQUEST_TIMEOUT, $RECOVERY_PERIOD, $REQUEST_BODY, $PAUSED_AT, $SSL_EXPIRATION, $DOMAIN_EXPIRATION, $REGIONS and $PORT. An on_call_change template can use $MESSAGE, $EMAILS, $EMAILS_JSON_ARRAY, $ON_HOLIDAY_EMAILS, $ON_HOLIDAY_EMAILS_JSON_ARRAY, $CHANGE, $ON_CALL_CALENDAR_ID, $ON_CALL_CALENDAR_NAME and $DEFAULT_ON_CALL_CALENDAR. Incident and monitor templates can also use the metadata variables. A time such as $STARTED_AT renders like 2026-07-01 12:00:00 UTC, and the same name ending in _ISO8601 renders it in ISO 8601. A variable that holds a list, such as $REGIONS or $EMAILS_JSON_ARRAY, renders as JSON, so put it in the template without quotes.

custom_webhook_template_attributes.auth_username string

The username for basic authentication. Set both username and password, or neither.

custom_webhook_template_attributes.auth_password string

The password for basic authentication. Set both username and password, or neither.

custom_webhook_template_attributes.default_body boolean

Send true with a new template that has no body_template to start from the default body for its trigger_type, as the form in the web app does. Has no effect on a saved template sent with its id, or when it's the only field you send.

custom_webhook_template_attributes.set_headers array of objects

Headers to set by name. Each replaces a saved header of the same name, in any letter case, and the other saved headers stay. Can't be sent with headers_template.

custom_webhook_template_attributes.set_headers[].name string

The header's name, such as Authorization.

custom_webhook_template_attributes.set_headers[].value string

The header's value, sent as written.

custom_webhook_template_attributes.remove_headers array of strings

Names of saved headers to remove, in any letter case. Can't be sent with headers_template.

200

Returns the updated outgoing webhook integration.

200 OK
{
  "data": {
    "id": "123456789",
    "type": "outgoing_webhook",
    "attributes": {
      "name": "Incident updates to the ops channel",
      "url": "https://example.com/webhooks/better-stack",
      "trigger_type": "incident_change",
      "metadata_api_version": "v3",
      "on_incident_started": true,
      "on_incident_acknowledged": true,
      "on_incident_resolved": true,
      "on_incident_reopened": true,
      "on_incident_comment": false,
      "notify_alongside_primary_responder": true,
      "paused": false,
      "team_id": "t123",
      "team_name": "Production"
    },
    "relationships": {
      "custom_webhook_template": {
        "data": {
          "id": "123456789",
          "type": "custom_webhook_template"
        }
      }
    }
  },
  "included": [
    {
      "id": "123456789",
      "type": "custom_webhook_template",
      "attributes": {
        "http_method": "post",
        "headers_template": [
          {
            "name": "Content-Type",
            "value": "application/json"
          }
        ],
        "body_template": "{\"incident_id\":\"$INCIDENT_ID\",\"name\":\"$NAME\",\"cause\":\"$CAUSE\"}",
        "auth_username": "user-placeholder"
      }
    }
  ]
}
401

The API token is missing or invalid.

401 Unauthorized
{
  "errors": "Invalid Team API token. How to find your Team API token: https://betterstack.com/docs/uptime/api/getting-started-with-uptime-api/#get-an-incidents-api-token"
}
403

The token is read-only, your role doesn't include Manage on Monitors, heartbeats, integrations, or the token can't be used for this API.

403 Forbidden
{
  "errors": "This API token is read-only and cannot be used for write operations."
}
404

The outgoing webhook integration doesn't exist, or the token can't access it.

422

Validation failed, or the request has an unknown field. Sending trigger_type fails this way, and so does sending an event toggle to a webhook whose trigger_type isn't incident_change.

id string

The ID of the outgoing webhook integration.

type string

Always outgoing_webhook.

name string or null

The integration's name, shown in the dashboard.

url string

The URL the webhook is sent to. For an incident_change webhook, it can use the $INCIDENT_ID, $TEAM_ID and $METADATA variables.

trigger_type string

What triggers the webhook. Fixed once the integration is created.
Valid values:
incident_change: Sends the webhook when an incident starts, is acknowledged, resolved or reopened, or gets a comment.
on_call_change: Sends the webhook when the person on call changes, or when their holiday starts or ends during their shift.
monitor_change: Sends the webhook when a monitor is created, updated, paused, unpaused or removed.

metadata_api_version string

How the $METADATA variables in the URL and body_template render.
Valid values:
v2: Renders $METADATA.<key> as the key's last plain-text value.
v3: Renders $METADATA.<key> as all the key's values joined by commas. $METADATA_ARRAY and $METADATA.<key>.values list each value with its type.

on_incident_started boolean

Whether to send the webhook when an incident starts. Only for an incident_change webhook.

on_incident_acknowledged boolean

Whether to send the webhook when an incident is acknowledged. Only for an incident_change webhook.

on_incident_resolved boolean

Whether to send the webhook when an incident is resolved. Only for an incident_change webhook.

on_incident_reopened boolean

Whether to send the webhook when an incident is reopened. Only for an incident_change webhook.

on_incident_comment boolean

Whether to send the webhook when a comment is added to an incident. Without a custom template, the body of a comment webhook also has a comment object, whose attributes hold the comment's content, created_at, updated_at, user_id and user_email. Only for an incident_change webhook.

notify_alongside_primary_responder boolean

Whether to send the webhook when the on-call person is alerted about an incident without an escalation policy. Only for an incident_change webhook.

paused boolean

Whether the integration is paused. A paused integration sends no webhooks.

relationships.custom_webhook_template.data object or null

The saved request template, returned under included. null when the webhook has no custom template.

relationships.custom_webhook_template.data.id string

ID of the linked custom webhook template.

relationships.custom_webhook_template.data.type string

Always custom_webhook_template.

team_id string

Team that owns this integration, such as t123.

team_name string

Name of the team that owns this integration.

included array

Each linked custom webhook template, with its id, type and attributes.

included[].id string

ID of the linked custom webhook template.

included[].type string

Always custom_webhook_template.

included[].attributes.http_method string

The HTTP method of the request, post by default. A GET request is sent without a body. Possible values: head, get, post, put, patch, options.

included[].attributes.headers_template array of objects

Custom request headers, as a list of objects with name and value. Header values are sent as written, without template variables.

included[].attributes.headers_template[].name string

The header's name, such as Content-Type.

included[].attributes.headers_template[].value string

The header's value, sent as written.

included[].attributes.body_template string or null

Request body template, as text. Can use the metadata variables.

included[].attributes.auth_username string or null

The username for basic authentication.

Example cURL

Update an outgoing webhook integration Change the request body
curl --request PATCH \
  --url https://incidents.betterstack.com/api/v3/outgoing-webhook-integrations/16 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "name": "Incident updates to the ops channel"
}'
curl --request PATCH \
  --url https://incidents.betterstack.com/api/v3/outgoing-webhook-integrations/16 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
  "custom_webhook_template_attributes": {
    "id": "42",
    "body_template": "{\"incident\":\"$INCIDENT_ID\",\"cause\":\"$CAUSE\"}"
  }
}'