Notifications
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.
G1: one notification service. Every module writes inbox rows; the worker delivers each once by the person’s preferences: web push (VAPID, encrypted) and phone push (Expo) when the module’s push is on and do-not-disturb isn’t, emails “right away” (urgent kinds, after a delay, only if still unread, batched) or in an hourly/daily digest, with one-click unsubscribe. Per project / page levels. Also global search (⌘K) and held inbound mail.
The unified inbox (every module), newest first
Section titled “The unified inbox (every module), newest first”GET /v1/orgs/{org}/notificationsAPI 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. |
module |
query | agents, tasks, chat, docs, calls |
|
filter |
query | unread, all, archived |
|
limit |
query | integer | Page size. |
cursor |
query | string | Opaque cursor from a previous page’s next_cursor. |
Responses
200A page — object401Missing, invalid or expired token — Problem422Invalid input — Problem
Unread counts per module (badges)
Section titled “Unread counts per module (badges)”GET /v1/orgs/{org}/notifications/countsAPI 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
200Counts — UnreadCounts401Missing, invalid or expired token — Problem
Mark read (or unread with read=false) by ids, a module, or all
Section titled “Mark read (or unread with read=false) by ids, a module, or all”POST /v1/orgs/{org}/notifications/readLive notification.read {ids, all, module, read, unread} goes to the person’s other devices.
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 |
|---|---|---|
ids |
array of string (uuid) | |
module |
agents, tasks, chat, docs, calls |
|
all |
boolean | |
read |
boolean |
Responses
200Done — object401Missing, invalid or expired token — Problem422Invalid input — Problem
Archive (or unarchive) notifications
Section titled “Archive (or unarchive) notifications”POST /v1/orgs/{org}/notifications/archiveAPI 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 |
|---|---|---|
ids (required) |
array of string (uuid) | |
archived |
boolean |
Responses
200Done401Missing, invalid or expired token — Problem
My notification preferences
Section titled “My notification preferences”GET /v1/orgs/{org}/settings/notificationsAPI 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
200Settings — NotificationSettings401Missing, invalid or expired token — Problem
Change some preferences (module entries merge)
Section titled “Change some preferences (module entries merge)”PUT /v1/orgs/{org}/settings/notifications{modules: {chat: {push, email: off|immediate|digest}}, email: {digest: off|hourly|daily, digest_hour, unsubscribed_all}, dnd: {enabled, start, end, days, paused_until}}. Do-not-disturb applies to every module.
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
200Settings — NotificationSettings401Missing, invalid or expired token — Problem422Invalid input — Problem
The server’s VAPID public key (applicationServerKey)
Section titled “The server’s VAPID public key (applicationServerKey)”GET /v1/orgs/{org}/web-push/keyAPI 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
200Key — object401Missing, invalid or expired token — Problem
My browsers registered for web push
Section titled “My browsers registered for web push”GET /v1/orgs/{org}/web-push-subscriptionsAPI 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
200Browsers — object401Missing, invalid or expired token — Problem
Register this browser (PushSubscription JSON)
Section titled “Register this browser (PushSubscription JSON)”POST /v1/orgs/{org}/web-push-subscriptionsEndpoints must be a real push service (FCM, Mozilla, Apple, Windows); anything else is 422. An endpoint moves to
whoever registers it last (a shared computer never shows the previous person’s notifications). Payloads are
encrypted (RFC 8291) with VAPID (RFC 8292): {title, body, url, tag, notification_ids, module, count, test}.
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 |
|---|---|---|
endpoint (required) |
string | |
keys (required) |
object | |
name |
string |
Responses
201Registered — WebPushSubscription401Missing, invalid or expired token — Problem422Invalid input — Problem
Forget this browser
Section titled “Forget this browser”DELETE /v1/orgs/{org}/web-push-subscriptions/{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
204Gone404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Send a test notification to my browsers
Section titled “Send a test notification to my browsers”POST /v1/orgs/{org}/web-push-subscriptions/{id}/testAPI 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
202Sent — object404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
My notification level for a project
Section titled “My notification level for a project”PUT /v1/orgs/{org}/tasks/projects/{id}/notifydefault | all | mentions (only assigned / @mentions / due) | none (inbox only, read, no push or email).
API keys: needs the tasks:write scope.
| 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 |
|---|---|---|
level (required) |
default, all, mentions, none |
Responses
200Saved404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
My notification level for a page
Section titled “My notification level for a page”PUT /v1/orgs/{org}/docs/pages/{id}/notifyAPI keys: needs the docs:write scope.
| 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 |
|---|---|---|
level (required) |
default, all, mentions, none |
Responses
200Saved404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Unsubscribe page (from an email link; confirms before changing anything)
Section titled “Unsubscribe page (from an email link; confirms before changing anything)”GET /v1/unsubscribeAuth: none (public endpoint).
| Parameter | In | Type | Description |
|---|---|---|---|
t (required) |
query | string | Signed token: org, person and scope |
Responses
200HTML confirm page400Invalid link
One-click unsubscribe (RFC 8058) — the module’s emails, a routine’s result emails, or all
Section titled “One-click unsubscribe (RFC 8058) — the module’s emails, a routine’s result emails, or all”POST /v1/unsubscribeAuth: none (public endpoint).
| Parameter | In | Type | Description |
|---|---|---|---|
t |
query | string |
Responses
200HTML done page400Invalid link
Global search and switcher (⌘K)
Section titled “Global search and switcher (⌘K)”GET /v1/orgs/{org}/searchAgents, agent tasks and chats, work items and projects, chat channels and messages, docs pages and meetings, in
the caller’s own tenant transaction: row-level security and each module’s own search decide what exists, so
private channels, restricted pages, private projects and other people’s agent chats never appear (not even to
admins). Modules switched off are skipped. Empty q returns recents. Snippets are HTML-escaped text with
matches wrapped in <mark>…</mark>.
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. |
q |
query | string | |
limit |
query | integer | Per group |
Responses
200Groups — object401Missing, invalid or expired token — Problem
Mail to this AI employee (or its routines) held after failing sender checks
Section titled “Mail to this AI employee (or its routines) held after failing sender checks”GET /v1/orgs/{org}/agents/{agent}/held-mailInbound mail is checked with SPF, DKIM and DMARC. Only a verified colleague reaches their private conversation;
unverified senders are outside mail (manager’s inbox); DMARC p=reject failures are refused at SMTP; p=quarantine
failures are held here for the manager (or routine owner), with a mail_held notification.
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) |
Responses
200Held mail — object401Missing, invalid or expired token — Problem
Delete a held email
Section titled “Delete a held email”DELETE /v1/orgs/{org}/held-mail/{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
204Deleted404Not found (also returned for rows the caller may not see, and for disabled features) — Problem
Deliver a held email after all (as mail from an unverified outsider)
Section titled “Deliver a held email after all (as mail from an unverified outsider)”POST /v1/orgs/{org}/held-mail/{id}/releaseAPI 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
200Released — object404Not found (also returned for rows the caller may not see, and for disabled features) — Problem