Introduction
The Routa REST API provides programmatic access to manage agents, tasks, workspaces, notes, and skills. The API follows RESTful principles and returns JSON responses.Base URLs
Routa has two backend implementations that share the same API contract:- Next.js Backend (Web):
http://localhost:3000(dev) or your deployment URL - Rust Backend (Desktop):
http://localhost:3210
API Contract
The single source of truth for all API endpoints is defined inapi-contract.yaml using OpenAPI 3.1 specification. Both the Next.js backend (src/app/api/) and Rust backend (crates/routa-server/) must implement all endpoints with compatible request/response shapes.
Authentication
Currently, the API does not require authentication for local development. For production deployments, implement authentication according to your security requirements.Request Format
All requests expecting a body should useContent-Type: application/json.
Response Format
All responses are returned as JSON with appropriate HTTP status codes:200- Success201- Created400- Bad Request (validation error)404- Not Found500- Internal Server Error
Success Response
Error Response
Common Query Parameters
workspaceId
Many endpoints accept aworkspaceId query parameter to filter results by workspace. Defaults to "default" if not provided.
status
Filter resources by their status field.Resource Types
The API manages the following core resources:- Health - Service health check
- Agents - AI agents that execute tasks
- Tasks - Work units assigned to agents
- Notes - Collaborative documentation
- Workspaces - Project containers
- Skills - Reusable agent capabilities
- Sessions - ACP session management
Rate Limiting
No rate limiting is enforced on local development. For production deployments, implement rate limiting according to your requirements.Pagination
The current API does not implement pagination. All list endpoints return complete result sets. Consider implementing pagination for production use with large datasets.Timestamps
All timestamps are returned in ISO 8601 format (UTC):Next Steps
- Explore the Health Check endpoint
- Learn about Agent Management
- Understand Task Management
- Review Workspace Management