Apply selected Work Item Enhance drafts

Applies selected field-level drafts to the canonical work item using the run target version. Only explicit selected fields are updated.

POST/api/v1/work-item-enhancements/:id/apply

Authorization

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

Path parameters

idstringrequired
Enhancement run id

Example: wie_01k6...

Request body

draft_idsarrayrequired
Selected draft ids to apply. Only one draft per target field is allowed.
expected_target_versionstringrequired
Target work-item version returned by the run.
confirmbooleanrequired
Must be true.
Example request
{
  "draft_ids": [
    "draft_01k6..."
  ],
  "expected_target_version": "2026-07-15T14:22:04Z",
  "confirm": true
}

Request

curl -X POST "https://www.digitalstack360.com/api/v1/work-item-enhancements/wie_01k6.../apply" \
  -H "Authorization: Bearer $DS_API_KEY" \
  -H "Idempotency-Key: apply-work-42-enhancement-v1" \
  -H "Content-Type: application/json" \
  -d '{"draft_ids":["draft_01k6..."],"expected_target_version":"2026-07-15T14:22:04Z","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...",
    "state": "applied",
    "applied_draft_ids": [
      "draft_01k6..."
    ]
  }
}

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
stale_target_version

Target work item changed after the run was created

409
duplicate_field

More than one selected draft targets the same work-item field