---
title: "POST /uploads/{id}/factor-agent/groups/{groupKey}/include"
method: POST
path: "/uploads/{id}/factor-agent/groups/{groupKey}/include"
tags: ["Uploads"]
---

# POST /uploads/{id}/factor-agent/groups/{groupKey}/include

`POST /uploads/{id}/factor-agent/groups/{groupKey}/include`

Bring a boundary group (boundary:journal|<code> or boundary:account|<code>) back inside the Scope 3 boundary. The reviewer's decision joins the upload's boundary policy and the organization's memory (source reviewer, above every other), and a regroup job moves the group's rows to the keys the policy now gives them, deciding and matching only the groups that are new; every row and cent of the ledger stays. The group key is percent-encoded as one path segment.

## Path parameters

- `id` integer, required
- `groupKey` string, required

## Request body

- object

## Response `202`

The regroup job, queued. Poll GET .../factor-agent/jobs/{documentJobId} (kind regroup) until it ends; while it runs the analysis reads processing and names it (jobId). Its progress phases, in order: regroup_classify "Deciding the new keys", regroup_apply "Moving the rows", regroup_match "Matching emission factors", regroup_duplicates "Checking duplicate spend lines", regroup_finish "Finishing the review" (done and total count the rows the regroup moves). A regroup cannot be cancelled.

- DocumentJobAcceptedResponse
  - `data` object, required
    - `jobId` string, required
    - `kind` 'analyze' | 'submit' | 'regroup', required
    - `status` 'queued' | 'running', required

## Other responses

- `400` — NOT_A_BOUNDARY_GROUP: the group is not a boundary group; VALIDATION_ERROR: a malformed body.
- `401` — Unauthorized
- `403` — Forbidden
- `404` — NOT_FOUND: no such upload in the request's workspace, no such group, or nothing left to move (the decision is already applied).
- `409` — LEDGER_POLICY_NOT_ENABLED (the boundary policy is off on this server), LEDGER_POLICY_NOT_APPLIED (the analysis was read without the policy; run Re Analysis), DOCUMENT_JOB_RUNNING (any live job of the upload, an analysis awaiting its answers included; details.jobId and details.kind), UPLOAD_SUBMITTED, or ANALYSIS_NOT_REVIEWABLE (the analysis is not completed or needs_input).

## Changes

- **2026-10-04** `77d466d0e73d` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/greentally/apis/esgai-api/changes/uploads/:id/factor-agent/groups/:groupKey/include/post.md)

---

[API](https://skmtc.dev/greentally/apis/esgai-api.md) · [All operations](https://skmtc.dev/greentally/apis/esgai-api/llms.txt) · [OpenAPI document](https://skmtc.dev/greentally/apis/esgai-api/revisions/77d466d0e73d?raw)
