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/actions

Authorization

work-item-enhance:runapi key scoperequired
Required scope when calling with an API key.

Path parameters

idstringrequired
Enhancement 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.
instructionsstringoptional
Optional action-specific instructions.
confirmbooleanrequired
Must 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_auth

No credentials provided

401
invalid_api_key

API key is invalid or revoked

400
bad_request

Missing or invalid request fields

403
scope_insufficient

Key lacks the required write scope

409
run_locked

Run is terminal and cannot accept new actions

403
scope_insufficient

code_context requires work-item-enhance:code-context in addition to work-item-enhance:run