Skip to content
GitmoapAPIBeta
Planissues
PUT/groups/{group_id}/issues/{issue_id}/milestone

Put a group work item into a milestone

set_group_issue_milestone
  • issue:update
    A token needs the issue:update scope: Update work items — status, fields, hierarchyGranted by mcp_agent_write, write_api, write_repository.Every operation this scope unlocks
  • Audited · mutation

    x-gitmoap-audit: {"kind":"audited","arg":"mutation"}

Puts the work item into one of the group's own milestones, replacing any milestone it was in. Developers and above may do this on any work item, and its author on their own. A closed milestone or a type that takes no milestone is refused, and a milestone the group does not define is not found.

Parameters

Path
  • group_idGroupId (string · uuid)Group ID
  • issue_idIssueId (integer · int64)Work-item iid

Request body

application/json
  • milestone_idMilestoneId (string · uuid)
Request body exampleSynthesized example
{
"milestone_id": "ca7982c4-9c61-48f2-bd1b-9b41c15f318f"
}

Responses

200The work itemapplication/json
  • created_atstring
  • created_byActorSummaryWho created the work item, as they were when they created it.
  • iidIssueId (integer · int64)
  • root_scope_idGroupId (string · uuid)The top-level group the item's group or repository belongs to.
  • scope_idstring
  • scope_typeScopeTypegrouprepositoryWhether the item lives in a group or a repository. With scope_id and iid it forms the item's current address — the #412 a person types — which changes when the item moves.
  • status_categoryStatusCategorytriagetodoin_progressin_reviewblockeddonecancelledThe fixed category of the item's current status, which boards, filters and progress rollups work from.
  • status_idStatusId (string)
  • titleIssueTitle (string)
  • uidIssueUid (string · uuid)The work item's permanent identifier. Unlike its number, it never changes, even when the item moves to another group or repository.
  • updated_atstringWhen the work item last changed, ISO 8601. Listings order by it, newest first.
  • work_item_typeWorkItemTypeepicstorybugtaskspikechoreincidentsub_taskThe kind of work item. The type decides where an item may live (a group or a repository), which types it may have as children, and which fields it accepts.
  • ancestor_group_idsarray of GroupId (string · uuid)optionalThe groups the item sits beneath, nearest first.
  • ancestor_issue_uidsarray of IssueUid (string · uuid)optionalThe item's ancestors' permanent identifiers, nearest first, for display. It can briefly lag behind a change of parent higher up the chain.
  • assignee_idsarray of PrincipalId (string · uuid)optionalThe people assigned to the work item. Absent when nobody is.
  • author_can_pushboolean or nulloptionalWhether the author can push to where this work item lives — its repository, or a group work item's group. False for a drive-by contributor's text. Absent where it was not computed.
  • closed_atstring or nulloptional
  • closed_byPrincipalId (string · uuid) or nulloptional
  • descriptionMarkdownDoc (string) or nulloptional
  • labelsarray of LabelKey (string)optionalThe keys of the labels applied to the work item. Absent when it has none.
  • milestone_idMilestoneId (string · uuid) or nulloptional
  • milestone_scope_idstring or nulloptional
  • milestone_scope_typeScopeTypegrouprepositoryor nulloptionalWhether the item's milestone belongs to a group or a repository — not necessarily the item's own, since a group milestone can hold work items from several repositories.
  • parent_refIssueRef or nulloptionalThe parent's current address, for display. Absent when the item has no parent.
  • parent_uidIssueUid (string · uuid) or nulloptionalThe parent work item's permanent identifier, if the item has a parent.
  • pointsinteger · int32 or nulloptional0–∞
  • regressed_atstring or nulloptional
  • regressed_at_shaCommitHash (string) or nulloptionalThe commit whose evidence proved the regression — the first known bad commit, and the upper end of the range of suspect commits.
  • regressed_from_shaCommitHash (string) or nulloptionalThe commit at which the item was last verified, kept when it regresses — the last known good commit.
  • regressed_run_idPipelineRunId (string · uuid) or nulloptional
  • severitySeveritycriticalhighmediumlowor nulloptional
  • type_profileBlueprintRef or nulloptionalThe custom type this item was filed as, pointing at the group or repository where the blueprint is defined. work_item_type still decides where the item may live, its children and its fields; the blueprint adds a display label and facets. Absent for an item filed as a plain built-in type.
  • verificationVerificationStateunverifiedverifiedregressedoptionalWhether CI has proved the work item's acceptance criteria. unverified until a pipeline run proves them, verified once one has, and regressed when a later run shows that evidence no longer holds.
  • verified_atstring or nulloptional
  • verified_at_shaCommitHash (string) or nulloptionalThe commit at which CI proved the acceptance criteria. Absent until a pipeline run has.
  • verified_run_idPipelineRunId (string · uuid) or nulloptional
  • versioninteger · int64optional0–∞The work item's revision, incremented on every change. Send it back with an update; if the item has changed since you read it, the update is refused with a 409.
