> ## Documentation Index
> Fetch the complete documentation index at: https://docs.qobra.co/llms.txt
> Use this file to discover all available pages before exploring further.

# update_user_managers

> Set who a user reports to, month by month. Declare the whole reporting line: a stretch left out is removed.

Set who a user reports to, month by month.

`managers` is the user's **whole** reporting line, past stretches included, not
an addition to it: a manager the list leaves out stops managing the user over
those months. Read the user with [`get_user`](https://docs.qobra.co/mcp_documentation/tools/get_user)
first and send back every stretch to keep, or the ones missing from your list
are removed. Passing an empty list leaves the user reporting to no one.
Declaring what is already there changes nothing, so the same call can be sent
twice.

Only what actually changed comes back in `attribution_changes`, each row saying
whether it was created, moved or removed.

No statement is recalculated by this call, as after a manager change in the web
app: a calculation that depends on the reporting line picks the change up the
next time it runs.

The call is refused, and nothing is written, when:

* two rows cover the same month: a user reports to one manager at a time.
* the user is named as their own manager.
* the user is archived, or a newly declared manager is.

Requires write permission on users. Available only where the Qobra write tools
beta is enabled. Every write is recorded in the audit trail as the `Qobra MCP`
agent.

```json Example arguments theme={null}
{
  "user_id": "jane.doe@acme.com",
  "managers": [
    {
      "manager_id": "paul.martin@acme.com",
      "start_period": "2025-01",
      "end_period": "2026-06"
    },
    { "manager_id": "lea.bernard@acme.com", "start_period": "2026-07" }
  ]
}
```

## Parameters

> **Body**
>
> **user\_id** `string` *required*
>
> Id of the user whose managers to set — the id list\_users returns. An exact
> email is accepted too.
>
> **managers** `object[]` *required*
>
> Who the user reports to, as the complete list — every manager, each with
> the months they manage the user for. This replaces the user's managers
> rather than adding to them: a manager missing from the list stops managing
> the user over those months. Pass an empty list to leave the user reporting
> to no one. A user has one manager at a time, so no month may be covered by
> two rows.
>
> **object properties**
>
> **manager\_id** `string` *required*
>
> Id or email of the manager, as a user reference carries them.
>
> **start\_period** `string` *required*
>
> YYYY-MM; the first month this management covers.
>
> **end\_period** `string`
>
> YYYY-MM; the last month it covers, included. Omit it for a management
> that stays open with no end.

## Response

> **Body**
>
> **user** `object`
>
> The user whose managers the call set.
>
> **object properties**
>
> **id** `string`
>
> **email** `string`
>
> **name** `string`
>
> **attribution\_changes** `object[]`
>
> Every management the call actually changed — created, moved, or removed
> because the declared list no longer held it. Empty when the declared
> managers already matched what the user had, which is how a repeated call
> reads as the no-op it was.
>
> **object properties**
>
> **action** `string`
>
> `created` for a management this call added; `moved` for one that
> already existed and had its dates changed, the row showing the new
> ones; `removed` for one the declared set no longer holds.
>
> **attribution** `object`
>
> The management as it now stands — its last state before removal for a
> "removed" row, since the user no longer reports to that manager over
> those months.
>
> **object properties**
>
> **manager** `object`
>
> **object properties**
>
> **id** `string`
>
> **email** `string`
>
> **name** `string`
>
> **start\_date** `string`
>
> YYYY-MM; the month the management started.
>
> **end\_date** `string`
>
> YYYY-MM; null while the management is still ongoing.


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.