Update incoming webhook

Update an existing incoming webhook. Send only the parameters you wish to change (eg. name).

PATCH https://incidents.betterstack.com/api/v2/incoming-webhooks/{incoming_webhook_id}

URL parameters

incoming_webhook_id
required string

Headers

Authorization
required string
Content-Type
string

Body parameters

name
string
policy_id
string
call
boolean
sms
boolean
email
boolean
push
boolean
critical_alert
boolean
team_wait
integer
recovery_period
integer
paused
boolean
started_rule_type
string
acknowledged_rule_type
string
resolved_rule_type
string
started_rules
array
started_rules[].rule_target
required string
started_rules[].target_field
string
started_rules[].match_type
required string
started_rules[].content
required string
acknowledged_rules
array
resolved_rules
array
cause_field
object
cause_field.field_target
required string
cause_field.target_field
string
cause_field.match_type
required string
cause_field.content
string
cause_field.content_before
string
cause_field.content_after
string
title_field
object
started_alert_id_field
object
acknowledged_alert_id_field
object
resolved_alert_id_field
object
other_started_fields
array
other_started_fields[].name
required string
other_acknowledged_fields
array
other_resolved_fields
array
200

Response body

{
  "data": {
    "id": "4",
    "type": "incoming_webhook",
    "attributes": {
      "name": "Test Again",
      "created_at": "2023-01-23T14:18:07.408Z",
      "updated_at": "2023-01-25T13:04:32.491Z",
      "policy_id": null,
      "url": "https://incidents.betterstack.com/api/v1/incoming-webhook/[token]",
      "sample_query_string": null,
      "sample_headers": null,
      "sample_body": null,
      "team_name": "Testing",
      "call": true,
      "sms": false,
      "email": true,
      "push": true,
      "critical_alert": false,
      "team_wait": null,
      "recovery_period": 180,
      "paused": false,
      "started_rule_type": "unused",
      "acknowledged_rule_type": "unused",
      "resolved_rule_type": "unused",
      "started_rules": [],
      "acknowledged_rules": [],
      "resolved_rules": [],
      "cause_field": null,
      "title_field": null,
      "started_alert_id_field": null,
      "acknowledged_alert_id_field": null,
      "resolved_alert_id_field": null,
      "other_started_fields": null,
      "other_acknowledged_fields": null,
      "other_resolved_fields": null
    }
  }
}

Example cURL

Example
curl -X "PATCH" "https://incidents.betterstack.com/api/v2/incoming-webhooks/4" \
     -H "Authorization: Bearer $TOKEN" \
     -H 'Content-Type: application/json; charset=utf-8' \
     -d $'{
  "name": "Test Again"
}'


Sending a rule or field attribute replaces it entirely

Any *_rules or *_fields attribute you include is rebuilt from what you send, so the entries already stored under it are deleted first. To add one field to three that exist, send all four. Leave the attribute out to keep the current entries.