# Managers

Source: https://docs.autessa.com/docs/api/poweruser/managers

> Poweruser endpoints for creating, configuring, versioning, publishing, sharing, and analyzing managers and their sub-agent wiring.

# Managers

Manage multi-agent managers programmatically: create and configure them, wire up sub-agents, publish and roll back versions, inspect conversation history and statistics, and control sharing and ownership.

> All paths on this page are relative to `https://api.autessa.com/autessa_poweruser/managers`. Every request is a POST with a JSON body, and every ID is an opaque string. See the [Poweruser API overview](/docs/api/poweruser.md) for authentication and conventions.

---

## The manager object

A manager coordinates a team of agents: it reasons about the user's request,
delegates tasks to its sub-agents, and composes their results into a
response. Managers are returned as an object keyed on `managerType`; the
only type today is `SIMPLE`.

- `managerId` (string) — Unique manager identifier.
- `managerType` (string) — Currently always `SIMPLE`. Immutable after creation.
- `versionNumber` (integer) — Version number when reading a specific published or archived version; absent on the draft working copy.
- `name` (string) — Display name.
- `description` (string) — What the manager does.
- `instructions` (string) — The system prompt. Defaults to `"Coordinate and manage the agents to accomplish the task"`. May contain `@@{variableName}@@` placeholders filled from `promptTemplateVariables` at execution time.
- `model` (string) — Model alias: `BIG_INSTRUCTION_FOLLOWING_REASONING`, `BIG_INSTRUCTION_FOLLOWING`, `SMALL_INSTRUCTION_FOLLOWING`, `VIBE_CODING`, or `AUTESSA_120B`. Defaults to `SMALL_INSTRUCTION_FOLLOWING`.
- `voiceConfig` (object) — Voice settings for audio output: `voiceModel` (`SMALL`, `MEDIUM`, `LARGE`) and `voiceName`.
- `languages` (array<LanguageEntry>) — The languages the manager speaks on phone calls and in voice mode, up to 10, each in the same [language entry](/docs/api/poweruser/agents.md#language-entries) shape as an agent's, with the same limits. A language's `voice` falls back to the manager's `voiceConfig`. With two or more, calls start in `defaultLanguage` and switch for good to another listed language once the caller says 3 or more words in it, and every sub-agent the manager delegates to answers in that language (plus that sub-agent's own extra instructions for it, when it has the language). Sub-agents' own `languages` don't affect a manager's calls. With none, or only an English one, the manager works as it always has; with only a Spanish one, every call is in Spanish from the start. On update, omit it to keep the current languages; send `[]` to clear them. See [Multi-agents](/docs/guide/agentic/phone-numbers.md#multi-agents).
- `defaultLanguage` (string) — The language calls start in, such as `en-US`. Must be one of the codes in `languages`. Absent means the first entry in `languages`, or `en-US` when there are none. On update, omit it to keep the current value.
- `listening` (object) — How the manager listens on phone calls, in the same [listening settings](/docs/api/poweruser/agents.md#listening-settings) shape as an agent's, with the same limits. On a manager's calls, its settings apply and sub-agents' own `listening` is ignored. With keypad `mode` `WHEN_ASKED`, give a sub-agent the `PHONE_KEYPAD_INPUT` tool. Fields left unset use the phone number's AI call behavior, then the defaults. On update, omit it to keep the current settings; send `{}` to clear them. See [Agent listening and keypad settings](/docs/guide/agentic/phone-numbers.md#agent-listening-and-keypad-settings).
- `promptTemplateVariables` (object) — Map of variable name to argument definition (`description`, `isRequired`, `argumentSchema` — a JSON Schema object).
- `evaluationNotes` (string) — Grading rubric used by automated evaluation.
- `lastPublishedTime` (string) — ISO-8601 timestamp of the last publish, or absent if never published.
- `tags` (array<string>) — Free-form organizational tags.
- `maxIterations` (integer) — `SIMPLE` — maximum coordination-loop iterations per turn (default `10`). Each sub-agent delegation consumes an iteration.
- `agents` (array<Agent>) — `SIMPLE` — the sub-agents the manager can delegate to. Reads return agent summaries; when updating, each entry only needs its `agentId` — the manager stores references and resolves the agents' published versions at execution time. See [Agents](/docs/api/poweruser/agents.md).

```json title="Manager object (SIMPLE)"
{
  "managerId": "mZ8kW3qN5d",
  "managerType": "SIMPLE",
  "name": "Customer Success Manager",
  "description": "Coordinates triage, research, and reply agents for support requests.",
  "instructions": "Coordinate and manage the agents to accomplish the task",
  "model": "BIG_INSTRUCTION_FOLLOWING",
  "voiceConfig": {
    "voiceModel": "SMALL",
    "voiceName": "FEMALE"
  },
  "promptTemplateVariables": {},
  "evaluationNotes": "A good conversation resolves the request end to end.",
  "lastPublishedTime": "2026-06-28T17:42:10",
  "tags": ["support"],
  "maxIterations": 10,
  "agents": [
    {
      "agentId": "V1StGXR8Z5",
      "agentType": "SIMPLE",
      "name": "Support Triage Agent",
      "description": "Classifies inbound support tickets and drafts replies."
    }
  ]
}
```

---

## Versioning and access levels

Managers follow the platform-wide draft/published model (see the
[Versions guide](/docs/guide/agentic/versions.md)):

- **Draft** — [`/update`](#update-a-manager) always edits the draft working
  copy.
- **Published** — [`/publish`](#publish-a-manager) snapshots the draft as a
  new published version; the previously published version becomes
  **archived**.
- **Rollback** — [`/rollback`](#roll-back-a-manager) republishes an archived
  version. The draft is untouched.

Endpoints enforce the caller's access level on the manager (the poweruser
key acts as its linked user):

| Operation | Required access |
|-----------|-----------------|
| `get`, `get-all`, `versions`, `conversations`, `conversation`, `statistics`, `get-sharing-details` | Any access (READ or higher) |
| `update` | WRITE, PUBLISH, or ADMIN |
| `publish`, `rollback` | PUBLISH or ADMIN |
| `delete`, `share` | ADMIN |
| `transfer-ownership` | Owner only |

---

## Create a manager

**POST** `/managers/create`

Creates a new manager as a draft. `managerName` and `managerDescription`
are both required — creation fails with an error message if either is
blank. Wire up instructions, model, and sub-agents afterwards with
[`/update`](#update-a-manager), then [`/publish`](#publish-a-manager) to make it
executable.

### Request parameters

- `managerType` (string) — Currently only `SIMPLE`.
- `managerName` (string, required) — Display name. Must be non-blank.
- `managerDescription` (string, required) — Description of the manager's purpose. Must be non-blank.

### Response

- `manager` (Manager) — The newly created manager object.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/managers/create \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "managerType": "SIMPLE",
    "managerName": "Customer Success Manager",
    "managerDescription": "Coordinates triage, research, and reply agents for support requests."
  }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/managers/create',
  {
    method: 'POST',
    headers: {
      'Authorization': process.env.POWERUSER_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({
      managerType: 'SIMPLE',
      managerName: 'Customer Success Manager',
      managerDescription: 'Coordinates triage, research, and reply agents for support requests.'
    })
  }
);

const { manager } = await response.json();
console.log(manager.managerId);
```

**Python:**

```python
import os
import requests

response = requests.post(
    'https://api.autessa.com/autessa_poweruser/managers/create',
    headers={'Authorization': os.environ['POWERUSER_KEY']},
    json={
        'managerType': 'SIMPLE',
        'managerName': 'Customer Success Manager',
        'managerDescription': 'Coordinates triage, research, and reply agents for support requests.'
    }
)

manager = response.json()['manager']
```

```json title="Response (truncated)"
{
  "manager": {
    "managerId": "mZ8kW3qN5d",
    "managerType": "SIMPLE",
    "name": "Customer Success Manager",
    "description": "Coordinates triage, research, and reply agents for support requests.",
    "instructions": "Coordinate and manage the agents to accomplish the task",
    "model": "SMALL_INSTRUCTION_FOLLOWING",
    "maxIterations": 10,
    "agents": []
  },
  "errors": []
}
```

---

## Get a manager

**POST** `/managers/get`

Retrieves a manager's full configuration, including its sub-agent list.

### Request parameters

- `managerId` (string, required) — The manager to fetch.

### Response

- `manager` (Manager) — The manager object.
- `permission` (string) — The calling user's access level on this manager: `READ`, `WRITE`, `PUBLISH`, or `ADMIN`.
- `voiceOptionsList` (array<VoiceOptions>) — Voice models available to the company, each with `voiceModel` and a `voices` object listing `builtInVoiceNames` and `customVoiceNames` (custom voice clones, on supported models).
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/managers/get \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "managerId": "mZ8kW3qN5d" }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/managers/get',
  {
    method: 'POST',
    headers: {
      'Authorization': process.env.POWERUSER_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ managerId: 'mZ8kW3qN5d' })
  }
);

const { manager, permission } = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    'https://api.autessa.com/autessa_poweruser/managers/get',
    headers={'Authorization': os.environ['POWERUSER_KEY']},
    json={'managerId': 'mZ8kW3qN5d'}
)

data = response.json()
```

```json title="Response (truncated)"
{
  "manager": {
    "managerId": "mZ8kW3qN5d",
    "managerType": "SIMPLE",
    "name": "Customer Success Manager",
    "model": "BIG_INSTRUCTION_FOLLOWING",
    "maxIterations": 10,
    "agents": [
      { "agentId": "V1StGXR8Z5", "name": "Support Triage Agent" }
    ]
  },
  "permission": "ADMIN",
  "voiceOptionsList": [
    {
      "voiceModel": "SMALL",
      "voices": {
        "builtInVoiceNames": ["FEMALE", "MALE"],
        "customVoiceNames": []
      }
    }
  ],
  "errors": []
}
```

---

## List all managers

**POST** `/managers/get-all`

Lists every manager visible to the linked user, grouped by how they have
access. Entries are lightweight summaries — use [`/get`](#get-a-manager) for
full configuration.

### Request parameters

None — send an empty object `{}`.

### Response

- `ownedManagers` (array<Manager>) — Managers the linked user owns.
- `companySharedManagers` (array<Manager>) — Managers shared with the whole company.
- `sharedWithMeManagers` (array<Manager>) — Managers shared specifically with the linked user.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/get-all \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'
```

```json title="Response"
{
  "ownedManagers": [
    {
      "managerId": "mZ8kW3qN5d",
      "managerType": "SIMPLE",
      "name": "Customer Success Manager",
      "description": "Coordinates triage, research, and reply agents for support requests.",
      "tags": ["support"],
      "lastPublishedTime": "2026-06-28T17:42:10"
    }
  ],
  "companySharedManagers": [],
  "sharedWithMeManagers": [],
  "errors": []
}
```

---

## Update a manager

**POST** `/managers/update`

Replaces the manager's draft configuration with `updatedManager`. This is a
whole-object update: fetch the draft with [`/get`](#get-a-manager), modify it,
and send the full object back. To change the sub-agent team, set `agents` to
the desired list — each entry only needs its `agentId`. Published versions
are unaffected until you [`/publish`](#publish-a-manager).

Requires WRITE, PUBLISH, or ADMIN access.

### Request parameters

- `managerId` (string, required) — The manager to update.
- `updatedManager` (Manager, required) — The complete manager object to store as the new draft, using the [manager object](#the-manager-object) shape; `managerType` must match the existing manager.

### Response

- `updatedManager` (Manager) — The stored draft, with sub-agent summaries hydrated.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/managers/update \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "managerId": "mZ8kW3qN5d",
    "updatedManager": {
      "managerId": "mZ8kW3qN5d",
      "managerType": "SIMPLE",
      "name": "Customer Success Manager",
      "description": "Coordinates triage, research, and reply agents for support requests.",
      "instructions": "Delegate each request to the best agent. Escalate billing issues.",
      "model": "BIG_INSTRUCTION_FOLLOWING",
      "maxIterations": 10,
      "agents": [
        { "agentId": "V1StGXR8Z5" },
        { "agentId": "aQ6rD4xL8c" }
      ]
    }
  }'
```

**JavaScript:**

```javascript
// Read-modify-write the draft
const base = 'https://api.autessa.com/autessa_poweruser/managers';
const headers = {
  'Authorization': process.env.POWERUSER_KEY,
  'Content-Type': 'application/json'
};

const getResp = await fetch(`${base}/get`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ managerId: 'mZ8kW3qN5d' })
});
const { manager } = await getResp.json();

manager.agents = [{ agentId: 'V1StGXR8Z5' }, { agentId: 'aQ6rD4xL8c' }];
manager.instructions = 'Delegate each request to the best agent.';

await fetch(`${base}/update`, {
  method: 'POST',
  headers,
  body: JSON.stringify({ managerId: manager.managerId, updatedManager: manager })
});
```

**Python:**

```python
import os
import requests

headers = {'Authorization': os.environ['POWERUSER_KEY']}
base = 'https://api.autessa.com/autessa_poweruser/managers'

manager = requests.post(f'{base}/get', headers=headers,
                        json={'managerId': 'mZ8kW3qN5d'}).json()['manager']

manager['agents'] = [{'agentId': 'V1StGXR8Z5'}, {'agentId': 'aQ6rD4xL8c'}]

requests.post(f'{base}/update', headers=headers,
              json={'managerId': manager['managerId'], 'updatedManager': manager})
```

```json title="Response (truncated)"
{
  "updatedManager": {
    "managerId": "mZ8kW3qN5d",
    "managerType": "SIMPLE",
    "name": "Customer Success Manager",
    "agents": [
      { "agentId": "V1StGXR8Z5", "name": "Support Triage Agent" },
      { "agentId": "aQ6rD4xL8c", "name": "Billing Research Agent" }
    ]
  },
  "errors": []
}
```

---

## Publish a manager

**POST** `/managers/publish`

Snapshots the current draft as a new published version. Client API
executions that don't pin a version always use the latest published version.
The previously published version becomes archived and remains available for
[`/rollback`](#roll-back-a-manager).

Requires PUBLISH or ADMIN access.

### Request parameters

- `managerId` (string, required) — The manager to publish.

### Response

- `publishedManagerVersion` (integer) — The new published version number.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/publish \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "managerId": "mZ8kW3qN5d" }'
```

```json title="Response"
{
  "publishedManagerVersion": 2,
  "errors": []
}
```

---

## Roll back a manager

**POST** `/managers/rollback`

Republishes an archived version, making it the live published version again.
The draft working copy is not changed. Use [`/versions`](#list-versions) to
find rollback candidates.

Requires PUBLISH or ADMIN access.

### Request parameters

- `managerId` (string, required) — The manager to roll back.
- `versionToRollback` (integer, required) — The archived version number to republish.

### Response

- `newPublishedVersion` (integer) — The version number now published.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/rollback \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "managerId": "mZ8kW3qN5d", "versionToRollback": 1 }'
```

```json title="Response"
{
  "newPublishedVersion": 3,
  "errors": []
}
```

---

## List versions

**POST** `/managers/versions`

Returns the manager's published version and all archived version numbers.

### Request parameters

- `managerId` (string, required) — The manager to inspect.

### Response

- `currentPublishedVersion` (integer) — The live published version, or absent if the manager was never published.
- `archivedVersions` (array<integer>) — Previously published version numbers available for rollback.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/versions \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "managerId": "mZ8kW3qN5d" }'
```

```json title="Response"
{
  "currentPublishedVersion": 2,
  "archivedVersions": [1],
  "errors": []
}
```

---

## List conversations

**POST** `/managers/conversations`

Returns the manager's conversation history, newest first, paginated. By
default sub-agent conversations are referenced by ID inside the logs; pass
`expandAgents: true` to inline the full agent conversations.

### Request parameters

- `managerId` (string, required) — The manager whose conversations to list.
- `page` (integer) — Zero-based page index. Defaults to `0`.
- `includeMySandboxConversations` (boolean) — Also include the calling user's sandbox (Builder test) conversations. Defaults to `false`.
- `expandAgents` (boolean) — Inline each delegated agent's full conversation inside its `INVOKE_AGENT_RESPONSE` log entry instead of returning only the agent conversation ID. Defaults to `false`.

### Response

- `conversations` (array<Conversation>) — Conversation records. Each has `resourceId` (the manager's ID), `version`, `conversationId`, `apiKeyId` (or `"my-sandbox"`), `closeDate`, `language` (for voice conversations of a manager with [more than one language](#the-manager-object), the language the conversation settled on, such as `es-US`; `null` otherwise), `logs` (see [conversation logs](#conversation-logs)), `currentIteration` (coordination iterations used), and an optional `evaluationContext`.
- `totalElements` (integer) — Total conversations across all pages.
- `totalPages` (integer) — Total number of pages.
- `currentPage` (integer) — The page returned.
- `pageSize` (integer) — Conversations per page.
- `hasNext` (boolean) — Whether another page exists.
- `hasPrevious` (boolean) — Whether a previous page exists.
- `errors` (array<string>) — Error messages, if any occurred.

**cURL:**

```bash
curl https://api.autessa.com/autessa_poweruser/managers/conversations \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "managerId": "mZ8kW3qN5d", "page": 0, "expandAgents": false }'
```

**JavaScript:**

```javascript
const response = await fetch(
  'https://api.autessa.com/autessa_poweruser/managers/conversations',
  {
    method: 'POST',
    headers: {
      'Authorization': process.env.POWERUSER_KEY,
      'Content-Type': 'application/json'
    },
    body: JSON.stringify({ managerId: 'mZ8kW3qN5d', page: 0 })
  }
);

const { conversations, hasNext } = await response.json();
```

**Python:**

```python
import os
import requests

response = requests.post(
    'https://api.autessa.com/autessa_poweruser/managers/conversations',
    headers={'Authorization': os.environ['POWERUSER_KEY']},
    json={'managerId': 'mZ8kW3qN5d', 'page': 0}
)

data = response.json()
```

```json title="Response (truncated)"
{
  "conversations": [
    {
      "resourceId": "mZ8kW3qN5d",
      "version": "2",
      "conversationId": "conv_m7f2e9c1a4",
      "apiKeyId": "key_xyz",
      "closeDate": "2026-06-30T09:15:22",
      "currentIteration": 3,
      "logs": [
        {
          "logType": "USER_INPUT",
          "combinedMultimodalInput": [
            { "inputType": "TEXT", "content": "My last invoice looks wrong." }
          ]
        },
        {
          "logType": "INVOKE_AGENT_REQUEST",
          "invokeAgentRequest": {
            "invocationId": "8f3a1c2e-...",
            "agentId": "aQ6rD4xL8c",
            "agentName": "Billing Research Agent",
            "taskDescription": "Look up the customer's latest invoice and check the line items."
          }
        },
        {
          "logType": "INVOKE_AGENT_RESPONSE",
          "invokeAgentResponse": {
            "invocationId": "8f3a1c2e-...",
            "agentId": "aQ6rD4xL8c",
            "responseType": "COMPLETE",
            "summary": "Invoice INV-1042 double-billed the June commitment."
          }
        },
        {
          "logType": "MESSAGE_TO_USER",
          "multimodalOutput": {
            "outputType": "TEXT",
            "content": "You're right — the June commitment was billed twice. I've flagged it."
          }
        }
      ],
      "evaluationContext": null
    }
  ],
  "totalElements": 42,
  "totalPages": 5,
  "currentPage": 0,
  "pageSize": 10,
  "hasNext": true,
  "hasPrevious": false,
  "errors": []
}
```

### Conversation logs

Each entry in `logs` has a `logType` that determines which other fields are
present:

| logType | Payload |
|---------|---------|
| `USER_INPUT` | `combinedMultimodalInput` — array of text/audio inputs from the user. |
| `MANAGER_REASONING` | `multimodalOutput` — the manager's internal reasoning. |
| `MESSAGE_TO_USER` | `multimodalOutput` — the manager's text or audio response. |
| `INVOKE_AGENT_REQUEST` | `invokeAgentRequest` — `invocationId`, `agentId`, `agentName`, `taskDescription`, `context`, `variables`, and any forwarded multimodal inputs. |
| `INVOKE_AGENT_RESPONSE` | `invokeAgentResponse` — matching `invocationId`, `agentId`, `agentName`, `responseType` (`COMPLETE` or `HELP`), `summary` (for COMPLETE), `helpRequest` (for HELP), and the sub-agent's conversation ID (expanded inline when `expandAgents` is true). |
| `USER_REQUEST` | `userRequest` — the manager asking the user for clarification; the reply appears as `userResponse`. |

Audio entries additionally carry playback metadata (`playbackState`,
`playbackStartedAt`, `playbackCompletedAt`, `spokenContent` when a response
was interrupted).

---

## Get a conversation

**POST** `/managers/conversation`

Fetches a single conversation by ID — unlike
[`/conversations`](#list-conversations) this is not paginated, so deep links
to older conversations resolve directly.

### Request parameters

- `managerId` (string, required) — The manager the conversation belongs to.
- `conversationId` (string, required) — The conversation to fetch.
- `expandAgents` (boolean) — Inline delegated agents' full conversations. Defaults to `false`.

### Response

- `conversation` (Conversation) — The conversation record, same shape as entries in [`/conversations`](#list-conversations).
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/conversation \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "managerId": "mZ8kW3qN5d",
    "conversationId": "conv_m7f2e9c1a4",
    "expandAgents": true
  }'
```

```json title="Response (truncated)"
{
  "conversation": {
    "resourceId": "mZ8kW3qN5d",
    "version": "2",
    "conversationId": "conv_m7f2e9c1a4",
    "currentIteration": 3,
    "logs": [ { "logType": "USER_INPUT", "combinedMultimodalInput": [] } ],
    "evaluationContext": {
      "humanEvaluation": {
        "status": "SUCCESSFUL",
        "notes": "Resolved on first contact.",
        "evaluationTime": "2026-06-30T10:02:44"
      }
    }
  },
  "errors": []
}
```

---

## Get statistics

**POST** `/managers/statistics`

Aggregated evaluation statistics for a manager, optionally windowed by date,
with a per-version breakdown.

### Request parameters

- `managerId` (string, required) — The manager to analyze.
- `startDate` (string) — ISO-8601 date-time lower bound (for example `"2026-06-01T00:00:00"`).
- `endDate` (string) — ISO-8601 date-time upper bound.

### Response

- `statistics` (object) — The statistics envelope.
- `statistics.totalConversations` (integer) — Conversations in the window.
- `statistics.humanEvaluation` (EvaluationStats) — Counts from human evaluations: `totalEvaluated`, `successful`, `successfulNotEfficient`, `successfulNotAllSteps`, `unsuccessful`.
- `statistics.automatedEvaluation` (EvaluationStats) — Same counts from automated evaluation.
- `statistics.humanPrecedenceEvaluation` (EvaluationStats) — Merged view where a human verdict overrides the automated one for the same conversation.
- `statistics.versionBreakdown` (object) — Map of version number to a per-version stats object with the same fields.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/statistics \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "managerId": "mZ8kW3qN5d",
    "startDate": "2026-06-01T00:00:00",
    "endDate": "2026-07-01T00:00:00"
  }'
```

```json title="Response (truncated)"
{
  "statistics": {
    "totalConversations": 42,
    "humanEvaluation": {
      "totalEvaluated": 12,
      "successful": 9,
      "successfulNotEfficient": 1,
      "successfulNotAllSteps": 1,
      "unsuccessful": 1
    },
    "automatedEvaluation": {
      "totalEvaluated": 42,
      "successful": 33,
      "successfulNotEfficient": 4,
      "successfulNotAllSteps": 2,
      "unsuccessful": 3
    },
    "humanPrecedenceEvaluation": {
      "totalEvaluated": 42,
      "successful": 34,
      "successfulNotEfficient": 3,
      "successfulNotAllSteps": 2,
      "unsuccessful": 3
    },
    "versionBreakdown": {
      "2": { "totalConversations": 28 }
    }
  },
  "errors": []
}
```

---

## Submit a human evaluation

**POST** `/managers/submit-evaluation`

Attaches a human evaluation to a manager conversation. Human evaluations take
precedence over automated ones in [statistics](#get-statistics). The
evaluation timestamp and evaluator are set server-side from the calling
user — you only supply the verdict and notes.

### Request parameters

- `managerId` (string) — The manager the conversation belongs to.
- `conversationId` (string, required) — The conversation being evaluated.
- `humanEvaluation` (object, required) — The evaluation payload.
- `humanEvaluation.status` (string, required) — One of `SUCCESSFUL`, `SUCCESSFUL_NOT_EFFICIENT`, `SUCCESSFUL_NOT_ALL_STEPS`, `UNSUCCESSFUL`.
- `humanEvaluation.notes` (string) — Free-form reviewer notes.

### Response

- `errors` (array<string>) — Error messages, if any occurred (for example `"Conversation not found"`).

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/submit-evaluation \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "managerId": "mZ8kW3qN5d",
    "conversationId": "conv_a1b2c3d4e5",
    "humanEvaluation": {
      "status": "SUCCESSFUL",
      "notes": "Routed to the right sub-agent and resolved on first pass."
    }
  }'
```

```json title="Response"
{
  "errors": []
}
```

---

## Delete a manager

**POST** `/managers/delete`

Permanently deletes a manager, including its draft and version history. The
sub-agents themselves are not deleted. This is destructive and cannot be
undone.

Requires ADMIN access on the manager.

### Request parameters

- `managerId` (string, required) — The manager to delete.

### Response

- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/delete \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "managerId": "mZ8kW3qN5d" }'
```

```json title="Response"
{
  "errors": []
}
```

---

## Share a manager

**POST** `/managers/share`

Sets the manager's sharing level and per-user grants in one call.

Requires ADMIN access on the manager.

> This endpoint changes the same sharing as the [Share dialog](/docs/guide/platform/sharing.md). Sharing with `COMPANY` adds a company-wide grant and keeps everyone already shared individually at their own level. People get the highest level from any grant that covers them.

### Request parameters

- `managerId` (string, required) — The manager to share.
- `level` (string) — Sharing level: `PRIVATE`, `SPECIFIC_MEMBER`, or `COMPANY`.
- `accessLevel` (string) — When `level` is `COMPANY`, the access level every company member gets: `READ`, `WRITE`, `PUBLISH`, or `ADMIN`.
- `usersToAdd` (array<UserShare>) — Users to grant access. Each entry: `userEmail` or `userId` (string), plus `accessLevel`.
- `usersToRemove` (array<UserShare>) — Users whose access to revoke, same entry shape.

### Response

- `level` (string) — The resulting sharing level.
- `accessLevel` (string) — The resulting company-wide access level, when shared with the company.
- `usersWithAccess` (array<UserShare>) — The resulting per-user grants.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/share \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "managerId": "mZ8kW3qN5d",
    "level": "SPECIFIC_MEMBER",
    "usersToAdd": [
      { "userEmail": "sam@acme.com", "accessLevel": "WRITE" }
    ],
    "usersToRemove": []
  }'
```

```json title="Response"
{
  "level": "SPECIFIC_MEMBER",
  "usersWithAccess": [
    {
      "userEmail": "sam@acme.com",
      "userId": "uB7nT2wQ9k",
      "accessLevel": "WRITE"
    }
  ],
  "errors": []
}
```

---

## Get sharing details

**POST** `/managers/get-sharing-details`

Returns the manager's current sharing configuration and the calling user's
own access level.

### Request parameters

- `managerId` (string, required) — The manager to inspect.

### Response

- `sharingLevel` (string) — `PRIVATE`, `SPECIFIC_MEMBER`, or `COMPANY`.
- `companyPermissionLevel` (string) — Access level granted company-wide, when `sharingLevel` is `COMPANY`.
- `sharedWith` (array<UserShare>) — Per-user grants: `userEmail`, `userId`, `accessLevel`.
- `userAccessLevel` (string) — The calling user's effective access level.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/get-sharing-details \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "managerId": "mZ8kW3qN5d" }'
```

```json title="Response"
{
  "sharingLevel": "SPECIFIC_MEMBER",
  "companyPermissionLevel": null,
  "sharedWith": [
    {
      "userEmail": "sam@acme.com",
      "userId": "uB7nT2wQ9k",
      "accessLevel": "WRITE"
    }
  ],
  "userAccessLevel": "ADMIN",
  "errors": []
}
```

---

## Transfer ownership

**POST** `/managers/transfer-ownership`

Transfers the manager to another member of the company. Only the **current
owner** may call this, and the new owner must already have some access to
the manager (share it with them first).

### Request parameters

- `managerId` (string, required) — The manager to transfer.
- `newOwnerId` (string, required) — User ID of the new owner. Must be a member of the company with existing access to the manager.

### Response

- `errors` (array<string>) — Error messages, if any occurred (for example `"New owner does not have access to manager yet."`).

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/transfer-ownership \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "managerId": "mZ8kW3qN5d",
    "newOwnerId": "uB7nT2wQ9k"
  }'
```

```json title="Response"
{
  "errors": []
}
```

---

## Generate an audio upload link

**POST** `/managers/generate-audio-upload-link`

Returns a pre-signed S3 URL for uploading a WAV audio file. Upload the file
with an HTTP `PUT` to `uploadUrl`, then reference the returned `s3Uri`
wherever an audio input is accepted.

### Request parameters

None — send an empty object `{}` (WAV format is currently fixed).

### Response

- `uploadUrl` (string) — Pre-signed URL; `PUT` the file bytes here with `Content-Type: audio/wav`.
- `s3Uri` (string) — Key of the uploaded file. Pass it as `s3Uri` in the matching input.
- `expiresInSeconds` (integer) — How long the upload URL stays valid.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/generate-audio-upload-link \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{}'

# Then upload the file:
curl -X PUT "$UPLOAD_URL" \
  -H "Content-Type: audio/wav" \
  --data-binary '@recording.wav'
```

```json title="Response"
{
  "uploadUrl": "https://s3.amazonaws.com/autessa-audio/...",
  "s3Uri": "temp/audio/1024/8f3a2b7c.wav",
  "expiresInSeconds": 3600,
  "errors": []
}
```

---

## Generate an image upload link

**POST** `/managers/generate-image-upload-link`

Returns a pre-signed S3 URL for uploading an image.

### Request parameters

- `fileExtension` (string) — `"png"`, `"jpg"`, or `"jpeg"`. Defaults to `"png"`.

### Response

- `uploadUrl` (string) — Pre-signed URL; `PUT` the file bytes here.
- `s3Uri` (string) — Key of the uploaded file. Pass it as `s3Uri` in the matching input.
- `mimeType` (string) — MIME type to send as `Content-Type` on the upload.
- `expiresInSeconds` (integer) — How long the upload URL stays valid.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/generate-image-upload-link \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "fileExtension": "png" }'
```

```json title="Response"
{
  "uploadUrl": "https://s3.amazonaws.com/autessa-images/...",
  "s3Uri": "temp/images/1024/2b7c9d1e.png",
  "mimeType": "image/png",
  "expiresInSeconds": 3600,
  "errors": []
}
```

---

## Generate a file upload link

**POST** `/managers/generate-file-upload-link`

Returns a pre-signed S3 URL for uploading an arbitrary document.

### Request parameters

- `fileExtension` (string) — File extension, for example `"pdf"`, `"docx"`, `"txt"`.

### Response

- `uploadUrl` (string) — Pre-signed URL; `PUT` the file bytes here.
- `s3Uri` (string) — Key of the uploaded file. Pass it as `s3Uri` in the matching input.
- `mimeType` (string) — MIME type to send as `Content-Type` on the upload.
- `expiresInSeconds` (integer) — How long the upload URL stays valid.
- `errors` (array<string>) — Error messages, if any occurred.

```bash title="cURL"
curl https://api.autessa.com/autessa_poweruser/managers/generate-file-upload-link \
  -X POST \
  -H "Authorization: $POWERUSER_KEY" \
  -H "Content-Type: application/json" \
  -d '{ "fileExtension": "pdf" }'
```

```json title="Response"
{
  "uploadUrl": "https://s3.amazonaws.com/autessa-files/...",
  "s3Uri": "temp/files/1024/9d1e4a6f.pdf",
  "mimeType": "application/pdf",
  "expiresInSeconds": 3600,
  "errors": []
}
```

---

## Errors

| Status | When |
|--------|------|
| `200` | Success — check `errors` for validation messages (blank name/description on create, unknown conversation ID). |
| `401` | The linked user lacks the required access level (see the [access table](#versioning-and-access-levels)), or is not the owner for `transfer-ownership`. |
| `403` | Scoped key without the endpoint in its allow-list. |
| `408` | Server-side error; `errors` contains the message. |

---

## Related

- [Poweruser API overview](/docs/api/poweruser.md)
- [Agents (Poweruser API)](/docs/api/poweruser/agents.md)
- [Tools (Poweruser API)](/docs/api/poweruser/tools.md)
- [Managers guide](/docs/guide/agentic/managers.md)
- [Versions guide](/docs/guide/agentic/versions.md)

