REST API
Undo a practice answer
POST
Takes back an answer, as the app's undo does: the review is removed from the card's history, the card's schedule goes back to what it was, and the card is queued in the session again under a new itemId. Use undoableItemId from getPracticeSession. Undoing the same answer again changes nothing.
Required scopes: activity:delete
header
AuthorizationBearer <token>sessionId*stringPractice session id from startPracticeSession, scoped to the key's user.
Match
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidIdempotency-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
itemId*stringundoableItemId from getPracticeSession: the session's newest answer.
Match
^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$Format
uuidOK
application/json- response
data*curl -X POST 'https://workroad.app/api/v1/practice-sessions/497f6eca-6276-4993-bfeb-53cbbbba6f08/undo' \ -H 'Authorization: Bearer $WORKROAD_API_KEY' \ -H 'Content-Type: application/json' \ -d '{ "itemId": "f11b669d-7201-4c21-88af-d85092f0c005"}'Example Response
{ "data": { "itemId": "1e2d3c4b-5a69-4788-9a0b-1c2d3e4f5a6b", "undone": true }}