---
title: "Bulk archive or restore goal nodes"
method: POST
path: "/api/goal/nodes/archive"
tags: ["Goal"]
---

# Bulk archive or restore goal nodes

`POST /api/goal/nodes/archive`

## Request

- Base URL: `http://localhost:38200`
- URL: `http://localhost:38200/api/goal/nodes/archive`
- Auth: one of:
  - HTTP bearer
  - API key in cookie `token`

## Request body

- object
  - `nodeIds` integer[], required
  - `archived` boolean, required

## Response `200`

Number of nodes updated.

- object
  - `updated` integer

## Other responses

- `400`: Request body/query failed Zod validation.
- `401`: Missing or invalid credentials.

---

[API](https://skmtc.dev/contextq/apis/contextq-api.md) · [All operations](https://skmtc.dev/contextq/apis/contextq-api/llms.txt) · [OpenAPI document](https://skmtc.dev/contextq/apis/contextq-api/revisions/7afc44056a22?raw)
