# Incidents API

The Uptizm API has 16 endpoints on this resource, one section each.

## List incidents

`GET /incidents`

The team's incidents, newest first, cursor-paginated (at most 100 per page).

- URL: `https://api.uptizm.com/v1/incidents`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:read`
- Tag: Incidents
- operationId: `v1.incidents.index`

### Parameters

- `monitor_id` (query, string): Filter by the affected monitor, matching either the denormalized primary hint or the full affected-component pivot.
- `lifecycle` (query, string)
- `ai_owned` (query, boolean)
- `q` (query, string): Free-text search over the incident title.
- `per_page` (query, integer, min 1, max 200): Page size, clamped to 1 and the endpoint's maximum (200 on most lists).
- `cursor` (query, string): The `meta.next_cursor` of the previous page.

### Response 200

Content type: `application/json`.

- `data` (array of IncidentResource, required)
  - `id` (string, required)
  - `team_id` (string, required)
  - `title` (string, required)
  - `title_key` (string or null, required): The translation key of the incident title, sent beside `title`.
  - `title_params` (array of any, required)
  - `lifecycle` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
  - `severity` (string, one of `"critical"`, `"warn"`, `"info"`, required)
  - `impact` (string, one of `"none"`, `"minor"`, `"major"`, `"critical"`, required)
  - `signal_source` (string, one of `"user_threshold"`, `"ai_anomaly"`, `"manual"`, required)
  - `ai_owned` (boolean, required)
  - `primary_monitor_id` (string or null, required)
  - `trigger_metric_key` (string or null, required)
  - `started_at` (string, required)
  - `resolved_at` (string or null, required)
  - `postmortem_body` (string or null, required)
  - `postmortem_published_at` (string or null, required)
  - `assignee` (object): The responder the incident is assigned to, or null when it is unassigned.
    - `id` (string, required)
    - `name` (string, required)
  - `ai_investigation` (object or null): The AI investigation report for the incident, or null when there is none to show.
    - `verdict` (string or null, required)
    - `summary` (string or null, required)
    - `evidence_for` (string or array of string, max items 0, required)
    - `evidence_against` (string or array of string, max items 0, required)
    - `used_confirmation` (boolean, required)
    - `confirmation_region` (string, required)
    - `model` (string, required)
  - `monitors` (array of object)
    - `monitor_id` (string, required)
    - `name` (string, required)
    - `component_status_at_start` (string or null, required)
    - `component_status_current` (string or null, one of `"up"`, `"down"`, `"degraded"`, `"paused"`, `"maintenance"`, `null`, required): Read from the monitor, not the pivot.
  - `updates` (array of IncidentUpdateResource)
    - `id` (string, required)
    - `incident_id` (string, required)
    - `actor` (string, required)
    - `author` (string or null, required)
    - `status` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
    - `message` (string, required)
    - `is_public` (boolean, required)
    - `autonomous` (boolean, required)
    - `display_at` (string, required)
    - `created_at` (string or null, required)
  - `created_at` (string or null, required)
  - `updated_at` (string or null, required)
- `links` (object, required)
  - `first` (string or null, required)
  - `last` (string or null, required)
  - `prev` (string or null, required)
  - `next` (string or null, required)
- `meta` (object, required)
  - `path` (string or null, required): Base path for paginator generated URLs.
  - `per_page` (integer, min 0, required): Number of items shown per page.
  - `next_cursor` (string or null, required): The "cursor" that points to the next set of items.
  - `prev_cursor` (string or null, required): The "cursor" that points to the previous set of items.
  - `open_total` (integer, required)
  - `critical_total` (integer, required)
  - `ai_total` (integer, required)
  - `resolved_total` (integer, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Open an incident

`POST /incidents`

Opens a manual incident for one of the team's monitors.

- URL: `https://api.uptizm.com/v1/incidents`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.store`

### Parameters

- `Idempotency-Key` (header, string): Any unique string per logical request.

### Request body

Content type: `application/json`.

- `monitor_id` (string, uuid, required)
- `severity` (IncidentSeverity: string, one of `"critical"`, `"warn"`, `"info"`, required): Severity tier assigned to an incident for routing and tone styling.
- `title` (string, max length 200, required)
- `message` (string or null, max length 2000)
- `notify` (boolean): Whether to announce the open to the affected pages' confirmed subscribers.
- `impact` (IncidentImpact: string, one of `"none"`, `"minor"`, `"major"`, `"critical"` or null)