200 exampleSynthesized example
{
"created_at": "2026-10-14T13:45:33Z",
"created_by": {
"email": "lin@acme.example",
"id": "id-85a6",
"username": "mara",
"avatar_url": "https://gitmoap.example/acme/c01a5928"
},
"iid": 50,
"root_scope_id": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69",
"scope_id": "3ad8419a-45f7-406b-b4ac-8822949dac27",
"scope_type": "group",
"status_category": "triage",
"status_id": "720a3b48-7e58-4261-817a-5d979796f6da",
"title": "Stream pipeline status into the run header",
"uid": "0d496cdd-5741-49bc-9789-a2ff097be1fe",
"updated_at": "2026-10-17T00:24:21Z",
"work_item_type": "epic",
"ancestor_group_ids": [
"4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
],
"ancestor_issue_uids": [
"58d01fdf-86fe-4cd8-a274-5d93aaa393a8",
"79e8a864-f8a8-4a9d-9fb9-9bc7fbfaaeec"
],
"assignee_ids": [
"ff99e599-1115-4cee-95e7-338d03da7876",
"cbc93d66-aeb2-4188-a9f8-24f35066b02d"
],
"author_can_push": false,
"closed_at": "2026-10-15T03:29:28Z",
"closed_by": "b7e2d1c0-9f8e-4d7c-a6b5-c4d3e2f1a0b9",
"description": "Renders each region as density contours of its operations.",
"labels": [
"labels-40c5"
],
"milestone_id": "f9c0e08f-451e-40e2-bb4e-5bddd60fff2f",
"milestone_scope_id": "32082b08-55e8-4ace-aa24-147a42e408ee",
"milestone_scope_type": "group",
"parent_ref": {
"iid": 7,
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
},
"parent_uid": "1595c282-5499-444a-a674-8d3a62309e1e",
"points": 42,
"regressed_at": "2026-10-17T03:26:14Z",
"regressed_at_sha": "36b7218872d13be723e3ad2eb979ca829f5b015a",
"regressed_from_sha": "419a075aa0d44d64d36e8e3de9633c24ab14ada9",
"regressed_run_id": "9e2b7c41-3d5a-4f8e-b1c2-7a6d5e4f3c2b",
"severity": "critical",
"type_profile": {
"blueprint_id": "e163dfb5-2c76-4caa-8853-e7e1d8f5f9ce",
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
},
"verification": "unverified",
"verified_at": "2026-10-12T03:04:41Z",
"verified_at_sha": "06a251eee55ed1875f3ddfe8d001400fd3cd57a4",
"verified_run_id": "9e2b7c41-3d5a-4f8e-b1c2-7a6d5e4f3c2b",
"version": 42
}
400Bad request — a path parameter is not a well-formed value of its typeapplication/json
Error codes
  • BAD_REQUESTThe request is malformed: a parameter or a body field is not a well-formed value of its type
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
400 exampleSynthesized example
{
"error": {
"code": "code-fc8e",
"message": "Pin a page's payload to the build that rendered it"
}
}
401Unauthenticated — no credential, or an invalid oneapplication/json
Error codes
  • UNAUTHORIZEDNo credential was sent, or the one sent is invalid, expired or revoked
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
401 exampleSynthesized example
{
"error": {
"code": "code-d245",
"message": "Draw the region map from operation density"
}
}
403Forbidden — the caller's access level or token scope is insufficientapplication/json
Error codes
  • FORBIDDENYou are signed in but may not do this here; reason names the permission or the rule that refused it
  • INSUFFICIENT_SCOPEThe access token lacks the scope this operation needs; required_scope names it
  • PERMISSION_REQUIREDYou need a permission you do not hold here; the message names it
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
403 exampleSynthesized example
{
"error": {
"code": "code-ec3c",
"message": "Draw the region map from operation density"
}
}
404Not found — or found and private, which is masked as absentapplication/json
Error codes
  • NOT_FOUNDThe resource does not exist — or exists and you cannot see it: a private resource you have no access to answers exactly as an absent one does
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
404 exampleSynthesized example
{
"error": {
"code": "code-68e5",
"message": "Pin a page's payload to the build that rendered it"
}
}
409That milestone is closedapplication/json
Error codes
  • CONFLICTThe request conflicts with the resource's current state; reason says how
  • LEGAL_ACCEPTANCE_REQUIREDAccept the current Terms of Service before changing anything; reading stays open
  • errorErrorBody
    • The ErrorBody schema
    • codestringThe coarse category, tied to the status: NOT_FOUND, CONFLICT, INSUFFICIENT_SCOPE. Every error has one; the API reference's error catalogue lists them all.
    • messagestringWhat went wrong, for a person. Written to be read, not parsed: match on reason or code.
    • fieldstring or nulloptionalOn a 400 that refused one field's value, the field, as its JSON path: email, items[0].name. Put the message under that input. Absent on every other error.
    • reasonstring or nulloptionalThe specific code, when the error has one: LAST_ORGANIZATION_OWNER, BRANCH_PROTECTED. The message starts with it too. Match on this when it is present, and on code otherwise.
    • required_scopestring or nulloptionalThe scope the access token was missing, on INSUFFICIENT_SCOPE.
    • violationsanyoptionalPresent on the structured-validation errors (PROVIDER_VALIDATION_FAILED per-node, PIPELINE_VALIDATION_FAILED DAG): a JSON array of the offending elements, so a caller can fix every one in a single round-trip. Absent (omitted) on every other error.
409 exampleSynthesized example
{
"error": {
"code": "code-fce3",
"message": "Label every synthesized example"
}
}

CLI

gitmoap issues set-group-milestone

  • --group-ididGroup ID (id or group path)
  • --issue-ididWork-item iid
  • --milestone-idstring

Used in these guides