Run a Work Item Enhance action
Adds one allowlisted action to an existing non-terminal run and returns the updated drafts/artifacts.
POST
/api/v1/work-item-enhancements/:id/actionsAuthorization
work-item-enhance:runapi key scoperequiredRequired scope when calling with an API key.
Path parameters
idstringrequiredEnhancement run id
Example: wie_01k6...
Request body
actionstringrequired"requirements" | "description" | "design" | "code_context" | "implementation_plan" | "acceptance_criteria" | "test_plan" | "estimate" | "risk_check"One enhancement action to run. code_context also requires work-item-enhance:code-context.
instructionsstringoptionalOptional action-specific instructions.
confirmbooleanrequiredMust be true.
Example request
{
"action": "design",
"instructions": "Include API boundary notes.",
"confirm": true
}Request
curl -X POST "https://www.digitalstack360.com/api/v1/work-item-enhancements/wie_01k6.../actions" \
-H "Authorization: Bearer $DS_API_KEY" \
-H "Idempotency-Key: enhance-action-work-42-design" \
-H "Content-Type: application/json" \
-d '{"action":"design","instructions":"Include API boundary notes.","confirm":true}'Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.
Response
200 OK
{
"data": {
"id": "wie_01k6...",
"requested_actions": [
"requirements",
"design"
],
"artifacts": [
{
"type": "design",
"title": "Design approach"
}
]
}
}Errors
401
missing_authNo credentials provided
401
invalid_api_keyAPI key is invalid or revoked
400
bad_requestMissing or invalid request fields
403
scope_insufficientKey lacks the required write scope
409
run_lockedRun is terminal and cannot accept new actions
403
scope_insufficientcode_context requires work-item-enhance:code-context in addition to work-item-enhance:run