# Incident Updates API Reference

Source: https://instatus.com/help/api/incident-updates

## Get an incident update

**Endpoint:**

```bash
GET /v1/:page_id/incidents/:incident_id/incident-updates/:incident_update_id
```

**Example response**

```json
{
  "id": "ckf1ew8mol30c0a32w400k6s3",
  "message": "We're currently investigating an issue with the Website",
  "messageHtml": "<p>We're currently investigating an issue with the Website</p>",
  "status": "INVESTIGATING",
  "notify": true,
  "started": "2020-09-12T03:38:47.998Z",
  "incident": {
    "id": "ckf01m59ueaqb0a32wrljz1yd",
    "name": "Rocket is going down",
    "started": "2020-09-12T19:05:17.398Z",
    "status": "INVESTIGATING",
    "components": [
      {
        "id": "ckf01fvnxywz50a35nh1qzssm",
        "name": "Website",
        "status": "PARTIALOUTAGE",
        "showUptime": true,
        "site": {
          "subdomain": "nasa",
          "logoUrl": null,
          "name": "Nasa",
          "slackIntegrations": [],
          "subscribers": []
        },
        "customImpactPercentage": 40,
        "subscribers": []
      }
    ]
  }
}
```

## Add an incident update

**Endpoint:**

```bash
POST /v1/:page_id/incidents/:incident_id/incident-updates
```

**Example request**

```json
{
  "message": "We're currently investigating an issue with the Website",
  "components": ["ckf01fvnxywz50a35nh1qzssm"],
  "started": "2020-09-12 05:38:47.998",
  "status": "INVESTIGATING",
  "notify": true,
  "statuses": [
    {
      "id": "ckf01fvnxywz50a35nh1qzssm",
      "status": "MAJOROUTAGE"
    }
  ],
  "translations": {
    "message": {
      "fr": "Nous enquêtons actuellement sur un problème avec le site Web"
    }
  }
}
```

**Example response**

```json
{
  "id": "ckf1ew8mol30c0a32w400k6s3",
  "message": "We're currently investigating an issue with the Website",
  "messageHtml": "<p>We're currently investigating an issue with the Website</p>",
  "status": "INVESTIGATING",
  "notify": true,
  "started": "2020-09-12T03:38:47.998Z",
  "incident": {
    "id": "ckf01m59ueaqb0a32wrljz1yd",
    "name": "Rocket is going down",
    "started": "2020-09-12T19:05:17.398Z",
    "status": "INVESTIGATING",
    "components": [
      {
        "id": "ckf01fvnxywz50a35nh1qzssm",
        "name": "Website",
        "status": "OPERATIONAL",
        "showUptime": true,
        "site": {
          "subdomain": "nasa",
          "logoUrl": null,
          "name": "Nasa",
          "slackIntegrations": [],
          "subscribers": []
        },
        "subscribers": []
      }
    ]
  },
  "translations": {
    "message": {
      "fr": "Nous enquêtons actuellement sur un problème avec le site Web"
    }
  }
}
```

## Resolve an incident with a template

**Endpoint:**

```bash
POST /v2/:page_id/incidents/:incident_id/incident-updates/:template
```

**Example response**

```json
{
  "id": "cl8hrf2a6dsdsu4xy7vqurh",
  "message": "This incident has been resolved.",
  "messageTranslationId": null,
  "status": "RESOLVED",
  "notify": false,
  "started": "2022-09-25T19:54:42.064Z",
  "ended": null,
  "duration": null,
  "createdAt": "2022-09-25T19:54:42.126Z",
  "updatedAt": "2022-09-25T19:54:42.127Z",
  "incidentId": "cl8hr8gu40asdasdu4ucisqeo3",
  "messageHtml": "<p>This incident has been resolved.</p>",
  "messageHtmlTranslationId": null,
  "importedFrom": null
}
```

## Edit an incident update

**Endpoint:**

```bash
PUT /v1/:page_id/incidents/:incident_id/incident-updates/:incident_update_id
```

**Example request**

```json
{
  "message": "We're currently investigating an issue with the Website",
  "components": ["ckf01fvnxywz50a35nh1qzssm"],
  "started": "2020-09-12 05:38:47.998",
  "status": "INVESTIGATING",
  "notify": true,
  "statuses": [
    {
      "id": "ckf01fvnxywz50a35nh1qzssm",
      "status": "PARTIALOUTAGE",
      "customImpactPercentage": 40
    }
  ],
  "translations": {
    "message": {
      "fr": "Nous enquêtons actuellement sur un problème avec le site Web"
    }
  }
}
```

**Example response**

```json
{
  "id": "ckf1ew8mol30c0a32w400k6s3",
  "message": "We're currently investigating an issue with the Website",
  "messageHtml": "<p>We're currently investigating an issue with the Website</p>",
  "status": "INVESTIGATING",
  "notify": true,
  "started": "2020-09-12T03:38:47.998Z",
  "incident": {
    "id": "ckf01m59ueaqb0a32wrljz1yd",
    "name": "Rocket is going down",
    "started": "2020-09-12T19:05:17.398Z",
    "status": "INVESTIGATING",
    "components": [
      {
        "id": "ckf01fvnxywz50a35nh1qzssm",
        "name": "Website",
        "status": "OPERATIONAL",
        "showUptime": true,
        "site": {
          "subdomain": "nasa",
          "logoUrl": null,
          "name": "Nasa",
          "slackIntegrations": [],
          "subscribers": []
        },
        "subscribers": []
      }
    ]
  },
  "translations": {
    "message": {
      "fr": "Nous enquêtons actuellement sur un problème avec le site Web"
    }
  }
}
```

## Delete an incident update

**Endpoint:**

```bash
DELETE /v1/:page_id/incidents/:incident_id/incident-updates/:incident_update_id
```

**Example response**

```json
{
  "id": "ckf1ew8mol30c0a32w400k6s3"
}
```
