Wizard Draft Repository
API Contract
REST
/api/v1/wizard-drafts
5 endpoints
GET
/api/v1/wizard-drafts/api/v1/wizard-drafts
List all active wizard drafts for the authenticated user
Public
Response Example
{
"data": [
{
"draft_id": "draft-44ab12f0",
"wizard_id": "onboarding-wizard-v3",
"user_id": "usr-00124",
"step_index": 2,
"last_saved_at": "2026-03-26T10:40:00Z",
"is_expired": false
}
],
"pagination": {
"page": 1,
"limit": 20,
"total": 1
}
}
GET
/api/v1/wizard-drafts/api/v1/wizard-drafts/:id
Load a specific wizard draft by ID
Public
Response Example
{
"draft_id": "draft-44ab12f0",
"wizard_id": "onboarding-wizard-v3",
"user_id": "usr-00124",
"step_index": 2,
"answers": {
"screen-01": {
"chosen": [
"opt-b"
]
},
"screen-02": {
"chosen": [
"opt-a"
]
}
},
"last_saved_at": "2026-03-26T10:40:00Z",
"is_expired": false
}
POST
/api/v1/wizard-drafts/api/v1/wizard-drafts
Save a new wizard draft
Public
Request Example
{
"wizard_id": "onboarding-wizard-v3",
"user_id": "usr-00124",
"step_index": 1,
"answers": {
"screen-01": {
"chosen": [
"opt-c"
]
}
}
}
Response Example
{
"draft_id": "draft-b9cf33d7",
"wizard_id": "onboarding-wizard-v3",
"user_id": "usr-00124",
"step_index": 1,
"last_saved_at": "2026-03-26T11:25:00Z"
}
PUT
/api/v1/wizard-drafts/api/v1/wizard-drafts/:id
Update an existing draft with new step index and answers
Public
Request Example
{
"step_index": 3,
"answers": {
"screen-01": {
"chosen": [
"opt-c"
]
},
"screen-02": {
"chosen": [
"opt-a"
]
},
"screen-03": {
"chosen": [
"opt-b"
]
}
}
}
Response Example
{
"draft_id": "draft-b9cf33d7",
"step_index": 3,
"last_saved_at": "2026-03-26T11:30:00Z"
}
DELETE
/api/v1/wizard-drafts/api/v1/wizard-drafts/:id
Delete a wizard draft (e.g. after completion or explicit abandonment)
Public
Response Example
{
"deleted": true,
"draft_id": "draft-44ab12f0"
}