### Response 200

Content type: `application/json`.

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 422: Validation error
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Get the weekly digest

`GET /incidents/digest`

The latest stored weekly incident digest of the team.

- URL: `https://api.uptizm.com/v1/incidents/digest`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:read`
- Tag: Incidents
- operationId: `v1.incidents.digest`

### Response 200

Content type: `application/json`.

- `data` (object, required)
  - `week_start` (string, required)
  - `week_end` (string, required)
  - `uptime_percent` (number, required)
  - `incident_count` (integer, required)
  - `confidence` (string, one of `"high"`, `"medium"`, `"low"`, required)
  - `summary` (string, required)
  - `highlights` (array of any, required)
  - `stripped_citations` (array of any, required)
  - `generated_at` (string, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: An error
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Get an incident

`GET /incidents/{incident}`

One incident with its timeline. Updates posted through a key show the author as "API key: <name>".

- URL: `https://api.uptizm.com/v1/incidents/{incident}`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:read`
- Tag: Incidents
- operationId: `v1.incidents.show`

### Parameters

- `incident` (path, string, required): The incident ID

### Response 200

Content type: `application/json`.

- `data` (IncidentResource and object, required)
  - `id` (string, required)
  - `team_id` (string, required)
  - `title` (string, required)
  - `title_key` (string or null, required): The translation key of the incident title, sent beside `title`.
  - `title_params` (array of any, required)
  - `lifecycle` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
  - `severity` (string, one of `"critical"`, `"warn"`, `"info"`, required)
  - `impact` (string, one of `"none"`, `"minor"`, `"major"`, `"critical"`, required)
  - `signal_source` (string, one of `"user_threshold"`, `"ai_anomaly"`, `"manual"`, required)
  - `ai_owned` (boolean, required)
  - `primary_monitor_id` (string or null, required)
  - `trigger_metric_key` (string or null, required)
  - `started_at` (string, required)
  - `resolved_at` (string or null, required)
  - `postmortem_body` (string or null, required)
  - `postmortem_published_at` (string or null, required)
  - `assignee` (object, required): The responder the incident is assigned to, or null when it is unassigned.
    - `id` (string, required)
    - `name` (string, required)
  - `ai_investigation` (object or null, required): The AI investigation report for the incident, or null when there is none to show.
    - `verdict` (string or null, required)
    - `summary` (string or null, required)
    - `evidence_for` (string or array of string, max items 0, required)
    - `evidence_against` (string or array of string, max items 0, required)
    - `used_confirmation` (boolean, required)
    - `confirmation_region` (string, required)
    - `model` (string, required)
  - `monitors` (array of object, required)
    - `monitor_id` (string, required)
    - `name` (string, required)
    - `component_status_at_start` (string or null, required)
    - `component_status_current` (string or null, one of `"up"`, `"down"`, `"degraded"`, `"paused"`, `"maintenance"`, `null`, required): Read from the monitor, not the pivot.
  - `updates` (array of IncidentUpdateResource, required)
    - `id` (string, required)
    - `incident_id` (string, required)
    - `actor` (string, required)
    - `author` (string or null, required)
    - `status` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
    - `message` (string, required)
    - `is_public` (boolean, required)
    - `autonomous` (boolean, required)
    - `display_at` (string, required)
    - `created_at` (string or null, required)
  - `created_at` (string or null, required)
  - `updated_at` (string or null, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Resolve an incident

`POST /incidents/{incident}/resolve`

Resolves an active incident, whatever the monitor's live health.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/resolve`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.resolve`

### Parameters

- `incident` (path, string, required): The incident ID
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Request body

Content type: `application/json`.

- `message` (string or null, max length 2000)

### Response 200

Content type: `application/json`.

- `data` (IncidentResource and object, required)
  - `id` (string, required)
  - `team_id` (string, required)
  - `title` (string, required)
  - `title_key` (string or null, required): The translation key of the incident title, sent beside `title`.
  - `title_params` (array of any, required)
  - `lifecycle` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
  - `severity` (string, one of `"critical"`, `"warn"`, `"info"`, required)
  - `impact` (string, one of `"none"`, `"minor"`, `"major"`, `"critical"`, required)
  - `signal_source` (string, one of `"user_threshold"`, `"ai_anomaly"`, `"manual"`, required)
  - `ai_owned` (boolean, required)
  - `primary_monitor_id` (string or null, required)
  - `trigger_metric_key` (string or null, required)
  - `started_at` (string, required)
  - `resolved_at` (string or null, required)
  - `postmortem_body` (string or null, required)
  - `postmortem_published_at` (string or null, required)
  - `assignee` (object, required): The responder the incident is assigned to, or null when it is unassigned.
    - `id` (string, required)
    - `name` (string, required)
  - `ai_investigation` (object or null, required): The AI investigation report for the incident, or null when there is none to show.
    - `verdict` (string or null, required)
    - `summary` (string or null, required)
    - `evidence_for` (string or array of string, max items 0, required)
    - `evidence_against` (string or array of string, max items 0, required)
    - `used_confirmation` (boolean, required)
    - `confirmation_region` (string, required)
    - `model` (string, required)
  - `monitors` (array of object, required)
    - `monitor_id` (string, required)
    - `name` (string, required)
    - `component_status_at_start` (string or null, required)
    - `component_status_current` (string or null, one of `"up"`, `"down"`, `"degraded"`, `"paused"`, `"maintenance"`, `null`, required): Read from the monitor, not the pivot.
  - `updates` (array of IncidentUpdateResource, required)
    - `id` (string, required)
    - `incident_id` (string, required)
    - `actor` (string, required)
    - `author` (string or null, required)
    - `status` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
    - `message` (string, required)
    - `is_public` (boolean, required)
    - `autonomous` (boolean, required)
    - `display_at` (string, required)
    - `created_at` (string or null, required)
  - `created_at` (string or null, required)
  - `updated_at` (string or null, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 422: Validation error
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Acknowledge an incident

`POST /incidents/{incident}/acknowledge`

Acknowledges a newly detected incident and moves it to investigating.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/acknowledge`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.acknowledge`

### Parameters

- `incident` (path, string, required): The incident ID
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Request body

Content type: `application/json`.

- `message` (string or null, max length 2000)

### Response 200

Content type: `application/json`.

- `data` (IncidentResource and object, required)
  - `id` (string, required)
  - `team_id` (string, required)
  - `title` (string, required)
  - `title_key` (string or null, required): The translation key of the incident title, sent beside `title`.
  - `title_params` (array of any, required)
  - `lifecycle` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
  - `severity` (string, one of `"critical"`, `"warn"`, `"info"`, required)
  - `impact` (string, one of `"none"`, `"minor"`, `"major"`, `"critical"`, required)
  - `signal_source` (string, one of `"user_threshold"`, `"ai_anomaly"`, `"manual"`, required)
  - `ai_owned` (boolean, required)
  - `primary_monitor_id` (string or null, required)
  - `trigger_metric_key` (string or null, required)
  - `started_at` (string, required)
  - `resolved_at` (string or null, required)
  - `postmortem_body` (string or null, required)
  - `postmortem_published_at` (string or null, required)
  - `assignee` (object, required): The responder the incident is assigned to, or null when it is unassigned.
    - `id` (string, required)
    - `name` (string, required)
  - `ai_investigation` (object or null, required): The AI investigation report for the incident, or null when there is none to show.
    - `verdict` (string or null, required)
    - `summary` (string or null, required)
    - `evidence_for` (string or array of string, max items 0, required)
    - `evidence_against` (string or array of string, max items 0, required)
    - `used_confirmation` (boolean, required)
    - `confirmation_region` (string, required)
    - `model` (string, required)
  - `monitors` (array of object, required)
    - `monitor_id` (string, required)
    - `name` (string, required)
    - `component_status_at_start` (string or null, required)
    - `component_status_current` (string or null, one of `"up"`, `"down"`, `"degraded"`, `"paused"`, `"maintenance"`, `null`, required): Read from the monitor, not the pivot.
  - `updates` (array of IncidentUpdateResource, required)
    - `id` (string, required)
    - `incident_id` (string, required)
    - `actor` (string, required)
    - `author` (string or null, required)
    - `status` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
    - `message` (string, required)
    - `is_public` (boolean, required)
    - `autonomous` (boolean, required)
    - `display_at` (string, required)
    - `created_at` (string or null, required)
  - `created_at` (string or null, required)
  - `updated_at` (string or null, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 422: Validation error
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Reopen an incident

`POST /incidents/{incident}/reopen`

Reopens a resolved incident and returns it to investigating.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/reopen`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.reopen`

### Parameters

- `incident` (path, string, required): The incident ID
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Request body

Content type: `application/json`.

- `message` (string or null, max length 2000)

### Response 200

Content type: `application/json`.

- `data` (IncidentResource and object, required)
  - `id` (string, required)
  - `team_id` (string, required)
  - `title` (string, required)
  - `title_key` (string or null, required): The translation key of the incident title, sent beside `title`.
  - `title_params` (array of any, required)
  - `lifecycle` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
  - `severity` (string, one of `"critical"`, `"warn"`, `"info"`, required)
  - `impact` (string, one of `"none"`, `"minor"`, `"major"`, `"critical"`, required)
  - `signal_source` (string, one of `"user_threshold"`, `"ai_anomaly"`, `"manual"`, required)
  - `ai_owned` (boolean, required)
  - `primary_monitor_id` (string or null, required)
  - `trigger_metric_key` (string or null, required)
  - `started_at` (string, required)
  - `resolved_at` (string or null, required)
  - `postmortem_body` (string or null, required)
  - `postmortem_published_at` (string or null, required)
  - `assignee` (object, required): The responder the incident is assigned to, or null when it is unassigned.
    - `id` (string, required)
    - `name` (string, required)
  - `ai_investigation` (object or null, required): The AI investigation report for the incident, or null when there is none to show.
    - `verdict` (string or null, required)
    - `summary` (string or null, required)
    - `evidence_for` (string or array of string, max items 0, required)
    - `evidence_against` (string or array of string, max items 0, required)
    - `used_confirmation` (boolean, required)
    - `confirmation_region` (string, required)
    - `model` (string, required)
  - `monitors` (array of object, required)
    - `monitor_id` (string, required)
    - `name` (string, required)
    - `component_status_at_start` (string or null, required)
    - `component_status_current` (string or null, one of `"up"`, `"down"`, `"degraded"`, `"paused"`, `"maintenance"`, `null`, required): Read from the monitor, not the pivot.
  - `updates` (array of IncidentUpdateResource, required)
    - `id` (string, required)
    - `incident_id` (string, required)
    - `actor` (string, required)
    - `author` (string or null, required)
    - `status` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
    - `message` (string, required)
    - `is_public` (boolean, required)
    - `autonomous` (boolean, required)
    - `display_at` (string, required)
    - `created_at` (string or null, required)
  - `created_at` (string or null, required)
  - `updated_at` (string or null, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 422: Validation error
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Assign an incident

`POST /incidents/{incident}/assign`

Hands the incident to a member of the team, or clears the assignment when `assignee_id` is null. A non-member is a 422.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/assign`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.assign`

### Parameters

- `incident` (path, string, required): The incident ID
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Request body

Content type: `application/json`.

- `assignee_id` (string or null, one of `""`, `null`)

### Response 200

Content type: `application/json`.

- `data` (IncidentResource and object, required)
  - `id` (string, required)
  - `team_id` (string, required)
  - `title` (string, required)
  - `title_key` (string or null, required): The translation key of the incident title, sent beside `title`.
  - `title_params` (array of any, required)
  - `lifecycle` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
  - `severity` (string, one of `"critical"`, `"warn"`, `"info"`, required)
  - `impact` (string, one of `"none"`, `"minor"`, `"major"`, `"critical"`, required)
  - `signal_source` (string, one of `"user_threshold"`, `"ai_anomaly"`, `"manual"`, required)
  - `ai_owned` (boolean, required)
  - `primary_monitor_id` (string or null, required)
  - `trigger_metric_key` (string or null, required)
  - `started_at` (string, required)
  - `resolved_at` (string or null, required)
  - `postmortem_body` (string or null, required)
  - `postmortem_published_at` (string or null, required)
  - `assignee` (object, required): The responder the incident is assigned to, or null when it is unassigned.
    - `id` (string, required)
    - `name` (string, required)
  - `ai_investigation` (object or null, required): The AI investigation report for the incident, or null when there is none to show.
    - `verdict` (string or null, required)
    - `summary` (string or null, required)
    - `evidence_for` (string or array of string, max items 0, required)
    - `evidence_against` (string or array of string, max items 0, required)
    - `used_confirmation` (boolean, required)
    - `confirmation_region` (string, required)
    - `model` (string, required)
  - `monitors` (array of object, required)
    - `monitor_id` (string, required)
    - `name` (string, required)
    - `component_status_at_start` (string or null, required)
    - `component_status_current` (string or null, one of `"up"`, `"down"`, `"degraded"`, `"paused"`, `"maintenance"`, `null`, required): Read from the monitor, not the pivot.
  - `updates` (array of IncidentUpdateResource, required)
    - `id` (string, required)
    - `incident_id` (string, required)
    - `actor` (string, required)
    - `author` (string or null, required)
    - `status` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
    - `message` (string, required)
    - `is_public` (boolean, required)
    - `autonomous` (boolean, required)
    - `display_at` (string, required)
    - `created_at` (string or null, required)
  - `created_at` (string or null, required)
  - `updated_at` (string or null, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 422: Validation error
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Save a postmortem

`POST /incidents/{incident}/postmortem`

Stores the incident's postmortem body; with `publish` set it also appears on the public status page.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/postmortem`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.postmortem`

### Parameters

- `incident` (path, string, required): The incident ID
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Request body

Content type: `application/json`.

- `body` (string, max length 20000, required)
- `publish` (boolean)

### Response 200

Content type: `application/json`.

- `data` (IncidentResource and object, required)
  - `id` (string, required)
  - `team_id` (string, required)
  - `title` (string, required)
  - `title_key` (string or null, required): The translation key of the incident title, sent beside `title`.
  - `title_params` (array of any, required)
  - `lifecycle` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
  - `severity` (string, one of `"critical"`, `"warn"`, `"info"`, required)
  - `impact` (string, one of `"none"`, `"minor"`, `"major"`, `"critical"`, required)
  - `signal_source` (string, one of `"user_threshold"`, `"ai_anomaly"`, `"manual"`, required)
  - `ai_owned` (boolean, required)
  - `primary_monitor_id` (string or null, required)
  - `trigger_metric_key` (string or null, required)
  - `started_at` (string, required)
  - `resolved_at` (string or null, required)
  - `postmortem_body` (string or null, required)
  - `postmortem_published_at` (string or null, required)
  - `assignee` (object, required): The responder the incident is assigned to, or null when it is unassigned.
    - `id` (string, required)
    - `name` (string, required)
  - `ai_investigation` (object or null, required): The AI investigation report for the incident, or null when there is none to show.
    - `verdict` (string or null, required)
    - `summary` (string or null, required)
    - `evidence_for` (string or array of string, max items 0, required)
    - `evidence_against` (string or array of string, max items 0, required)
    - `used_confirmation` (boolean, required)
    - `confirmation_region` (string, required)
    - `model` (string, required)
  - `monitors` (array of object, required)
    - `monitor_id` (string, required)
    - `name` (string, required)
    - `component_status_at_start` (string or null, required)
    - `component_status_current` (string or null, one of `"up"`, `"down"`, `"degraded"`, `"paused"`, `"maintenance"`, `null`, required): Read from the monitor, not the pivot.
  - `updates` (array of IncidentUpdateResource, required)
    - `id` (string, required)
    - `incident_id` (string, required)
    - `actor` (string, required)
    - `author` (string or null, required)
    - `status` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
    - `message` (string, required)
    - `is_public` (boolean, required)
    - `autonomous` (boolean, required)
    - `display_at` (string, required)
    - `created_at` (string or null, required)
  - `created_at` (string or null, required)
  - `updated_at` (string or null, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 422: Validation error
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Post an incident update

`POST /incidents/{incident}/updates`

Appends an update to the incident's timeline, optionally without changing its status.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/updates`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.updates.store`

### Parameters

- `incident` (path, string, required): The incident ID
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Request body

Content type: `application/json`.

- `message` (string, max length 2000, required)
- `is_public` (boolean)
- `status` (IncidentStatus: string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"` or null)

### Response 201

Content type: `application/json`.

- `data` (IncidentUpdateResource, required)
  - `id` (string, required)
  - `incident_id` (string, required)
  - `actor` (string, required)
  - `author` (string or null, required)
  - `status` (string, one of `"detected"`, `"investigating"`, `"identified"`, `"monitoring"`, `"mitigated"`, `"resolved"`, required)
  - `message` (string, required)
  - `is_public` (boolean, required)
  - `autonomous` (boolean, required)
  - `display_at` (string, required)
  - `created_at` (string or null, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 422: Validation error
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Get the AI root-cause analysis

`GET /incidents/{incident}/analysis`

The AI summary of the incident's likely root cause.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/analysis`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:read`
- Tag: Incidents
- operationId: `v1.incidents.analysis`

### Parameters

- `incident` (path, string, required): The incident ID
- `refresh` (query, boolean)

### Response 200

Content type: `application/json`.

- `data` (object, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Rate the AI analysis

`POST /incidents/{incident}/analysis/feedback`

Records a rating of the stored analysis.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/analysis/feedback`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.analysis.feedback`

### Parameters

- `incident` (path, string, required): The incident ID
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Request body

Content type: `application/json`.

- `analysis_id` (string, required)
- `helpful` (boolean, required)

### Response 200

Content type: `application/json`.

- `data` (object, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 422: Validation error
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Draft a status update with AI

`POST /incidents/{incident}/draft-update`

Drafts the next public status update for the incident. Stores nothing and spends AI budget.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/draft-update`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.draft.update`

### Parameters

- `incident` (path, string, required): The incident ID
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Response 200

Content type: `application/json`.

- `data` (object, required)
  - `draft` (string or null, required)
  - `degrade_reason` (string or null, one of `"budget_exhausted"`, `"output_untrusted"`, `"service_unreachable"`, `null`, required)
  - `nothing_to_say` (boolean, required): A THIRD outcome, and not a degrade: nothing failed, there is simply nothing a customer could be told.

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Draft a postmortem with AI

`POST /incidents/{incident}/draft-postmortem`

Drafts the postmortem of a resolved incident. Stores nothing and spends AI budget.

- URL: `https://api.uptizm.com/v1/incidents/{incident}/draft-postmortem`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.incidents.draft.postmortem`

### Parameters

- `incident` (path, string, required): The incident ID
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Response 200

Content type: `application/json`.

- `data` (object, required)
  - `draft` (string or null, required)
  - `degrade_reason` (string or null, one of `"budget_exhausted"`, `"output_untrusted"`, `"service_unreachable"`, `null`, required)
  - `nothing_to_say` (boolean, required): A THIRD outcome, and not a degrade: nothing failed, there is simply nothing a customer could be told.

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 404: Not found
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Accept an AI suggestion

`POST /ai-suggestions/{suggestion}/accept`

Turns a pending AI suggestion into an incident and returns the incident id.

- URL: `https://api.uptizm.com/v1/ai-suggestions/{suggestion}/accept`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.ai-suggestions.accept`

### Parameters

- `suggestion` (path, string, required): Primary key of the suggestion to accept.
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Response 200

Content type: `application/json`.

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md

## Dismiss an AI suggestion

`POST /ai-suggestions/{suggestion}/dismiss`

Dismisses a pending AI suggestion so it leaves the inbox.

- URL: `https://api.uptizm.com/v1/ai-suggestions/{suggestion}/dismiss`
- Auth: `Authorization: Bearer upz_...`
- Required ability (`x-required-ability`): `incidents:write`
- Tag: Incidents
- operationId: `v1.ai-suggestions.dismiss`

### Parameters

- `suggestion` (path, string, required): Primary key of the suggestion to dismiss.
- `Idempotency-Key` (header, string): Any unique string per logical request.

### Response 200

Content type: `application/json`.

- `data` (object, required)
  - `status` (string, required)

### Errors

- 401: Unauthenticated
- 403: The key lacks the ability this endpoint requires (`required_ability` names it), or the action is not allowed for the team.
- 429: Rate limited. Each key may make 120 reads (GET) and 30 writes per minute; wait for `Retry-After` seconds.

Error bodies: https://uptizm.com/docs/errors.md. Rate limits: https://uptizm.com/docs/rate-limits.md. Idempotency: https://uptizm.com/docs/idempotency.md
