Assign milestone scope

Manually assigns one source work item into a delivery milestone’s governed scope. The scope row points at the source item; it never owns, moves, or mutates it. The audit trail records the acting user, so this command requires a signed-in session or a delegated OAuth token — a bare API key is rejected.

POST/api/v1/delivery/milestones/:id/scope

Authorization

delivery-timeline:writeapi key scoperequired
Required scope when calling with an API key.

Path parameters

idstringrequired
Delivery milestone ID

Example: dm_01k2...

Request body

item_typestringrequired"epic" | "parent_task" | "story" | "task" | "deliverable" | "risk" | "document"
Kind of source item being scoped
source_item_idstringrequired
ID of the source item in its source system
source_systemstringoptional
Source system identifier (defaults to ds-native)
source_item_keystringoptional
Display key, e.g. a ticket key
source_item_titlestringoptional
Display title snapshot
source_item_urlstringoptional
Deep link to the source item
notesstringoptional
Free-text note stored with the scope row
Example request
{
  "item_type": "story",
  "source_item_id": "work_01k2...",
  "source_system": "ds-native",
  "source_item_key": "DS-42",
  "source_item_title": "Checkout redesign",
  "notes": "Committed for beta."
}

Request

curl -X POST "https://www.digitalstack360.com/api/v1/delivery/milestones/dm_01k2.../scope" \
  -H "Authorization: Bearer $DS_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"item_type":"story","source_item_id":"work_01k2...","source_system":"ds-native","source_item_key":"DS-42","source_item_title":"Checkout redesign","notes":"Committed for beta."}'

Examples use a placeholder key from your environment. Store your key in $DS_API_KEY — never commit it.

Response

200 OK
{
  "data": {
    "id": "dms_01k2...",
    "deliveryMilestoneId": "dm_01k2...",
    "projectId": "proj_abc123",
    "itemType": "story",
    "sourceSystem": "ds-native",
    "sourceItemId": "work_01k2...",
    "sourceItemKey": "DS-42",
    "sourceItemTitle": "Checkout redesign",
    "sourceItemUrl": null,
    "notes": "Committed for beta.",
    "addedByUserId": "user_01k2...",
    "createdAt": "2026-07-15T14:22:04Z",
    "updatedAt": "2026-07-15T14:22:04Z"
  }
}

Errors

401
missing_auth

No credentials provided

401
invalid_api_key

API key is invalid or revoked

403
scope_insufficient

Key lacks delivery-timeline:write scope

400
invalid_request

item_type and source_item_id are required

400
invalid_scope_item

Scope item fields fail validation

404
not_found

Delivery milestone does not exist in the resolved workspace

422
actor_context_required

Caller is an API key with no acting user; use a session or delegated OAuth token