Documentation Index
Fetch the complete documentation index at: https://docs.tedro.io/llms.txt
Use this file to discover all available pages before exploring further.
Authentication
The Tedro API uses session-based authentication. Every API request requires two credentials:- A session cookie — proves your identity (set automatically on sign-in)
- An
x-workspace-idheader — specifies which workspace you are accessing
Step 1: Sign In
Obtain a session cookie by sending your email and password to the sign-in endpoint:cURL
Node.js
better-auth.session_token cookie. The cURL -c cookies.txt flag saves this cookie to a file for use in subsequent requests.
Step 2: Find Your Workspace ID
Your workspace ID is a UUID that identifies which workspace your API calls target. You can find it in the Tedro dashboard URL:Organization-Scoped Access
Tedro uses an organization and workspace hierarchy. Your user account belongs to one or more organizations, each containing one or more workspaces.- Your session cookie authenticates your user identity at the organization level
- The
x-workspace-idheader selects which workspace within your organization to access - You must be a member of the workspace (or an org owner) to access its data
Roles
Your workspace role determines which API endpoints you can call:| Role | Access Level |
|---|---|
| Org Owner | Full access to all workspaces in the organization |
| Admin | Full access within the workspace — publish workflows, manage tools, configure channels |
| Agent | Inbox access and view-only for runs — cannot publish, edit tools, or modify settings |
| Viewer | Read-only access to all workspace data |
403 Forbidden response.
Step 3: Make Authenticated Requests
Include both the session cookie andx-workspace-id header on every API call:
cURL
Node.js
Session Lifecycle
| Property | Value |
|---|---|
| Session duration | 7 days (absolute timeout) |
| Sliding renewal | Session token refreshes every 24 hours of activity |
| Cookie name | better-auth.session_token |
| Cookie flags | httpOnly, Secure, SameSite=Lax |
Missing or Invalid Credentials
| Scenario | Status | Response |
|---|---|---|
| No session cookie | 401 | {"error": "Unauthorized"} |
| Expired session | 401 | {"error": "Unauthorized"} |
Missing x-workspace-id header | 401 | {"error": "Unauthorized"} |
| Invalid workspace UUID | 403 | {"error": "Forbidden"} |
| User not a member of workspace | 403 | {"error": "Forbidden"} |
Brute Force Protection
The sign-in endpoint has built-in brute force protection:- 5 failed attempts per email+IP combination triggers a lockout
- Lockout duration: 15 minutes
- During lockout, the endpoint returns
429 Too Many Requests - The counter resets on successful sign-in
Rate Limits on Auth Endpoints
| Endpoint | Limit |
|---|---|
POST /api/auth/sign-in/email | 5 requests per 60 seconds |
POST /api/auth/sign-up/email | 3 requests per 5 minutes |
POST /api/auth/forget-password | 3 requests per hour |
POST /api/auth/reset-password | 3 requests per hour |
All other /api/auth/* | 10 requests per minute |
The API playground in these docs may not work with cookie-based authentication due to cross-domain restrictions. Use cURL or your own code to test API calls.