Update incident

Update an incident's metadata, the only attribute an incident lets you change.

Older versions of this endpoint return numeric team IDs instead of t123.

PATCH https://incidents.betterstack.com/api/v4/incidents/{incident_id}

URL parameters

incident_id
required string

Headers

Authorization
required string
Content-Type
required string

Body parameters

metadata
required object
200

Response body

{
  "data": {
    "id": "25",
    "type": "incident",
    "attributes": {
      "name": "uptime homepage",
      "url": "https://uptime.betterstack.com/",
      "http_method": "get",
      "cause": "Status 404",
      "incident_group_id": null,
      "started_at": "2020-03-09T17:37:56.662Z",
      "acknowledged_at": null,
      "acknowledged_by": null,
      "resolved_at": null,
      "resolved_by": null,
      "status": "Started",
      "team_name": "Testing team",
      "response_content": "\n404 Not Found\n\nNot Found\nThe requested URL /fail was not found on this server.\n",
      "response_options": "{}",
      "regions": [
        "us",
        "eu",
        "as",
        "au"
      ],
      "response_url": null,
      "screenshot_url": null,
      "origin_url": null,
      "escalation_policy_id": null,
      "call": true,
      "sms": true,
      "email": true,
      "push": true,
      "critical_alert": false,
      "slack_channels": [
        "inc-20-03-09-uptime-homepage-not-found"
      ],
      "metadata": {
        "Owner": [
          {
            "type": "Team",
            "item_id": "t12345",
            "name": "Platform team"
          }
        ],
        "Severity": [
          {
            "type": "String",
            "value": "high"
          }
        ]
      }
    },
    "relationships": {
      "monitor": {
        "data": {
          "id": "2",
          "type": "monitor"
        }
      }
    }
  },
  "included": [
    {
      "id": "2",
      "type": "monitor",
      "attributes": {
        "url": "https://uptime.betterstack.com/",
        "pronounceable_name": "Uptime homepage",
        "auth_username": "",
        "auth_password": "",
        "monitor_type": "status",
        "monitor_group_id": null,
        "last_checked_at": "2024-05-29T15:53:40.000Z",
        "status": "paused",
        "policy_id": null,
        "required_keyword": null,
        "verify_ssl": true,
        "check_frequency": 30,
        "call": false,
        "sms": false,
        "email": true,
        "push": true,
        "team_wait": 180,
        "http_method": "get",
        "request_timeout": 30,
        "recovery_period": 180,
        "request_headers": [],
        "request_body": "",
        "follow_redirects": true,
        "remember_cookies": true,
        "created_at": "2020-02-28T19:30:09.956Z",
        "updated_at": "2020-11-23T09:08:20.817Z",
        "ssl_expiration": 14,
        "domain_expiration": null,
        "regions": [
          "us",
          "eu",
          "as",
          "au"
        ],
        "expected_status_codes": [],
        "port": null,
        "confirmation_period": 0,
        "paused_at": null,
        "paused": false,
        "maintenance_from": null,
        "maintenance_to": null,
        "maintenance_timezone": "Tokyo",
        "maintenance_days": [
          "mon",
          "tue",
          "wed",
          "thu",
          "fri",
          "sat",
          "sun"
        ],
        "playwright_script": "import { test, expect } from '@playwright/test';\r\n\r\ntest('has title', async ({ page }) => {\r\n  await page.goto('https://betterstack.com/')\r\n  await expect(page).toHaveTitle(/Better Stack/)\r\n});\r\n",
        "checks_version": "v2",
        "ip_version": null
      },
      "relationships": {
        "policy": {
          "data": null
        }
      }
    }
  ]
}
403

Response body

{
  "errors": "You can't update this incident because it was shared with your team."
}
422

Response body

{
  "errors": "Sorry, you misspelled some attributes",
  "invalid_attributes": [
    "cause"
  ]
}

Example cURL

Example
curl --request PATCH \
  --url https://incidents.betterstack.com/api/v4/incidents/123456 \
  --header "Authorization: Bearer $TOKEN" \
  --header "Content-Type: application/json" \
  --data '{
    "metadata": {
      "Severity": "high",
      "Owner": [{ "type": "Team", "name": "Platform team" }]
    }
  }'