Skip to content
Esc
↑↓navigate↵open⌘Jpreview

Archive topic

Archive a topic or restore an archived topic by ID. Archive only the requested topic. Agent archive calls require a nonblank archivedReason; omit archivedReason when restoring. Superseded topics cannot be changed. Repeated calls preserve the original archive decision and history.

POST/topics/{topicId}/archive
Authorization
AuthorizationBearer token · headerrequired

Organization API key (modem_…).

Path parameters
topicIdstring<uuid>required

ID of the topic to archive or restore.

Header parameters
Idempotency-Keystring

Replays a successful mutating request for 24 hours. Reuse with a different payload returns 409.

max length 255
Request body
requiredapplication/json
archivedbooleanrequired

True to archive; false to restore.

archivedReasonstring

Reason for archiving. Agent archive calls require a nonblank reason. Omit when restoring.

max length 4000
Responses
200

OK

archivedbooleanrequired
archivedAtstring<date-time> | nullrequired
Show properties
Any of:
string<date-time>
string<date-time>
null
null
archivedByUserIdstring | nullrequired
Show properties
Any of:
string
Any of:
string
string
string
string
null
null
archivedReasonstring | nullrequired
Show properties
Any of:
string
string
null
null
topicIdstring<uuid>required
400

Invalid request (validation failed).

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

401

Missing or invalid API key.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

403

The API key does not have access to this resource.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

404

The requested resource was not found.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

409

The request conflicts with an existing resource or idempotency operation.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

429

Rate limit exceeded.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

500

Internal server error.

codestringrequired

Machine-readable error code, e.g. NOT_FOUND.

dataany

Optional structured error details.

definedbooleanrequired

True if the error was declared in the procedure contract.

messagestringrequired

Human-readable error message.

statusintegerrequired

HTTP status code.

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://api.modem.dev/v1/topics/497f6eca-6276-4993-bfeb-53cbbbba6f08/archive' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "archived": true,
  "archivedReason": "string"
}'
Response
{
  "archived": true,
  "archivedAt": "2019-08-24T14:15:22Z",
  "archivedByUserId": "string",
  "archivedReason": "string",
  "topicId": "97b608a9-302e-4387-a5f4-fd35969cdc21"
}

Was this page helpful?