Skip to content
WorkRoad home
API and MCPSets

Archive or restore several study sets

POST
/sets/archive

Archives up to 500 sets in one call, or restores them with archived: false. An archived set keeps its terms and review history but leaves reviews, practice and the study picker. Sets that aren't the user's, are in the trash or are already in that state are skipped. To retire every set of a course that is over, archive its subject instead (PATCH /subjects/{subjectId}).

Required scopes: sets:update

Authorization

headerAuthorizationBearer <token>

Header Parameters

Idempotency-Key?string

A client-generated key (1 to 255 visible ASCII characters) that makes this POST safe to retry. A retry with the same key and body replays the original response; the same key with a different body returns 409 idempotency_conflict. Stored for 24 hours.

Match^[\x21-\x7E]{1,255}$
Length1 <= length <= 255

Request Body

application/json
  1. body
setIds*array<>

1-500 study set ids.

Items1 <= items <= 500
archived*boolean

true archives the sets, false restores them.

Response Body

OK

application/json
  1. response
data*
Example Request
curl -X POST 'https://workroad.app/api/v1/sets/archive' \  -H 'Authorization: Bearer $WORKROAD_API_KEY' \  -H 'Content-Type: application/json' \  -d '{  "setIds": [    "2b2b1882-988f-491b-855c-b513bf31a936"  ],  "archived": true}'
Example Response
{  "data": {    "count": 1  }}