Ai employees
Generated from api/openapi.yaml (OpenAPI 3.1). Base URL: https://api.teemli.com. Auth: Authorization: Bearer <token or tml_ API key>. Errors are application/problem+json; writes accept an Idempotency-Key header.
AI employees (M5a, product.md 7.4). Hire with POST /agents {kind: "ai_employee"} (a setup chat; you become
its manager). Its setup card carries details.identity (email address <name>@<org slug>.<agent domain>,
Slack/Teams display name); applying the card creates the mailbox. Sharing: organisation / teams / people;
each person’s conversation and memory with it are private (its manager gets cards, activity and spend only).
Mail to its address becomes a task: from a person it’s shared with → in their conversation; anyone else →
the manager’s inbox. Lifecycle: setting_up → active → paused → retired.
An AI employee’s identity, sharing and manager (its manager only)
Section titled “An AI employee’s identity, sharing and manager (its manager only)”GET /v1/orgs/{org}/agents/{agent}/employeeAPI keys: needs the agents:read scope.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) |
Responses
200{agent, identity, shared_with_org, teams[], people[], reach, mail_domain, manager} — object403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Who may message the AI employee (replaces the list)
Section titled “Who may message the AI employee (replaces the list)”PUT /v1/orgs/{org}/agents/{agent}/sharingAPI keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
org |
boolean | Everyone in the organisation |
team_ids |
array of string (uuid) | |
person_ids |
array of string (uuid) |
Responses
200The employee view — object403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem
Create or change the AI employee’s identity (email local part, Slack/Teams display name)
Section titled “Create or change the AI employee’s identity (email local part, Slack/Teams display name)”PUT /v1/orgs/{org}/agents/{agent}/identityAPI keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
email_local |
string | |
display_name |
string |
Responses
200The employee view; a taken name gets a number (riya2) — object422Invalid input — Problem
Retire an AI employee (its manager or an admin)
Section titled “Retire an AI employee (its manager or an admin)”POST /v1/orgs/{org}/agents/{agent}/retireWork stops, routines are disabled, its app accounts are revoked, its memory/files/conversations are archived and (optionally) handed over to hand_over_to, who becomes its manager of record.
API keys: not available (needs a person signed in to the app).
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
agent (required) |
path | string (uuid) |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
hand_over_to |
string (uuid) |
Responses
200{retired, id, connections_revoked, agent} — object403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem
The organisation’s directory (sharing pickers)
Section titled “The organisation’s directory (sharing pickers)”GET /v1/orgs/{org}/peopleAPI keys: any key.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200{items: [{id, display_name, email, role, status}]} — object
Teams with their members (everyone reads them; admins change them)
Section titled “Teams with their members (everyone reads them; admins change them)”GET /v1/orgs/{org}/teamsAPI keys: any key.
| Parameter | In | Type | Description |
|---|---|---|---|
org (required) |
path | string (uuid) | The caller’s organisation id. |
Responses
200{items: [{id, name, description, budget_monthly_usd, member_ids, scim, created_at}]} — object