Skip to content
GitmoapAPIBeta
Planissues
POST/repositories/{repo_id}/issues/{issue_id}/move

Move a repository work item to another scope

move_issue
  • issue:delete
    A token needs the issue:delete scope: Delete work itemsGranted by write_api, write_repository.Every operation this scope unlocks
  • Audited · mutation

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

  • Quota · open issues per scope

    x-gitmoap-quota: {"kind":"enforced","arg":"open_issues_per_scope"}

Moves the work item to another repository or group, where it gets a new number; its comments, activity, relations and children go with it. Labels the destination does not define are dropped, and so is its milestone, and the response names both. It needs Maintainer here and Reporter at the destination, which must accept the work item's type and be below its open work-item limit; moving it to the scope it is already in, or to another organization, is refused. The old number keeps resolving to the work item, for anyone who can read it where it lives now.

Parameters

Path
  • repo_idRepositoryId (string · uuid)Repository ID
  • issue_idIssueId (integer · int64)Work-item iid

Request body

application/json
Request body exampleSynthesized example
{
"destination": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
}

Responses

200Moved. The item has a new referenceapplication/json
  • dropped_labelsarray of LabelKey (string)Labels that existed on the source and are not defined in the destination.
  • fromIssueRef
  • issueIssue
    • The Issue schema
    • 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.
  • toIssueRef
  • dropped_milestoneMilestoneId (string · uuid) or nulloptionalSet when the item carried a milestone the destination does not define.
200 exampleSynthesized example
{
"dropped_labels": [
"dropped-labels-353b",
"dropped-labels-d17e"
],
"from": {
"iid": 84,
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
},
"issue": {
"created_at": "2026-10-16T00:58:15Z",
"created_by": {
"email": "lin@acme.example",
"id": "id-5342",
"username": "lin",
"avatar_url": "https://gitmoap.example/acme/8ea9fa0e"
},
"iid": 57,
"root_scope_id": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69",
"scope_id": "df207ce7-8ff1-49a0-85f9-3b27a1d7d091",
"scope_type": "group",
"status_category": "triage",
"status_id": "6fba6010-b1a9-4d80-a369-eba71ae2dc18",
"title": "Label every synthesized example",
"uid": "5a700feb-87ce-4fcb-b6a8-0c56c9b8fc18",
"updated_at": "2026-10-13T03:22:31Z",
"work_item_type": "epic",
"ancestor_group_ids": [
"4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
],
"ancestor_issue_uids": [
"4155608c-45b2-4783-a39e-20363e4b18d4"
],
"assignee_ids": [
"e79291d3-905f-40d8-8bc4-2f36df576842"
],
"author_can_push": false,
"closed_at": "2026-10-14T21:55:35Z",
"closed_by": "a3f1c2d4-5e6f-4a7b-8c9d-0e1f2a3b4c5d",
"description": "Renders each region as density contours of its operations.",
"labels": [
"labels-07f3"
],
"milestone_id": "25d158ec-b17d-4a22-a454-4fe8d9dde25f",
"milestone_scope_id": "03f1e45e-4930-4e7a-b530-3f3d2103db37",
"milestone_scope_type": "group",
"parent_ref": {
"iid": 51,
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
},
"parent_uid": "4124da3c-9de0-4bd1-b173-20a537639a37",
"points": 12,
"regressed_at": "2026-10-10T09:58:38Z",
"regressed_at_sha": "baedb269c1d4f4b5cae1a9c6f3e0f791d06c69d7",
"regressed_from_sha": "857f492b2773b323108f5663b5b832c2761e9152",
"regressed_run_id": "9e2b7c41-3d5a-4f8e-b1c2-7a6d5e4f3c2b",
"severity": "critical",
"type_profile": {
"blueprint_id": "8bb21e8a-9b58-4d6a-b55f-b29b70a8b068",
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
},
"verification": "unverified",
"verified_at": "2026-10-09T14:49:56Z",
"verified_at_sha": "98a8a2fdf1eaa5ed6ffb6ff9f83df8ea1bbdd7c6",
"verified_run_id": "9e2b7c41-3d5a-4f8e-b1c2-7a6d5e4f3c2b",
"version": 51
},
"to": {
"iid": 8,
"scope": {
"group": "4c1d8e2f-6a3b-4f90-b7c5-1e2d3c4b5a69"
}
},
"dropped_milestone": "478906d5-e292-4e33-9aa1-5e73abe26f1c"
}
400The destination does not accept this type, is the scope the work item is already in, or is in another organizationapplication/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-f655",
"message": "Stream pipeline status into the run header"
}
}
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-68e0",
"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-70e4",
"message": "Label every synthesized example"
}
}
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-92a0",
"message": "Stream pipeline status into the run header"
}
}
409The work item changed, or was already moved; reload and retryapplication/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-2be0",
"message": "Label every synthesized example"
}
}
429The destination scope is at its open work-item limitapplication/json
Error codes
  • TOO_MANY_REQUESTSRetryableA quota, a rate limit or a transfer budget is spent. When the response carries Retry-After, retry after that many seconds
  • 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.
429 exampleSynthesized example
{
"error": {
"code": "code-d539",
"message": "Pin a page's payload to the build that rendered it"
}
}

CLI

gitmoap issues move

  • --repo-ididRepository ID (id or owner/repo path)
  • --issue-ididWork-item iid
  • --destinationjson

Used in these guides