---
title: "Set Agent Accounts"
method: PUT
path: "/api/agents/{instance_id}/accounts"
tags: ["agents"]
---

# Set Agent Accounts

`PUT /api/agents/{instance_id}/accounts`

## Request

- Base URL: `https://api.advisorppc.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.advisorppc.com/api/agents/{instance_id}/accounts`
- Auth: HTTP bearer

Point one agent at specific accounts, or clear it back to the default.

Admin, not superuser: unlike the engine above, which account an agent
reports on is the client's own decision. Writing the whole mapping in one
call keeps it atomic — a picker that cleared one connector and set another
would otherwise leave the agent half-configured between two requests.

## Path parameters

- `instance_id` integer, required

## Headers

- `X-Tenant-Id` integer, nullable

## Request body

- AccountsIn: ``connector_slug -> account_id``. Null clears every override; an empty mapping does the same, so a client can reset without having to send a null literal.
  - `accounts` object, nullable

## Response `200`

Successful Response

- AccountsOut
  - `id` integer, required
  - `accounts` object

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/advisorppc/apis/advisorppc-api.md) · [All operations](https://skmtc.dev/advisorppc/apis/advisorppc-api/llms.txt) · [OpenAPI document](https://skmtc.dev/advisorppc/apis/advisorppc-api/revisions/3441bd729e0c?raw)
