---
title: "Unarchive an agent conversation"
method: POST
path: "/agents/{agentKey}/conversations/{conversationId}/unarchive"
tags: ["Agents"]
---

# Unarchive an agent conversation

`POST /agents/{agentKey}/conversations/{conversationId}/unarchive`

## Request

- Base URL: `https://app.pipeshub.com/api/v1`
- URL: `https://app.pipeshub.com/api/v1/agents/{agentKey}/conversations/{conversationId}/unarchive`
- Auth: one of:
  - HTTP bearer
  - OAuth 2
    - Authorization code: `/api/v1/oauth2/authorize`
    - Client credentials
    - Token URL: `/api/v1/oauth2/token` scopes: `agent:write`

Restores an archived agent conversation to the active list. The route
reads no query parameter and no body; anything sent is ignored.

## Path parameters

- `agentKey` string, required
- `conversationId` string, objectId, required

## Response `200`

Conversation unarchived

- AgentConversationUnarchiveResponse: Envelope returned by `POST /agents/{agentKey}/conversations/{conversationId}/unarchive`.
  - `id` string, objectId, required
  - `status` 'unarchived', required
  - `unarchivedBy` string, objectId, required
  - `unarchivedAt` string, date-time, required
  - `meta` AgentConversationUnarchiveMeta, required: Request-scoped metadata returned by the unarchive route. `requestId` is omitted when upstream middleware did not attach one.
    - `requestId` string
    - `timestamp` string, date-time, required
    - `duration` integer, required

## Other responses

- `400`: `VALIDATION_ERROR` for a malformed `conversationId`, `HTTP_BAD_REQUEST` for an `agentKey` that is not safe to forward or a conversation that is not archived.
- `401`: Unauthorized
- `403`: The OAuth access token lacks the `agent:write` scope (`HTTP_FORBIDDEN`).
- `404`: No conversation of the caller with this id under this `agentKey` (missing, another user's, another agent's, or deleted).
- `500`: Internal server error. A JSON body larger than 10 MB, or a form-encoded body larger than 100 KB or with more than 1000 fields, is answered `413` by the app-wide body parsers instead, also before authentication.

## Changes

- **2026-10-28** `dbb5e203b445`: 2 info
  - added the non-success response with the status `403`
  - added the non-success response with the status `500`
- **2026-10-08** `bb0c59adf026`: 3 info
  - added the optional property `error/requestId` to the response with the `400` status
  - added the optional property `error/requestId` to the response with the `401` status
  - added the optional property `error/requestId` to the response with the `404` status

[Operation history](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api/changes/agents/:agentKey/conversations/:conversationId/unarchive/post.md)

---

[API](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api.md) - [All operations](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api/llms.txt) - [OpenAPI document](https://skmtc.dev/pipeshub-ai/apis/pipeshub-api/revisions/dbb5e203b445?raw)
