API and MCPSets
Archive or restore several study sets
POST
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
header
AuthorizationBearer <token>Idempotency-Key?stringA 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}$Length
1 <= length <= 255application/json- body
setIds*array<>1-500 study set ids.
Items
1 <= items <= 500archived*booleantrue archives the sets, false restores them.
OK
application/json- response
data*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 }}