---
title: "Restore a soft-deleted Comment."
method: POST
path: "/comments/{id}/restore"
tags: ["comments"]
---

# Restore a soft-deleted Comment.

`POST /comments/{id}/restore`

## Request

- Base URL: `https://restivity.ai/api/v1`
- URL: `https://restivity.ai/api/v1/comments/{id}/restore`
- Auth: OAuth 2 (authorization code, authorization URL `https://restivity.ai/oauth/authorize`, token URL `https://restivity.ai/api/oauth/token`, scopes: `comments:write`)

Clears deleted_at if the row was soft-deleted within the last 30 days. Returns 404 outside the window — the pg_cron purge has already run.

## Path parameters

- `id` string, uuid, required

## Response `200`

The restored Comment.

- Comment
  - `id` string, uuid, required
  - `task_id` string, uuid, required
  - `user_id` string, uuid, required
  - `content` CommentContentDocOutput, required: TipTap ProseMirror JSON document.
    - `type` 'doc', required
    - `content` unknown[], required
      - unknown
  - `content_text` string, required
  - `mentions` string[], required
  - `is_edited` boolean, required
  - `is_internal` boolean, required
  - `created_at` string, required
  - `updated_at` string, required
  - `deleted_at` string, nullable, required
  - `edited_at` string, nullable
  - `author` CommentAuthorRef
    - `id` string, uuid, required
    - `display_name` string, nullable, required
    - `photo_url` string, nullable, required
  - `author_kind` 'user' | 'agent' | 'assistant', required: Who wrote it — derived by the server from the credential used, never from the payload: `user` (the person in the app), `agent` (an OAuth client over MCP/REST, e.g. Claude or Codex), `assistant` (the in-app Restivity AI). Read-only.
  - `author_client_id` string, nullable, required: For `agent` rows: the OAuth client id the token was issued to. Read-only.
  - `author_client_name` string, nullable, required: For `agent` rows: the OAuth client name at write time (e.g. "Claude", "Codex"), shown as "via <name>" in the thread. Read-only.

## Other responses

- `400`: Invalid request shape.
- `401`: Missing or invalid access token.
- `403`: Token lacks the required scope.
- `404`: No such Comment in the 30-day restore window.
- `422`: Request body failed schema validation.
- `429`: Rate-limit exceeded for this tier.

---

[API](https://skmtc.dev/restivity/apis/restivity-rest-api.md) · [All operations](https://skmtc.dev/restivity/apis/restivity-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/restivity/apis/restivity-rest-api/revisions/5764e41ebb3a?raw)
