Quick Start
Get up and running with the TellsTree API in minutes
Required headers
Send Accept: application/json with every request. Validation failures come back as
422 with a readable message for callers that ask for JSON.
Without the header the request is treated as a browser form post and is answered with a
302 redirect instead, and no message reaches the caller.
The application's own interface always sends the header. This note matters for scripts and third-party clients.
Features
Resources
/api/projects
/api/nodes
/api/edges
/api/media
/api/comments
/api/themes
/api/designs
Rate Limits
API rate limiting prevents abuse and ensures fair usage. Limits are enforced per IP address and vary by endpoint type.
All API responses include rate limit information in the headers. When limits are exceeded, a 429 status is returned.
Header Fields
X-RateLimit-LimitMaximum requests allowed in the current windowX-RateLimit-RemainingRemaining requests in the current windowRetry-AfterSeconds to wait before retry (429 responses only)
300 requests/minute
General API limit (optimized for graph editor)
5 attempts/minute
Login attempts
30 requests/minute
Token refresh
3 attempts/10 minutes
User registration
Error Handling
The API uses conventional HTTP response codes to indicate success or failure. All error responses follow a consistent JSON format with RFC 7807 Problem Details.
Error responses include a `type` (URL to error documentation), `title` (human-readable summary), `detail` (explanation), and `status` (HTTP code).
200, 201, 204
Success responses
400, 401, 403, 404, 422, 429
Client errors
500, 503
Server errors
Authentication
The TellsTree API uses JWT (JSON Web Token) based authentication. You need to obtain a token by logging in with valid credentials.
/api/auth/login
Login / Obtain token
/api/auth/me
Get current user info
/api/auth/refresh
Refresh token
/api/auth/logout
Logout / Invalidate token
/api/.well-known/jwks.json
Public keys (JWKS)
Login
Most API endpoints require authentication. Get your JWT token through the authentication endpoint.
Required Credentials
email- Your account emailpassword- Your account password
Response
Refresh Token
Tokens expire after 1 hour. Use the refresh endpoint to get a new access token without re-authentication.
Token Refresh
- • Refresh token is stored as HttpOnly cookie
- • No request body required
- • Returns new access token
- • Include cookies with request
Response
Get Current User
Get information about the currently authenticated user and token details.
Authentication Required
- • Include JWT token in Authorization header
- • Returns user profile and token information
- • Useful for validating token status
Response
Logout
Logout and invalidate all tokens for the current user. This prevents further API access with existing tokens.
Token Invalidation
- • Invalidates current access token
- • Invalidates refresh token
- • Increments user token version
- • Clears authentication cookies
Response
JSON Web Key Set (JWKS)
Public cryptographic keys for verifying JWT tokens issued by TellsTree. Required for external systems that need to validate TellsTree tokens independently.
Use Cases
- • Microservices: Verify TellsTree tokens without API calls
- • API Gateways: Validate tokens at gateway level
- • Single Sign-On (SSO): Enable SSO integrations
- • Third-party Apps: Verify token authenticity offline
Technical Details
- • Standard RFC 7517 compliant endpoint
- • RSA-256 public keys included
- • Key rotation support via 'kid' field
- • No authentication required (public endpoint)
Response
Using Tokens for API Access
Once you have an access token, include it in the Authorization header for all API requests.
Authorization Header
Authorization: Bearer YOUR_TOKEN- • Required for all protected endpoints
- • Token expires after 1 hour
- • Use refresh endpoint to get new tokens
Example API Call
GET /api/projectsAuthorization: Bearer eyJ0eXAiOiJKV1Q...Accept: application/json
?? Projects
Projects are the top-level containers for your storytelling content. Each project can contain multiple nodes (story elements) and edges (connections).
/api/projects
List all projects
/api/projects
Create project
public_id of the project — a 26-character identifier
(ULID, Crockford base32), not the internal
counter value. Shape: 26 characters from 0-9A-Z, without
I, L, O, U,
in practice starting with 01M. An unknown
value answers like somebody else's project, so the identifier does not
become a lead.
/api/projects/{public_id}
Get project
/api/projects/{public_id}
Update project
/api/projects/{public_id}
Delete project
/api/projects/{public_id}/activity
Poll for activity updates
List Public Projects
Retrieve all publicly available projects. No authentication required.
Query Parameters
query[is_public]
Set to true to get public projects
query[page]
Page number (default: 1)
query[per_page]
Items per page (default: 15)
Response
List Private Projects
Retrieve all projects that the authenticated user has access to. Authentication required.
Headers
Authorization
Bearer {your_jwt_token}
Query Parameters
query[page]
Page number (optional)
query[per_page]
Items per page (optional)
Response
Create New Project
Create a new storytelling project with a theme and design.
Response
data.project{} (Complete Project object with theme, design, nodes, edges, members, capabilities, comments)
data.errors{}
Get Single Project
Retrieve detailed information about a specific project.
Response
Update Project
Update an existing project's properties, theme, or design.
🔒 Lock Management
Lock/unlock functionality is integrated into the update endpoint:
- •
is_locked: true- Lock project for current user - •
is_locked: false- Unlock project (only by lock owner) - • Response includes
is_locked: true/false - • Auto-unlock: Locks expire automatically after 300 seconds when project is accessed
Response
Delete Project
Permanently delete a project and all its content.
Response
Poll for Activity Updates
Retrieve IDs of resources that have been modified since a given timestamp. Enables real-time collaborative editing. Authentication required.
Headers
Authorization
Bearer {your_jwt_token}
Query Parameters
since
Unix timestamp - only return activities after this time (optional)
Response
📋 Nodes
Nodes are the building blocks of your story. Each node represents a narrative element like a scene, chapter or character. A Node can contain text, media, and interactive elements.
/api/nodes
List all nodes
/api/nodes
Create new node
/api/nodes?query[include]=ids
Get specific nodes (lazy loading)
/api/nodes/{node}
Get node details
/api/nodes/{node}
Update node
/api/nodes/{node}
Delete node
List Nodes
Retrieve all nodes or filter by project, including their content, position, and metadata.
Query Parameters
query[project_id]- Filter by project ID (required)query[page]- Page number (optional, default: 1)query[per_page]- Items per page (optional, default: 20)
Response
Load Specific Nodes
Get specific nodes by IDs for lazy loading in the TellsTreeGraph editor. Used for performance optimization when working with large projects.
Query Parameters
query[project_id]- Required project IDquery[include]- Comma-separated node IDs- • Returns canvas-ready node data
- • Optimized for editor performance
Response
Create Node
Create a new node. Nodes can exist independently or be associated with a project via project_id.
Required Fields
title- Node title
Optional Fields
project_id- Associate with projectcontent- Node content/texttype- Node typeposition_x- X coordinateposition_y- Y coordinateproperties- Custom properties
Response
Get Node
Retrieve detailed information about a specific node, including all its properties and metadata.
URL Parameters
project- Project IDnode- Node ID
Response
Update Node
Update an existing node's content, position, properties, or other attributes.
🔒 Lock Management
Lock/unlock functionality is integrated into the update endpoint:
- •
is_locked: true- Lock node for current user - •
is_locked: false- Unlock node (only by lock owner) - • Response includes
is_locked: true/false - • Auto-unlock: Locks expire automatically after 300 seconds when node is accessed
Updatable Fields
title- Node titlecontent- Node contenttype- Node typeposition_x- X coordinateposition_y- Y coordinateproperties- Custom propertieslocked_by- Lock status (user_id or null)
Response
Delete Node
Permanently delete a node from the project. This will also remove all connected edges.
Response
?? Edges
Edges create connections between nodes, defining the flow and relationships in your interactive stories. They represent transitions, choices, and narrative pathways.
/api/edges
List all edges
/api/edges
Create new edge
/api/edges/{edge}
Get edge details
/api/edges/{edge}
Update edge
/api/edges/{edge}
Delete edge
Create Edge
Create a new edge connection between two nodes in a project.
Required Fields
source_node_id- ID of source nodetarget_node_id- ID of target node
Optional Fields
label- Display text for edgecondition- Edge activation condition
Response
Get Edge
Retrieve detailed information about a specific edge, including source and target node details.
URL Parameters
project- Project IDedge- Edge ID
Response
Update Edge
Update properties of an existing edge. You can modify the label, condition, and connection endpoints.
🔒 Lock Management
Lock/unlock functionality is integrated into the update endpoint:
- •
is_locked: true- Lock edge for current user - •
is_locked: false- Unlock edge (only by lock owner) - • Response includes
is_locked: true/false - • Auto-unlock: Locks expire automatically after 300 seconds when edge is accessed
Request Body
source_node_id- Source node IDtarget_node_id- Target node IDlabel- Edge display labelcondition- Edge conditionlocked_by- Lock status (internal use only)
Response
Delete Edge
Permanently delete an edge connection. This action cannot be undone and will break the connection between nodes.
Response
🎬 Media
Media files can be attached to projects, nodes, or edges. Support for images, videos, audio, and documents to enrich your interactive stories with multimedia content.
/api/media
List all media
/api/media
Upload new media
/api/media/{media}
Get media details
/api/media/{media}
Update media metadata
/api/media/{media}/visibility
Update visibility
/api/media/{media}
Delete media
List Media
Retrieve all media files or filter by project, node, or edge.
Query Parameters
project_id- Filter by project ID (optional)node_id- Filter by node ID (optional)edge_id- Filter by edge ID (optional)type- Filter by media type (optional)page- Page number (optional)per_page- Items per page (optional)
Response
Upload Media
Upload a new media file and attach it to a project, node, or edge.
Required Fields
file- Media file to upload
Optional Fields
project_id- Attach to projectnode_id- Attach to nodeedge_id- Attach to edgealt_text- Alternative textdescription- Media descriptionvisibility- public/private
Response
Themes
Themes define the visual styling and appearance of your storytelling projects. Each theme contains color schemes, fonts, and layout configurations.
/api/themes
List all themes
/api/themes/{theme}
Get theme by domain
List All Themes
Retrieve a paginated list of all available themes. This is a public endpoint and does not require authentication.
Query Parameters
page- Page number (optional, default: 1)per_page- Items per page (optional, default: 15)
Response
Get Specific Theme
Retrieve detailed information about a specific theme by its domain. This is a public endpoint and does not require authentication.
URL Parameters
theme- The unique domain identifier of the theme (e.g., "dialog")
Response
✨ Designs
Designs provide specific styling configurations within themes, allowing fine-grained control over the visual presentation of story elements.
/api/designs
List all designs
/api/designs/{design}
Get design by domain
List All Designs
Retrieve a list of all available designs. This is a public endpoint and does not require authentication.
Response
Get Specific Design
Retrieve detailed configuration for a specific design by its domain identifier.
URL Parameters
design- The domain identifier of the design
💬 Comments
Comments enable collaborative feedback and discussion within projects. Team members can leave notes, suggestions, and feedback to improve the narrative experience.
/api/commentsList all comments/api/commentsCreate new comment/api/comments/{comment}Get comment details/api/comments/{comment}Update comment/api/comments/{comment}Delete commentList Comments
Retrieve all comments or filter by project to see discussions and feedback.
Query Parameters
project_id- Filter by project ID (optional)user_id- Filter by author (optional)status- Filter by status (optional)page- Page number (optional)per_page- Items per page (optional)Response
Create Comment
Add a new comment or feedback to a project for collaborative discussion.
Required Fields
content- Comment textproject_id- Project to attach comment toOptional Fields
priority- low/medium/highnode_id- Related node IDposition- UI position datatags- Array of tagsResponse