Skip to main content
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 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.
Example arguments

Parameters

Body

string
required
Id of the user whose managers to set — the id list_users returns. An exact email is accepted too.
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.

Response

Body

object
The user whose managers the call set.
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.