---
title: "Service: /members/{member}/comments/{commentid}/archive [POST]"
source: https://dev.pageseeder.com/api/services/archive-comment-POST.html
description: "Archive comment"
last_updated: 2026-08-07T17:09:54+10:00
document_type: api_endpoint
operation_id: comment-POST
resource_id: comment
path_template: /members/{member}/comments/{commentid}/archive
http_method: POST
api_category: comment
implementation_version: null
api_since: null
deprecated_since: null
obsolete_since: null
api_support: supported
cache_control: N/A
generated_at: 2026-08-07
tokens: ~598
---

# /members/\{member\}/comments/\{commentid\}/archive \[POST\]

## Description

Archive an existing comment.

If the [comment](../../reference/glossary/comment.md) has been posted on multiple groups, archiving the comment removes it from all the groups – even if the member archiving it only has access to one of the groups.

This service only archives a single comment in a discussion such that the other comments are preserved:

- The replies of an archived comment are always retained, regardless of its position in the discussion.
- If the archived comment is the first comment in a discussion, the immediately following reply replaces it as the first comment.

## Parameters

No parameters required – the comment is specified by the `xlinkid` in the URL.

## Permission

Only contributor and higher can archive comments that have been posted, however, only manager and higher can archive the comments of other members.

A guest and higher can archive their own draft comments.

An administrator can archive any comment.

## Response

When successful, the archived comment is returned as a [\<comment\>](../elements/element_comment.md) wrapped in a `<comment-archive>` element as in the following example.

```lang-xml

<comment-archive>
  <comment id="123"
           contentrole="archive-Comment"
           created="2012-03-08T12:34:00+10:00"
           [status="Open"]
           [due="2012-03-10T18:00:00+10:00"]
           [priority="High"] 
           [moderated="true"]>
    <title>Cavern stolen!</title>
    <author email="alibaba@fortythieves.com.au">
      ...
    </author>
    <assignedto id="123"
                date="2012-03-09T..."> ...
    </assignedto>
    <modifiedby id="456"
               date="2012-03-09T..."> ...
    </modifiedby>
    <content id="789"
              type="text/plain">
      Sesame opened the door
    </content>
    <attachment>
      <uri id="189"> ... </uri>
    </attachment>
    <attachment fragment="5">
      <uri id="289"> ... </uri>
    </attachment>
  </comment>
</comment-archive>
```

> **Note:** The @`contentrole` of the comment must start with `archive-` after the comment has been archived.

## Error Handling

| Code | Cause / Description |
| --- | --- |
| 0x1309 | The comment is already archived |
| 0x1311 | The object specified is not a comment |
| 0x1317 | The comment was not found |
| 0x6304 | Failed to archive comment |

