Authenticated Update Endpoints
These endpoints use the Platform API key and the test request id returned by
Create Test. Use them to update tests programmatically without
using an editToken.
All paths are prefixed with /v1/platform/tests/:id.
| Method | Path | Purpose |
|---|---|---|
PATCH | / | Update test metadata |
PATCH | /full | Bulk-update metadata and items |
PATCH | /items/by-id/:itemId | Update a single item by UUID |
Updates are available after the generation request has completed.
PATCH /
Updates test-level metadata.
curl -X PATCH https://api.tutorflow.io/v1/platform/tests/{id} \
-H "Authorization: Bearer tf_platform_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Algebra Checkpoint",
"description": "A short checkpoint on linear equations."
}'Body
| Field | Type | Description |
|---|---|---|
title | string | null | Updated test title |
description | string | null | Updated test description |
Returns the updated TestResDto.
PATCH /full
Bulk-updates test metadata and the complete item list. This is the preferred endpoint for agents or editors that save several item changes at once.
curl -X PATCH https://api.tutorflow.io/v1/platform/tests/{id}/full \
-H "Authorization: Bearer tf_platform_..." \
-H "Content-Type: application/json" \
-d '{
"title": "Algebra Checkpoint",
"description": "Ten questions on equations.",
"level": "medium",
"timeLimit": 30,
"items": [
{
"id": "c31e3b03-e54d-4f71-9335-d22f95cd5afe",
"sequence": 1,
"title": "Solve for x",
"type": "select",
"question": "Solve: 2x + 4 = 10",
"options": ["2", "3", "4", "5"],
"correctAnswers": ["3"],
"explanation": "Subtract 4, then divide by 2.",
"score": 10
}
]
}'Body
| Field | Type | Description |
|---|---|---|
title | string | null | Test title |
description | string | null | Test description |
level | string | null | Difficulty label |
timeLimit | number | null | Time limit in minutes |
items | array | Full item upsert list |
Item Fields
| Field | Type | Description |
|---|---|---|
id | string | Existing item id. Omit to insert a new item. |
sequence | number | Item order |
title | string | null | Item title |
type | string | Item type, such as select, true_false, or short_answer |
question | string | Question text |
options | string[] | null | Answer options |
correctAnswers | string[] | null | Correct answer values |
explanation | string | null | Explanation shown after grading |
score | number | Points for the item |
When items is supplied, the list is treated as authoritative: existing items
missing from the incoming list are removed, matching ids are patched, and items
without an id are inserted.
Returns the updated TestResDto.
PATCH /items/by-id/:itemId
Updates one item by UUID.
curl -X PATCH https://api.tutorflow.io/v1/platform/tests/{id}/items/by-id/{itemId} \
-H "Authorization: Bearer tf_platform_..." \
-H "Content-Type: application/json" \
-d '{
"sequence": 2,
"question": "Solve: 3x = 12",
"options": ["2", "3", "4", "6"],
"correctAnswers": ["4"],
"explanation": "Divide both sides by 3.",
"score": 10
}'Returns { "success": true }.