Surfaces
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.
Slack and Microsoft Teams for AI employees (M5b, product.md 7.2, 8.2, 11.14). Admins connect a Slack workspace
(OAuth v2) or a Microsoft tenant (Microsoft sign-in) to the organisation, once; a workspace/tenant belongs to one
organisation. People link their Slack/Microsoft account once (never by email). Messages that name an AI employee
shared with the sender start a normal turn in that person’s own conversation for the thread; replies and cards are
posted back in the thread as the AI employee, labelled AI. Webhooks are signature/JWT-checked (/v1/surfaces/*).
How an AI employee appears in Slack and Teams
Section titled “How an AI employee appears in Slack and Teams”GET /v1/orgs/{org}/agents/{agent}/presenceslack {connected, workspaces[], display_name, how, own_app {app_id, status}|null}, teams {connected, display_name, how}; both null for personal agents (never on Slack/Teams).
API 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
200Presence — object
Slack workspaces, AI employees’ own Slack apps and Teams tenants connected to the organisation
Section titled “Slack workspaces, AI employees’ own Slack apps and Teams tenants connected to the organisation”GET /v1/orgs/{org}/integrations{is_admin, slack {configured, socket_mode, app_id, workspaces[], employee_apps[] (admins), public_events}, teams {configured, app_id, tenants[], messaging_endpoint}, employees[] (admins)}. Tokens are never returned.
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. |
Responses
200Integrations — object
Start connecting a Slack workspace (admins) — returns Slack’s OAuth v2 URL
Section titled “Start connecting a Slack workspace (admins) — returns Slack’s OAuth v2 URL”POST /v1/orgs/{org}/integrations/slack/installAPI 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. |
Responses
200{url} — object403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem
Disconnect a workspace (admins); the bot token is revoked and deleted
Section titled “Disconnect a workspace (admins); the bot token is revoked and deleted”DELETE /v1/orgs/{org}/integrations/slack/workspaces/{id}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. |
id (required) |
path | string (uuid) |
Responses
204Disconnected
Save a Slack app configuration token (its refresh token, xoxe-…) for AI employees’ own apps (admins)
Section titled “Save a Slack app configuration token (its refresh token, xoxe-…) for AI employees’ own apps (admins)”PUT /v1/orgs/{org}/integrations/slack/workspaces/{id}/config-tokenRotated at once (proving it works); the pair lives in OpenBao and is rotated before its 12-hour expiry.
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. |
id (required) |
path | string (uuid) |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
refresh_token (required) |
string |
Responses
200{config_token, config_expires_at} — object422Invalid input — Problem
Create an AI employee’s own Slack app with the App Manifest API (admins)
Section titled “Create an AI employee’s own Slack app with the App Manifest API (admins)”POST /v1/orgs/{org}/integrations/slack/employee-appsAPI 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. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
agent_id (required) |
string (uuid) |
Responses
201{id, install_url}: a Slack admin approves the app there — object409Conflicting state (card already answered, duplicate in flight, name taken) — Problem
Delete an AI employee’s own Slack app (apps.manifest.delete)
Section titled “Delete an AI employee’s own Slack app (apps.manifest.delete)”DELETE /v1/orgs/{org}/integrations/slack/employee-apps/{id}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. |
id (required) |
path | string (uuid) |
Responses
204Deleted
A fresh approval URL for an AI employee’s own app
Section titled “A fresh approval URL for an AI employee’s own app”POST /v1/orgs/{org}/integrations/slack/employee-apps/{id}/install-urlAPI 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. |
id (required) |
path | string (uuid) |
Responses
200{install_url} — object
Start connecting a Microsoft tenant (admins sign in with Microsoft) — returns the sign-in URL
Section titled “Start connecting a Microsoft tenant (admins sign in with Microsoft) — returns the sign-in URL”POST /v1/orgs/{org}/integrations/teams/connectAPI 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. |
Responses
200{url} — object
Disconnect a Microsoft tenant (admins)
Section titled “Disconnect a Microsoft tenant (admins)”DELETE /v1/orgs/{org}/integrations/teams/tenants/{id}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. |
id (required) |
path | string (uuid) |
Responses
204Disconnected
The Teams app package (manifest.json + icons) to upload in Teams (admins)
Section titled “The Teams app package (manifest.json + icons) to upload in Teams (admins)”GET /v1/orgs/{org}/integrations/teams/package.zipAPI 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. |
Responses
200The zip
My linked Slack/Teams accounts (only mine; admins can’t see them)
Section titled “My linked Slack/Teams accounts (only mine; admins can’t see them)”GET /v1/orgs/{org}/linked-accountsAPI 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. |
Responses
200{accounts[], slack {configured, workspaces[]}, teams {configured, connected}} — object
Unlink
Section titled “Unlink”DELETE /v1/orgs/{org}/linked-accounts/{id}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. |
id (required) |
path | string (uuid) |
Responses
204Unlinked
“Sign in with Slack” (OpenID Connect) — returns Slack’s URL; token answers the waiting message after linking
Section titled ““Sign in with Slack” (OpenID Connect) — returns Slack’s URL; token answers the waiting message after linking”POST /v1/orgs/{org}/linked-accounts/slack/startAPI 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. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
token |
string | |
team |
string |
Responses
200{url} — object
One-click link from the prompt in Slack
Section titled “One-click link from the prompt in Slack”POST /v1/orgs/{org}/linked-accounts/slack/confirmThe link can be forwarded, so holding it proves nothing about who is signed in to Teemli.
It links only when that Slack account’s confirmed email (users:read.email) is the
signed-in person’s own; otherwise 403 and the person uses “Sign in with Slack”. Single use.
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. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
token (required) |
string |
Responses
200{linked, team_name, answered} — object403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem409Conflicting state (card already answered, duplicate in flight, name taken) — Problem
Who a link from Slack/Teams would link, shown before linking (doesn’t use the link up)
Section titled “Who a link from Slack/Teams would link, shown before linking (doesn’t use the link up)”GET /v1/orgs/{org}/linked-accounts/{surface}/pendingAPI 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. |
surface (required) |
path | slack, teams |
|
token (required) |
query | string |
Responses
200The Slack or Teams user who wrote — object403Authenticated but not allowed (e.g. unverified email, not the agent’s controller, card routed to someone else) — Problem409Conflicting state (card already answered, duplicate in flight, name taken) — Problem
“Sign in with Microsoft” to link a Teams account — returns the sign-in URL
Section titled ““Sign in with Microsoft” to link a Teams account — returns the sign-in URL”POST /v1/orgs/{org}/linked-accounts/teams/startAPI 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. |
Request body (JSON)
| Field | Type | Description |
|---|---|---|
token |
string |
Responses
200{url} — object
Slack Events API (shared app). Signed with HMAC-SHA256 (X-Slack-Signature, 5-minute window); answers url_verification
Section titled “Slack Events API (shared app). Signed with HMAC-SHA256 (X-Slack-Signature, 5-minute window); answers url_verification”POST /v1/surfaces/slack/eventsAuth: none (public endpoint).
Responses
200Acknowledged (work happens in the background)401Bad or stale signature
Slack Events API for an AI employee’s own app (its own signing secret)
Section titled “Slack Events API for an AI employee’s own app (its own signing secret)”POST /v1/surfaces/slack/events/{agent}Auth: none (public endpoint).
| Parameter | In | Type | Description |
|---|---|---|---|
agent (required) |
path | string (uuid) |
Responses
200Acknowledged401Bad signature
Slack interactivity (button clicks, form-encoded payload=), signed like events
Section titled “Slack interactivity (button clicks, form-encoded payload=), signed like events”POST /v1/surfaces/slack/interactivityAuth: none (public endpoint).
Responses
200Acknowledged401Bad signature
Interactivity for an AI employee’s own app
Section titled “Interactivity for an AI employee’s own app”POST /v1/surfaces/slack/interactivity/{agent}Auth: none (public endpoint).
| Parameter | In | Type | Description |
|---|---|---|---|
agent (required) |
path | string (uuid) |
Responses
200Acknowledged
Slack OAuth/OpenID callback (install, link, AI employee app); hands off to the web app
Section titled “Slack OAuth/OpenID callback (install, link, AI employee app); hands off to the web app”GET /v1/surfaces/slack/oauth/callbackDoes nothing itself; redirects to /oauth/finish/slack?… in the web app, which calls POST /v1/me/oauth/slack/finish as the signed-in person.
Auth: none (public endpoint).
Responses
303Redirect to the web app’s /oauth/finish/slack
Bot Framework activities. Bearer JWT checked against the Bot Framework OpenID keys (iss, aud, exp, serviceUrl, endorsement)
Section titled “Bot Framework activities. Bearer JWT checked against the Bot Framework OpenID keys (iss, aud, exp, serviceUrl, endorsement)”POST /v1/surfaces/teams/messagesinvoke (adaptiveCard/action) is answered synchronously with the replaced card.
Auth: none (public endpoint).
Responses
200Acknowledged, or the invoke response401Bad or missing token
Microsoft sign-in callback (connect a tenant, link an account); hands off to the web app
Section titled “Microsoft sign-in callback (connect a tenant, link an account); hands off to the web app”GET /v1/surfaces/teams/oauth/callbackDoes nothing itself; redirects to /oauth/finish/teams?…, finished with POST /v1/me/oauth/teams/finish.
Auth: none (public endpoint).
Responses
303Redirect to the web app’s /oauth/finish/teams