-
Notifications
You must be signed in to change notification settings - Fork 1
api
Teedy exposes a full REST API under /api/*. Everything the web UI does is a call
to this API, so anything you can do in the browser you can automate.
Teedy ships a browsable, interactive API reference (Swagger UI) at /apidoc. It is
served as static assets with no external/CDN dependencies and is reachable without a
session, so you can explore every endpoint, expand an operation, and use Try it
out to call the live API against your instance.

The endpoint references embedded throughout this documentation (each feature page lists its endpoints) and the examples below complement the interactive reference.
Two mechanisms authenticate an API request:
A normal browser login sets a session cookie. Scripts can log in via
POST /api/user/login (form params username, password) and reuse the returned
cookie for subsequent calls.
Create API keys in Settings → API Keys. Send the key in the Authorization
header:
Authorization: Bearer tdapi_<your-key>
An API key acts as the creating user and has exactly that user's permissions. The raw key is shown only once at creation — store it securely.
Mutations use application/x-www-form-urlencoded bodies (form parameters), not
JSON. File uploads use multipart/form-data on PUT /api/file.
| Resource | Purpose |
|---|---|
/api/document |
Documents (CRUD, search, trash) |
/api/file |
Files attached to documents (upload, versions) |
/api/tag |
Tags |
/api/user |
Users, login, password |
/api/apikey |
API keys |
/api/acl |
Access-control entries (sharing/permissions) |
/api/group |
Groups |
/api/comment |
Comments |
/api/metadata |
Custom metadata fields |
/api/vocabulary |
Controlled vocabularies |
/api/route, /api/routemodel
|
Workflows (routes and route models) |
/api/tagmatchrule |
Auto-tagging rules |
/api/webhook |
Webhooks |
/api/auditlog |
Audit log |
/api/theme |
Branding: name, colors, images, custom CSS and JavaScript (admin) |
/api/oidc |
OIDC login/callback |
/api/app |
Application info (version, status) |
Log in and reuse the cookie:
curl -c cookies.txt -X POST https://teedy.example.com/api/user/login \
-d "username=admin" \
-d "password=changeme"Create a document with an API key:
curl -X PUT https://teedy.example.com/api/document \
-H "Authorization: Bearer tdapi_<your-key>" \
-d "title=Invoice 2026-001" \
-d "language=eng"Upload a file to that document:
curl -X PUT https://teedy.example.com/api/file \
-H "Authorization: Bearer tdapi_<your-key>" \
-F "id=<document-id>" \
-F "file=@invoice.pdf"Check the running version:
curl https://teedy.example.com/api/app- Workflows — route and route-model endpoints
- Vocabulary — vocabulary endpoints
- Admin guide — webhooks, users, audit log
- Authentication — session vs API-key auth