# Update an incident

Only works with incidents on custom services your company owns.

<mark style="color:$primary;">`PATCH`</mark> `https://isdown.app/api/v2/incidents/:id`

### Path parameters

| Parameter | Type    | Required | Description     |
| --------- | ------- | -------- | --------------- |
| `id`      | integer | Yes      | The incident ID |

### Request body

All parameters are optional, but to post a new update you must provide both `description` and `resolution_stage` together.

| Parameter          | Type   | Required | Description                                                                        |
| ------------------ | ------ | -------- | ---------------------------------------------------------------------------------- |
| `title`            | string | No       | Updated incident title                                                             |
| `status`           | string | No       | `minor` or `major`                                                                 |
| `description`      | string | No\*     | Update message. Requires `resolution_stage`                                        |
| `resolution_stage` | string | No\*     | `investigating`, `identified`, `monitoring`, or `resolved`. Requires `description` |

### Example request — post an update

```bash
curl -X PATCH https://api.isdown.app/api/v2/incidents/55001 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "We have identified the root cause and are deploying a fix.",
    "resolution_stage": "identified",
    "status": "minor"
  }'
```

### Example request — resolve an incident

```bash
curl -X PATCH https://api.isdown.app/api/v2/incidents/55001 \
  -H "Authorization: Bearer YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "description": "The issue has been resolved. Response times are back to normal.",
    "resolution_stage": "resolved"
  }'
```

### Example response

```bash
{
  "data": {
    "id": "55001",
    "type": "incidents",
    "attributes": {
      "title": "API response times elevated",
      "description": "We have identified the root cause and are deploying a fix.",
      "status": "minor",
      "resolved": false,
      "created_at": "2024-03-15T10:00:00.000Z",
      "resolved_at": null,
      "updated_at": "2024-03-15T10:15:00.000Z",
      "service_id": 1234,
      "service": "My API",
      "updates": [
        {
          "status": "investigating",
          "created_at": "2024-03-15T10:00:00.000Z",
          "description": "We are seeing elevated response times on our API."
        },
        {
          "status": "identified",
          "created_at": "2024-03-15T10:15:00.000Z",
          "description": "We have identified the root cause and are deploying a fix."
        }
      ],
      "isdown_url": null
    }
  }
}
```
