# API reference

Use the API to create incidents from alerts, add timeline events and keep your service catalog up to date. Every endpoint is listed with the scope it needs and a request you can copy.

> Generated from the same canonical API contract as the human-readable reference at https://tellagen.com/api-reference.

Documentation contract: `sha256:63dc6b7fc3f36cc5712390f64b44503ecbcd0cbc770a026e742334cf794fead3`. This fingerprint identifies the generated documentation contract, not the API major version.

## Endpoint index

### Postmortems

[Postmortems Markdown export](https://tellagen.com/api-reference/postmortems/markdown)

- [`GET /api/v1/postmortems/{versionId}/render`](https://tellagen.com/api-reference/postmortems#postmortems-endpoint-get-api-v1-postmortems-versionid-render) — Render a submitted postmortem
- [`GET /api/v1/postmortems/{versionId}/assets/{name}`](https://tellagen.com/api-reference/postmortems#postmortems-endpoint-get-api-v1-postmortems-versionid-assets-name) — Download a file of a submitted postmortem
- [`GET /api/v1/postmortems/versions`](https://tellagen.com/api-reference/postmortems#postmortems-endpoint-get-api-v1-postmortems-versions) — List submitted postmortem versions after a cursor
- [`GET /api/v1/incidents/{id}/postmortem/versions`](https://tellagen.com/api-reference/postmortems#postmortems-endpoint-get-api-v1-incidents-id-postmortem-versions) — List the submitted postmortem versions of an incident after a cursor
- [`GET /api/v1/incidents/{id}/postmortem/versions/{versionId}/export`](https://tellagen.com/api-reference/postmortems#postmortems-endpoint-get-api-v1-incidents-id-postmortem-versions-versionid-export) — Download a postmortem version as a zip
- [`PUT /api/v1/incidents/{id}/postmortem/external-copies/{target_key}`](https://tellagen.com/api-reference/postmortems#postmortems-endpoint-put-api-v1-incidents-id-postmortem-external-copies-target-key) — Report where a receiver copied a postmortem

## Base URL

`https://{company}.api.tellagen.com/api/v1/`

Replace `{company}` with your company subdomain. Requests and JSON responses use `application/json` unless an endpoint documents an empty response.

## Authentication

Create an API token in **Settings > API keys** and send it as a Bearer token:

`Authorization: Bearer tllg_YOUR_TOKEN`

Tokens are shown only once when created. Grant only the scopes the client needs.

## Integration guides

- [Your first request](https://tellagen.com/api-reference#first-request)
- [Retries and updates](https://tellagen.com/api-reference#reliable-requests)
- [Rate limits](https://tellagen.com/api-reference/guides/rate-limits)
- [Filter and paginate collections](https://tellagen.com/api-reference/guides/pagination)
- [Create and move an incident through its workflow](https://tellagen.com/api-reference/guides/workflows)
- [Send custom-field values](https://tellagen.com/api-reference/guides/field-values)
- [Receive webhooks (preview)](https://tellagen.com/api-reference/guides/webhooks)

## Versioning

All endpoints in this reference use `/api/v1` and are supported.

**Compatible changes.** Tellagen can add optional response fields or enum values. Ignore response fields that your client does not use.

**Breaking changes.** Tellagen uses a new major version for incompatible changes.

**Deprecated endpoints.** Tellagen marks an endpoint deprecated at least 180 days before removal. Deprecated responses identify the replacement endpoint.

## Scopes

| Scope | Description |
| --- | --- |
| `incidents:read` | List and retrieve incidents, and discover writable workflow statuses and severities. Reading an incident requires the view_all_incidents role permission for the key owner. |
| `incidents:write` | Create and update incidents and timeline events. Requires an active responder seat for the key owner. Changing an existing incident also requires the view_all_incidents role permission. |
| `slack_context:read` | Read Slack context collected for incident investigation |
| `services:read` | List and retrieve services, and discover writable service tiers |
| `services:write` | Create, update, and archive services. Requires an active responder seat and the manage_settings role permission. |
| `teams:read` | List and retrieve teams and members |
| `teams:write` | Create, update, and archive teams; manage members. Requires an active responder seat and the manage_teams role permission. |
| `custom_fields:read` | List and retrieve custom field definitions and values |
| `custom_fields:write` | Create, update, and archive custom fields; set incident field values. Definition changes require the manage_settings role permission. Incident value changes require an active responder seat. |
| `webhooks:manage` | Create, pause, resume, revoke, and rotate workspace webhook subscriptions. Requires the manage_settings role permission. |
| `customer_revenue:read` | Read customer revenue and financial impact. Requires the view_customer_revenue role permission and an active key owner membership. |
| `status_updates:email` | Email recorded status updates to the workspace's email groups (never to typed-in addresses). Not granted by default. Requires an active responder seat for the key owner and incidents:write. |

## Prerequisite definitions

- **Active responder seat** (`active_responder`): The API key owner must have an active responder seat.
- **View all incidents** (`view_all_incidents`): The API key owner must have the view_all_incidents role permission. Admins and workspace owners always have it.
- **Manage workspace settings** (`manage_settings`): The API key owner must have the manage_settings role permission.
- **Manage teams** (`manage_teams`): The API key owner must have the manage_teams role permission.
- **Incident is not archived** (`mutable_incident`): The incident must not be archived. Workflow-state restrictions are described by each operation.
- **Linked Slack channel** (`slack_channel`): The incident must have a linked Slack channel.

## Errors

Errors always include a stable `code` and a human-readable `message`. They can also include `field`, `details`, and `request_id`.

You can send `X-Request-ID` with a request. If you omit it, the API generates one. The response header and error body return the same value.

### Missing scope (403)

```json
{
  "code": "missing_scope",
  "message": "insufficient scope: incidents:write required",
  "details": {
    "required_scope": "incidents:write"
  },
  "request_id": "01JEXAMPLE8R4N5W6Y7Z"
}
```

### Stale resource version (412)

```json
{
  "code": "precondition_failed",
  "message": "the resource changed; fetch it again and retry with the current resource version",
  "field": "If-Tellagen-Resource-Version",
  "request_id": "01JEXAMPLE8R4N5W6Y7Z"
}
```

### Rate limit (429)

```json
{
  "code": "rate_limited",
  "message": "rate limit exceeded",
  "details": {
    "retry_after_seconds": 1
  },
  "request_id": "01JEXAMPLE8R4N5W6Y7Z"
}
```

When you contact support, include the request ID, method, path, status, and time. Omit tokens and private request bodies.

| Code | Meaning | Next action | Retry |
| --- | --- | --- | --- |
| `authentication_required` | The request has no valid API token or session. | Send an active Bearer token for this workspace. Replace an expired or revoked key. | After correcting authentication. |
| `missing_scope` | The token lacks the scope named in details.required_scope. | Read details.required_scope. Ask a workspace manager for a replacement key with that scope. | After correcting access. |
| `responder_seat_required` | The key owner needs the seat named in details.required_seat. | Ask a workspace manager to review the key owner’s responder seat. | After correcting access. |
| `missing_role_permission` | The key owner lacks details.required_permission or one of details.required_roles. | Ask a workspace manager to review the owner’s role and the permission named in details. | After correcting access. |
| `permission_denied` | Access is denied without exposing private authorization state. | Verify the workspace, key owner, and resource access with a workspace manager. | After correcting access. |
| `invalid_resource_state` | The operation is not valid for the current resource state. | Read the current resource. Restore an archived resource or choose an operation allowed in its current state. | After reconciling state. |
| `invalid_relationship_state` | Restore requires a retained owner or parent relationship to identify an active resource. | Restore the retained parent or owning team before restoring this resource. | After correcting the relationship. |
| `required_fields_missing` | The incident cannot be resolved or closed while a field required at that stage is empty. details.stage is resolve or close. | Read details.fields for each empty field. Send its value in custom_fields with the request, or fill the field first. | After the fields have values. |
| `field_value_synced` | A sync fills this field, so it is read only. Nothing in the request was saved. | Leave the field out of the request. Change the source it comes from, not the value in Tellagen. | After removing the field from the request. |
| `incident_change_requires_person` | A personal diagnosis key cannot make this change. Workspace keys are not limited this way. | Leave the field out. A person closes, reopens and sets the severity and the customer impact of an incident in Tellagen. | Not until a person with the right access does it in Tellagen. |
| `duplicate_slug` | A team already uses the requested slug. | Read the existing team or choose a different slug. | After changing the request. |
| `invalid_json` | The request body is not one valid JSON document. | Send one valid JSON object with Content-Type: application/json. | After correcting the body. |
| `unknown_field` | The request contains an unsupported JSON property named in field. | Remove or correct the property named in field. Use the request schema, not the response schema. | After correcting the body. |
| `request_body_too_large` | The request body is larger than 1 MiB. The status is 413. | Reduce the body to 1 MiB or less. | After reducing the body. |
| `multiple_json_values` | The request body contains more than one JSON document. | Send one JSON document rather than concatenated documents. | After correcting the body. |
| `idempotency_key_reused` | The key was already used with different request content. | Recover the original request for this key. Use a new key only for a different intended operation. | Do not resend changed content with the same key. |
| `idempotency_in_progress` | An equal request with this key is still running. Retry later. | Wait for Retry-After, then resend the identical body with the same key. | After the indicated delay. |
| `idempotency_outcome_unknown` | An earlier request may have completed, but its result could not be stored. Do not retry it automatically. | Read the resource state and contact support with the request ID before deciding whether to create again. | Never retry automatically. |
| `precondition_required` | An API-key PATCH request omitted If-Tellagen-Resource-Version. | Read the resource, then send its Tellagen-Resource-Version as If-Tellagen-Resource-Version. | After adding the current version. |
| `invalid_precondition` | If-Tellagen-Resource-Version is not a positive integer. | Use the positive integer version returned for this resource. Do not use an ETag or a timestamp. | After correcting the header. |
| `precondition_failed` | The resource changed after the client read it. | Read the resource again. Reconcile your intended change with the current state before using its new version. | After reconciling the change. |
| `rate_limited` | Retry after details.retry_after_seconds or the Retry-After header. | Wait for Retry-After or details.retry_after_seconds. Limit concurrency across the workspace. | After the indicated delay, with the original idempotency key where supported. |
| `internal` | The server failed without exposing an internal error. | Keep the request ID. Read current state before retrying a write whose outcome is uncertain. | Retry reads with bounded backoff. Follow operation-specific rules for writes. |
| `invalid_slack_channel_name_request` | The channel-name request is invalid. | Use custom mode with name, or workspace_template mode without name. | After correcting the request. |
| `invalid_window` | The run window breaks a rule. | Send a start before the end, no more than 30 days, not in the future, and a baseline_days of 0, 1, 7 or 30. Or leave window out. | After correcting the window. |
| `invalid_format` | The render format is missing or not one the route knows. | Send format as html, markdown, tiptap_json, confluence_storage or notion_blocks. | After correcting the format. |
| `invalid_redaction` | The redaction value is not one the route knows. | Send redaction as auto or financial, or leave it out. | After correcting the value. |
| `customer_revenue_permission_denied` | The key owner may not read customer revenue, and the request asked to keep financial values. | Leave out redaction=financial to get the redacted render, or use a key whose owner may view customer revenue. | After correcting access or the request. |
| `postmortem_not_renderable` | The version is a draft, an assistant version or a legacy import, or its document cannot be read. | Render a submitted version. List them to find one. | After choosing a submitted version. |
| `invalid_asset_name` | The file name is not a content name. | Use a name from the attachments of a render: a SHA-256 in hex, a dot and an extension. | After correcting the name. |
| `postmortem_asset_not_found` | The version has no file with this name. | Render the version again and use a name from its attachments list. | After rendering the version again. |
| `invalid_kind` | The version kind is not one the list knows. | Send kind as submitted, or leave it out. | After correcting the kind. |
| `invalid_cursor` | The cursor is not one this list gave. | Send the next_cursor of the last page unchanged, or leave after out to start again. | After correcting the cursor. |
| `invalid_limit` | The limit is not a whole number in the allowed range. | Send a limit from 1 to 50. | After correcting the limit. |
| `invalid_target_key` | The receiver name has a character it may not have. | Use letters, digits and dashes, up to 63 characters. | After correcting the name. |
| `reserved_target_key` | The receiver name belongs to a built-in copy. | Choose another name. confluence and notion are taken. | After choosing another name. |
| `invalid_url` | The address of the copy is not a usable https address. | Send a full https address, or leave url out. | After correcting the address. |
| `slack_not_configured` | The workspace has no usable Slack integration. | Ask a workspace manager to connect or repair Slack. | After repairing the integration. |
| `incident_slack_channel_missing` | The incident has no linked Slack channel. | Link a channel through the incident workspace before requesting a rename. | After linking a channel. |
| `slack_channel_not_found` | Slack cannot find the linked channel. | Verify the channel still exists and that the integration can access it. | After repairing channel access. |
| `slack_channel_name_taken` | Another Slack channel uses the requested name. | Choose another custom name or revise the workspace naming template. | After choosing an available name. |
| `already_taken` | Another person already holds or just took this team-owned action. | Read the action to see who holds it before deciding what to do. | After reading the current owner. |
| `already_members` | Some of the people in an add-team-members request are already in the team. Nothing was added. | Read details.user_ids, remove those people from the request, and send it again. Use the update member route to change a role. | After removing the people who are already members. |
| `team_archived` | The team that owns or would own the action is archived. | Choose an active team, or restore the team first. | After choosing another team. |
| `invalid_idempotency_key` | The idempotency key has an invalid length or character. | Use 1–128 visible, non-space ASCII characters. A UUID is suitable. | After correcting the key. |
| `invalid_block` | A widget in the event's blocks is not valid: an unknown type, a value outside its range, or a limit exceeded. | Read details.errors for the path of each bad field, correct that block and send the request again. | After correcting the block. |
| `invalid_executor` | The executor fields of the run do not fit together. | Send executor local, or executor cloud with no id and no execution_mode. Tellagen sets agent_name and model_used for a cloud run. | After correcting the executor fields. |
| `investigation_run_id_taken` | The id you sent already names a run that you did not create on this incident. | Choose a new id for the run, or leave the id out. An id that a run of another caller or another incident already uses cannot be reused. | After choosing another id. |
| `cloud_diagnosis_disabled` | The workspace does not have the cloud_diagnosis feature. | Ask a workspace manager to turn on cloud diagnosis, or start the run with executor local. | After the feature is on. |
| `proxy_not_found` | The proxy_id does not name a proxy in this workspace. | List the proxies of the workspace and send the id of one of them, or omit proxy_id. | After correcting proxy_id. |
| `proxy_revoked` | The chosen proxy was revoked and can no longer be used. | Choose another proxy, or ask a workspace manager to set up a new one. | After choosing a proxy that is not revoked. |
| `proxy_offline` | The chosen proxy is not online. | Start the proxy in your network and wait until it shows as online, or choose another proxy. | After the proxy is online. |
| `no_proxy_online` | No proxy in the workspace is online, GitHub is not connected, and the request did not ask to run without Grafana. | Start a proxy in your network, or send without_grafana to run with the timeline and Slack only. | After a proxy is online, or with without_grafana. |
| `no_datasource_allowed` | The chosen proxy allows no datasource. | Ask a workspace manager to allow at least one datasource on the proxy, or choose another proxy. | After a datasource is allowed. |
| `no_source_available` | No proxy can run a query and GitHub has no repository Tellagen may read for this run. No run is created and no credits are held. | Start a proxy in your network, connect GitHub and set the repositories of the incident's services, or send without_grafana. The details name what was checked, with a code each for proxy and github. | After a proxy is online or GitHub can be read, or with without_grafana. |
| `ai_credits_exhausted` | The workspace has too few AI credits left for a cloud run. | Ask a workspace manager to add AI credits. No run is created and no credits are held. | After credits are added. |
| `ai_credits_unavailable` | Tellagen cannot check the AI credit balance now. | Wait a short time and send the request again. No run is created and no credits are held. | After a short delay. |

| Status | Meaning |
| --- | --- |
| `400` | Bad Request — invalid input or missing required fields. The message says what to correct. |
| `401` | Unauthorized — missing or invalid token |
| `403` | Forbidden — insufficient scope or responder access |
| `404` | Not Found — resource does not exist |
| `409` | Conflict — resource state prevents the request |
| `412` | Precondition Failed — the supplied resource version is stale |
| `413` | Content Too Large — the request body is over the limit |
| `428` | Precondition Required — this operation needs If-Tellagen-Resource-Version |
| `429` | Too Many Requests — rate limit exceeded |
| `500` | Internal Server Error |

Authenticated requests share a workspace limit. Anonymous requests and failed authentication attempts use the trusted client IP. Responses include `X-RateLimit-Limit` and `X-RateLimit-Remaining`. A `429` response also includes `Retry-After`.

## Postmortems

Read a submitted postmortem as HTML, Markdown, Tiptap JSON or Confluence storage format, fetch its images and chart pictures, list the versions a receiver missed, and report where a receiver copied it.

### `GET /api/v1/postmortems/{versionId}/render`

**Render a submitted postmortem.** Returns one submitted postmortem version as HTML, Markdown, Tiptap JSON, Confluence storage format or Notion blocks. All formats come from the same document, so they share one `content_sha256`. A draft, an assistant version and a legacy import answer 404.

The API key decides what you can read. With `redaction=auto` (the default), the answer leaves out the financial values (revenue, MRR and ARR, billing, subscription, price, invoice, currency and money fields) unless the key has `customer_revenue:read` and its owner may view customer revenue. With `redaction=financial` the answer keeps them, and a key without that access gets 403 `customer_revenue_permission_denied`. The field `redaction` says what was done: `redacted` or `unredacted`. Free text that a person typed is not changed.

`html` is one page that makes no request: its images are `data:` addresses and its charts are inline SVG. `markdown` is GitHub-flavoured Markdown with widgets as tables. A chart is an image reference plus a table of its numbers. `tiptap_json` is the document as JSON text. `confluence_storage` is the page the built-in Confluence publish writes. `notion_blocks` is the page the built-in Notion publish writes, as JSON text: an array of requests. Each request is `{parent_key, block_keys, blocks}`. Send them in order, the first under the page and a later one under the block whose key it names (`parent_key`, from the `block_keys` of an earlier request). An image block holds the file upload id `tellagen-upload:<sha256>`. Upload the attachment with that `sha256` to the Notion file upload API and put the id Notion gives in its place. A file of a free Notion plan can be 5 MiB at most. The `notion_blocks` format is a preview inside this preview.

`attachments` lists the files the body refers to (`image`, `chart`), with a link that works without a key for one hour (`url`, `expires_at`). Upload them by `name`, which is `<sha256>.<ext>`. A chart also names its `numbers.json` (`numbers_name`, `numbers_url`). A body of `html` has no attachments. `degraded` lists what the render could not draw.

The `ETag` is the `content_sha256`. A request with a matching `If-None-Match` answers 304. The links in a body you kept stop working after one hour, and a 304 gives no new links. When you need fresh links, ask again without the header, or fetch each file by name with your key from the assets route.

This API is in preview. Tellagen can change it before it becomes supported.


Required scope: `incidents:read`

Operation ID: `renderPostmortemVersion`
Contract: `preview`
Retry guidance: You can repeat this request. If the API returns 429, wait for Retry-After. Set a maximum number of attempts.
Prerequisites: View all incidents

#### Path parameters

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `versionId` | `integer` | Yes | The ID of a submitted postmortem version, as the version lists and webhook events give it. Minimum: 1. |

#### Query parameters

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `format` | `string` | Yes | The format of `body`. Allowed values: `"html"` \| `"markdown"` \| `"tiptap_json"` \| `"confluence_storage"` \| `"notion_blocks"` |
| `redaction` | `string` | No | `auto` removes financial values unless the key may read customer revenue. `financial` keeps them and needs `customer_revenue:read`. Default: "auto". Allowed values: `"auto"` \| `"financial"` |

#### Request headers

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `If-None-Match` | `string` | No | The `ETag` of a render you already hold. |

#### Example request

Replace `{company}`, `<token>`, and any other placeholders with your values.

```bash
curl --request GET \
  --url 'https://{company}.api.tellagen.com/api/v1/postmortems/{versionId}/render' \
  --header 'Authorization: Bearer <token>' \
  --get \
  --data-urlencode 'format=<format>'
```

#### Success response

Status: `200 OK`

#### Response fields

Returned means the field is present when its parent object is present. A nullable field can contain null.

| Name | Type | Returned | Description |
| --- | --- | --- | --- |
| `format` | `string` | Always | The format of `body`. Possible values: `"html"` \| `"markdown"` \| `"tiptap_json"` \| `"confluence_storage"` \| `"notion_blocks"` |
| `schema_version` | `integer` | Always | The version of this response shape. Possible values: `1` |
| `version` | `object` | Always | The postmortem version that was rendered. |
| `version.id` | `integer` | Always | The postmortem version ID. |
| `version.label` | `string` | Always | The version label |
| `version.incident_id` | `integer` | Always | The incident ID. |
| `redaction` | `string` | Always | `redacted` when financial values were removed, `unredacted` when they were kept. Possible values: `"redacted"` \| `"unredacted"` |
| `content_sha256` | `string` | Always | The hash of the content in this redaction. It is the same for every format. Two redactions of one version have two hashes. Pattern: ^[0-9a-f]{64}$. |
| `body` | `string` | Always | The version in the requested format. For `tiptap_json` it is JSON text. |
| `attachments` | `object[]` | Always | The files the body refers to. Empty for `html`. |
| `attachments[].name` | `string` | Always | `<sha256>.<ext>`. Upload the file under this name. |
| `attachments[].sha256` | `string` | Always | The SHA-256 of the file bytes. Pattern: ^[0-9a-f]{64}$. |
| `attachments[].content_type` | `string` | Always | The content type of the file. |
| `attachments[].kind` | `string` | Always | An image of the postmortem, or the PNG of a chart widget. Possible values: `"image"` \| `"chart"` |
| `attachments[].url` | `string` | Optional | A link that needs no API key. It is left out when the workspace cannot sign links. |
| `attachments[].expires_at` | `string (RFC 3339)` | Optional | When `url` stops working. It is one hour after the answer. |
| `attachments[].numbers_name` | `string` | Optional | The name of the `numbers.json` of a chart. |
| `attachments[].numbers_url` | `string` | Optional | A link for the `numbers.json` of a chart. |
| `degraded` | `object[]` | Always | What the render could not draw or had to change. |
| `degraded[].code` | `string` | Always | A stable code, such as `image_unavailable`, `unsafe_link`, `unknown_mark`, `widget_text_only`, `chart_not_drawn` or `table_cells_merged`. |
| `degraded[].detail` | `string` | Optional | A short explanation. |
| `degraded[].path` | `string` | Optional | Where in the document it happened. |

Returns the render.

```json
{
  "format": "markdown",
  "schema_version": 1,
  "version": {
    "id": 41,
    "label": "2.1",
    "incident_id": 42
  },
  "redaction": "redacted",
  "content_sha256": "9f2c1e7a4b6d8035a1c7e9f0b2d4a6c8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9",
  "body": "# Checkout timeouts\n\n*Published from Tellagen: INC-42, version 2.1.*\n\n## Impact\n\n![Error rate](a3f1c2d4e5b60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90.png)\n",
  "attachments": [
    {
      "name": "a3f1c2d4e5b60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90.png",
      "sha256": "a3f1c2d4e5b60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90",
      "content_type": "image/png",
      "kind": "image",
      "url": "https://tuulekell.api.tellagen.com/api/v1/postmortem-assets/41/a3f1c2d4e5b60718293a4b5c6d7e8f90a1b2c3d4e5f60718293a4b5c6d7e8f90.png?c=5&e=1794000000&r=f&s=signature",
      "expires_at": "2026-11-16T11:00:00Z"
    }
  ],
  "degraded": []
}
```

#### Response headers

Returned means the field is present when its parent object is present. A nullable field can contain null.

| Name | Type | Returned | Description |
| --- | --- | --- | --- |
| `ETag` | `string` | Always | The `content_sha256` in quotes. |

#### Endpoint error responses

Endpoint-specific codes: `invalid_format`, `invalid_redaction`, `customer_revenue_permission_denied`, `postmortem_not_renderable`

| Status | Meaning |
| --- | --- |
| `400` | The API rejected the request because its syntax or one of its values is invalid. |
| `401` | The request does not contain valid authentication. |
| `403` | Authentication succeeded, but the caller lacks the required API scope or workspace permission. |
| `404` | The requested resource does not exist or is not available to the caller. |
| `409` | The request conflicts with the current resource state. idempotency_key_reused means that the key belongs to different request content. idempotency_in_progress means that an identical request is still in progress. idempotency_outcome_unknown means that an earlier request may have completed, but its result could not be stored and must not be retried automatically. |
| `429` | The request exceeded an applicable sliding limit. Free API keys allow 20 requests per second and 600 requests per 60 seconds. Team and Scale API keys allow 100 requests per second and 3,000 requests per 60 seconds. Browser users allow 100 requests per second. Browser company allows 500 requests per second and 5,000 requests per 10 seconds. Browser company means the sum of user traffic for one company. Anonymous client IPs allow 20 requests per second and 200 requests per 10 seconds. The rate limiter does not count requests that it rejects. |
| `500` | An internal server error prevented completion of the request. |

### `GET /api/v1/postmortems/{versionId}/assets/{name}`

**Download a file of a submitted postmortem.** Returns one file of a submitted version: an image, the picture of a chart (PNG or SVG), or a chart's `numbers.json`. The `name` is `<sha256>.<ext>`, as listed in `attachments` of the render. Charts are drawn when you ask and are never stored.

The files in a render also come with a link that needs no API key: `GET /api/v1/postmortem-assets/{versionId}/{name}` with the query `c`, `e`, `r` and `s` that the render gave. The link works for one hour for that one file, version and redaction. After that, or when it is changed, it answers 403 `postmortem_asset_link_invalid`.

Every answer has `Cache-Control: private, no-store` and `X-Content-Type-Options: nosniff`. This API is in preview.


Required scope: `incidents:read`

Operation ID: `getPostmortemAsset`
Contract: `preview`
Retry guidance: You can repeat this request. If the API returns 429, wait for Retry-After. Set a maximum number of attempts.
Prerequisites: View all incidents

#### Path parameters

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `versionId` | `integer` | Yes | The ID of a submitted postmortem version, as the version lists and webhook events give it. Minimum: 1. |
| `name` | `string` | Yes | The file name, a SHA-256 in hex and an extension. Pattern: ^[0-9a-f]{64}\.(png\|jpg\|webp\|gif\|svg\|json)$. |

#### Query parameters

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `redaction` | `string` | No | The same values as the render. Use the value of the render that listed the file. Default: "auto". Allowed values: `"auto"` \| `"financial"` |

#### Example request

Replace `{company}`, `<token>`, and any other placeholders with your values.

```bash
curl --request GET \
  --url 'https://{company}.api.tellagen.com/api/v1/postmortems/{versionId}/assets/{name}' \
  --header 'Authorization: Bearer <token>'
```

#### Success response

Status: `200 OK`

No response body.

#### Endpoint error responses

Endpoint-specific codes: `invalid_asset_name`, `invalid_redaction`, `postmortem_asset_not_found`

| Status | Meaning |
| --- | --- |
| `400` | The API rejected the request because its syntax or one of its values is invalid. |
| `401` | The request does not contain valid authentication. |
| `403` | Authentication succeeded, but the caller lacks the required API scope or workspace permission. |
| `404` | The requested resource does not exist or is not available to the caller. |
| `409` | The request conflicts with the current resource state. idempotency_key_reused means that the key belongs to different request content. idempotency_in_progress means that an identical request is still in progress. idempotency_outcome_unknown means that an earlier request may have completed, but its result could not be stored and must not be retried automatically. |
| `429` | The request exceeded an applicable sliding limit. Free API keys allow 20 requests per second and 600 requests per 60 seconds. Team and Scale API keys allow 100 requests per second and 3,000 requests per 60 seconds. Browser users allow 100 requests per second. Browser company allows 500 requests per second and 5,000 requests per 10 seconds. Browser company means the sum of user traffic for one company. Anonymous client IPs allow 20 requests per second and 200 requests per 10 seconds. The rate limiter does not count requests that it rejects. |
| `500` | An internal server error prevented completion of the request. |

### `GET /api/v1/postmortems/versions`

**List submitted postmortem versions after a cursor.** Lists the submitted versions of the whole workspace in submit order, oldest first. Webhook events are kept for seven days. A receiver that was down longer, or a script that polls, uses this list to find every version it missed. Store the `next_cursor` of the last page you handled and send it as `after`.

The order is the version ID. A version whose transaction commits late can appear after a later one you already read, so a receiver that polls also checks the last few versions again, or reads a few minutes behind. Each item has the `content_sha256` that a render with the same key would give. `next_cursor` is null on the last page. This API is in preview.


Required scope: `incidents:read`

Operation ID: `listSubmittedPostmortemVersions`
Contract: `preview`
Retry guidance: You can repeat this request. If the API returns 429, wait for Retry-After. Set a maximum number of attempts.
Prerequisites: View all incidents

#### Query parameters

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | `string` | No | The kind of version. Only `submitted` is listed. Default: "submitted". Allowed values: `"submitted"` |
| `after` | `string` | No | The `next_cursor` of the last page you handled. Omit it to start at the first version. Maximum length: 64 characters. |
| `limit` | `integer` | No | The most versions to return. Minimum: 1. Maximum: 50. Default: 20. |

#### Example request

Replace `{company}`, `<token>`, and any other placeholders with your values.

```bash
curl --request GET \
  --url 'https://{company}.api.tellagen.com/api/v1/postmortems/versions' \
  --header 'Authorization: Bearer <token>'
```

#### Success response

Status: `200 OK`

#### Response fields

Returned means the field is present when its parent object is present. A nullable field can contain null.

| Name | Type | Returned | Description |
| --- | --- | --- | --- |
| `versions` | `object[]` | Always | The versions of this page, oldest first. |
| `versions[].id` | `integer` | Always | The postmortem version ID. |
| `versions[].incident_id` | `integer` | Always | The incident ID. |
| `versions[].label` | `string` | Always | The version label |
| `versions[].content_sha256` | `string` | Always | The hash a render with the same key gives. It is empty when the version has no document that can be read. |
| `versions[].created_at` | `string (RFC 3339)` | Always | When the version was submitted. |
| `next_cursor` | `string \| null` | Always | Send it as `after` to read the next page. It is null on the last page. |

Returns one page of versions.

```json
{
  "versions": [
    {
      "id": 41,
      "incident_id": 42,
      "label": "2.1",
      "content_sha256": "9f2c1e7a4b6d8035a1c7e9f0b2d4a6c8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9",
      "created_at": "2026-11-14T10:12:00Z"
    }
  ],
  "next_cursor": "djE6NDE"
}
```

#### Endpoint error responses

Endpoint-specific codes: `invalid_kind`, `invalid_cursor`, `invalid_limit`

| Status | Meaning |
| --- | --- |
| `400` | The API rejected the request because its syntax or one of its values is invalid. |
| `401` | The request does not contain valid authentication. |
| `403` | Authentication succeeded, but the caller lacks the required API scope or workspace permission. |
| `404` | The requested resource does not exist or is not available to the caller. |
| `409` | The request conflicts with the current resource state. idempotency_key_reused means that the key belongs to different request content. idempotency_in_progress means that an identical request is still in progress. idempotency_outcome_unknown means that an earlier request may have completed, but its result could not be stored and must not be retried automatically. |
| `429` | The request exceeded an applicable sliding limit. Free API keys allow 20 requests per second and 600 requests per 60 seconds. Team and Scale API keys allow 100 requests per second and 3,000 requests per 60 seconds. Browser users allow 100 requests per second. Browser company allows 500 requests per second and 5,000 requests per 10 seconds. Browser company means the sum of user traffic for one company. Anonymous client IPs allow 20 requests per second and 200 requests per 10 seconds. The rate limiter does not count requests that it rejects. |
| `500` | An internal server error prevented completion of the request. |

### `GET /api/v1/incidents/{id}/postmortem/versions`

**List the submitted postmortem versions of an incident after a cursor.** With `kind`, `after` or `limit`, lists the submitted versions of one incident in submit order, in the same shape as the workspace list. Without any of the three, the route returns the full versions that the Tellagen web app reads. That shape is not part of this reference.

This API is in preview.


Required scope: `incidents:read`

Operation ID: `listIncidentPostmortemVersions`
Contract: `preview`
Retry guidance: You can repeat this request. If the API returns 429, wait for Retry-After. Set a maximum number of attempts.
Prerequisites: View all incidents

#### Path parameters

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | Yes | A positive numeric incident ID returned by this API. The permanent incident reference is suitable for stored references and external links. Minimum: 1. |

#### Query parameters

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `kind` | `string` | No | The kind of version. Only `submitted` is listed. Default: "submitted". Allowed values: `"submitted"` |
| `after` | `string` | No | The `next_cursor` of the last page you handled. Omit it to start at the first version. Maximum length: 64 characters. |
| `limit` | `integer` | No | The most versions to return. Minimum: 1. Maximum: 50. Default: 20. |

#### Example request

Replace `{company}`, `<token>`, and any other placeholders with your values.

```bash
curl --request GET \
  --url 'https://{company}.api.tellagen.com/api/v1/incidents/{id}/postmortem/versions' \
  --header 'Authorization: Bearer <token>'
```

#### Success response

Status: `200 OK`

#### Response fields

Returned means the field is present when its parent object is present. A nullable field can contain null.

| Name | Type | Returned | Description |
| --- | --- | --- | --- |
| `versions` | `object[]` | Always | The versions of this page, oldest first. |
| `versions[].id` | `integer` | Always | The postmortem version ID. |
| `versions[].incident_id` | `integer` | Always | The incident ID. |
| `versions[].label` | `string` | Always | The version label |
| `versions[].content_sha256` | `string` | Always | The hash a render with the same key gives. It is empty when the version has no document that can be read. |
| `versions[].created_at` | `string (RFC 3339)` | Always | When the version was submitted. |
| `next_cursor` | `string \| null` | Always | Send it as `after` to read the next page. It is null on the last page. |

Returns one page of versions.

```json
{
  "versions": [
    {
      "id": 41,
      "incident_id": 42,
      "label": "2.1",
      "content_sha256": "9f2c1e7a4b6d8035a1c7e9f0b2d4a6c8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9",
      "created_at": "2026-11-14T10:12:00Z"
    }
  ],
  "next_cursor": null
}
```

#### Endpoint error responses

Endpoint-specific codes: `invalid_kind`, `invalid_cursor`, `invalid_limit`

| Status | Meaning |
| --- | --- |
| `400` | The API rejected the request because its syntax or one of its values is invalid. |
| `401` | The request does not contain valid authentication. |
| `403` | Authentication succeeded, but the caller lacks the required API scope or workspace permission. |
| `404` | The requested resource does not exist or is not available to the caller. |
| `409` | The request conflicts with the current resource state. idempotency_key_reused means that the key belongs to different request content. idempotency_in_progress means that an identical request is still in progress. idempotency_outcome_unknown means that an earlier request may have completed, but its result could not be stored and must not be retried automatically. |
| `429` | The request exceeded an applicable sliding limit. Free API keys allow 20 requests per second and 600 requests per 60 seconds. Team and Scale API keys allow 100 requests per second and 3,000 requests per 60 seconds. Browser users allow 100 requests per second. Browser company allows 500 requests per second and 5,000 requests per 10 seconds. Browser company means the sum of user traffic for one company. Anonymous client IPs allow 20 requests per second and 200 requests per 10 seconds. The rate limiter does not count requests that it rejects. |
| `500` | An internal server error prevented completion of the request. |

### `GET /api/v1/incidents/{id}/postmortem/versions/{versionId}/export`

**Download a postmortem version as a zip.** Returns a zip named `postmortem-<incident id>-version-<label>.zip`. It holds `postmortem.md` (widgets as tables), `postmortem.html` (one page that makes no request), the images under `media/`, and a picture and a `numbers.json` for each chart under `charts/`.

A key that may not read customer revenue gets the export with the financial values left out, and `REDACTED.txt` names the kinds of values that were removed. The export is no longer refused for such a key. A version with no document the renderer can read keeps the older Markdown-only zip, and that zip is still refused for a key without revenue access when its evidence holds financial data.

This API is in preview.


Required scope: `incidents:read`

Operation ID: `exportPostmortemVersion`
Contract: `preview`
Retry guidance: You can repeat this request. If the API returns 429, wait for Retry-After. Set a maximum number of attempts.
Prerequisites: View all incidents

#### Path parameters

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | Yes | A positive numeric incident ID returned by this API. The permanent incident reference is suitable for stored references and external links. Minimum: 1. |
| `versionId` | `integer` | Yes | The ID of a postmortem version of this incident. Minimum: 1. |

#### Example request

Replace `{company}`, `<token>`, and any other placeholders with your values.

```bash
curl --request GET \
  --url 'https://{company}.api.tellagen.com/api/v1/incidents/{id}/postmortem/versions/{versionId}/export' \
  --header 'Authorization: Bearer <token>'
```

#### Success response

Status: `200 OK`

No response body.

#### Endpoint error responses

| Status | Meaning |
| --- | --- |
| `400` | The API rejected the request because its syntax or one of its values is invalid. |
| `401` | The request does not contain valid authentication. |
| `403` | Authentication succeeded, but the caller lacks the required API scope or workspace permission. |
| `404` | The requested resource does not exist or is not available to the caller. |
| `409` | The request conflicts with the current resource state. idempotency_key_reused means that the key belongs to different request content. idempotency_in_progress means that an identical request is still in progress. idempotency_outcome_unknown means that an earlier request may have completed, but its result could not be stored and must not be retried automatically. |
| `429` | The request exceeded an applicable sliding limit. Free API keys allow 20 requests per second and 600 requests per 60 seconds. Team and Scale API keys allow 100 requests per second and 3,000 requests per 60 seconds. Browser users allow 100 requests per second. Browser company allows 500 requests per second and 5,000 requests per 10 seconds. Browser company means the sum of user traffic for one company. Anonymous client IPs allow 20 requests per second and 200 requests per 10 seconds. The rate limiter does not count requests that it rejects. |
| `500` | An internal server error prevented completion of the request. |

### `PUT /api/v1/incidents/{id}/postmortem/external-copies/{target_key}`

**Report where a receiver copied a postmortem.** A webhook receiver reports the copy it wrote, so the incident can show it. `target_key` is the receiver's own name: letters, digits and dashes, up to 63 characters. Tellagen keeps it in lower case. `confluence` and `notion` are the names of the built-in copies and answer 400 `reserved_target_key`.

The copy is `copied` when `content_sha256` is the hash of that version, as the render gave it or as the version list gave it, and `stale` when it is not. Only `https` addresses are kept. A repeat of the same report changes nothing. One copy exists for each incident and target; a later report replaces it. A copy that is stale shows on the incident as Stale. When a webhook subscription exists and no receiver confirmed the newest version within 24 hours, the incident shows a Not copied row. Tellagen computes that row when the incident is read.

This API is in preview.


Required scope: `incidents:write`

Operation ID: `reportPostmortemExternalCopy`
Contract: `preview`
Retry guidance: If the result is unknown, read the resource before another attempt. The error details explain the next step.
Prerequisites: Active responder seat, View all incidents

#### Path parameters

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `id` | `integer` | Yes | A positive numeric incident ID returned by this API. The permanent incident reference is suitable for stored references and external links. Minimum: 1. |
| `target_key` | `string` | Yes | The receiver's own name for its copy. Pattern: ^[A-Za-z0-9][A-Za-z0-9-]{0,62}$. |

#### Example request

Replace `{company}`, `<token>`, and any other placeholders with your values.

```bash
curl --request PUT \
  --url 'https://{company}.api.tellagen.com/api/v1/incidents/{id}/postmortem/external-copies/{target_key}' \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
  "url": "https://wiki.example.com/pages/312",
  "system": "Company wiki",
  "version_id": 41,
  "content_sha256": "9f2c1e7a4b6d8035a1c7e9f0b2d4a6c8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9"
}'
```

#### Request body

Required nested fields apply when their parent object is present. Optional does not imply nullable.

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `url` | `string` | Yes | The address of the copy. Only https addresses are kept. Maximum length: 2048 characters. |
| `system` | `string` | No | The name of the wiki or system, shown on the incident. Maximum length: 64 characters. |
| `version_id` | `integer` | Yes | The ID of the submitted version the copy holds. Minimum: 1. |
| `content_sha256` | `string` | Yes | The `content_sha256` of the render the receiver wrote. Pattern: ^[0-9a-f]{64}$. |

Request JSON:

```json
{
  "url": "https://wiki.example.com/pages/312",
  "system": "Company wiki",
  "version_id": 41,
  "content_sha256": "9f2c1e7a4b6d8035a1c7e9f0b2d4a6c8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9"
}
```

#### Success response

Status: `200 OK`

#### Response fields

Returned means the field is present when its parent object is present. A nullable field can contain null.

| Name | Type | Returned | Description |
| --- | --- | --- | --- |
| `id` | `integer` | Always | The copy ID. |
| `incident_id` | `integer` | Always | The incident ID. |
| `target_key` | `string` | Always | The receiver's own name for its copy. |
| `system` | `string` | Optional | The name of the wiki or system. |
| `url` | `string` | Optional | The address of the copy. |
| `version_id` | `integer` | Optional | The version the copy holds. |
| `content_sha256` | `string` | Optional | The hash the receiver reported. |
| `status` | `string` | Always | `copied` when the hash matches the version, `stale` when it does not. Possible values: `"pending"` \| `"publishing"` \| `"copied"` \| `"failed"` \| `"needs_review"` \| `"stale"` \| `"mask_not_applied"` |
| `attempts` | `integer` | Always | How many times Tellagen tried to write the copy. It is 0 for a receiver's copy. |
| `created_by` | `string` | Optional | Who reported the copy. |
| `created_at` | `string (RFC 3339)` | Always | When the copy was first reported. |
| `updated_at` | `string (RFC 3339)` | Always | When the copy was last reported. |

Returns the saved copy.

```json
{
  "id": 5,
  "incident_id": 42,
  "target_key": "wiki",
  "system": "Company wiki",
  "url": "https://wiki.example.com/pages/312",
  "version_id": 41,
  "content_sha256": "9f2c1e7a4b6d8035a1c7e9f0b2d4a6c8e0f1a3b5c7d9e1f3a5b7c9d1e3f5a7b9",
  "status": "copied",
  "attempts": 0,
  "created_by": "maarja@example.com",
  "created_at": "2026-11-14T10:15:00Z",
  "updated_at": "2026-11-14T10:15:00Z"
}
```

#### Endpoint error responses

Endpoint-specific codes: `invalid_target_key`, `reserved_target_key`, `invalid_url`

| Status | Meaning |
| --- | --- |
| `400` | The API rejected the request because its syntax or one of its values is invalid. |
| `401` | The request does not contain valid authentication. |
| `403` | Authentication succeeded, but the caller lacks the required API scope or workspace permission. |
| `404` | The requested resource does not exist or is not available to the caller. |
| `409` | The request conflicts with the current resource state. idempotency_key_reused means that the key belongs to different request content. idempotency_in_progress means that an identical request is still in progress. idempotency_outcome_unknown means that an earlier request may have completed, but its result could not be stored and must not be retried automatically. |
| `429` | The request exceeded an applicable sliding limit. Free API keys allow 20 requests per second and 600 requests per 60 seconds. Team and Scale API keys allow 100 requests per second and 3,000 requests per 60 seconds. Browser users allow 100 requests per second. Browser company allows 500 requests per second and 5,000 requests per 10 seconds. Browser company means the sum of user traffic for one company. Anonymous client IPs allow 20 requests per second and 200 requests per 10 seconds. The rate limiter does not count requests that it rejects. |
| `500` | An internal server error prevented completion of the request. |
