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:
Attempting an action above your role returns a
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
Sessions expire after 7 days of inactivity. Active sessions are automatically renewed every 24 hours — you do not need to re-authenticate during normal use.
Missing or Invalid Credentials
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
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.