Documentation Index
Fetch the complete documentation index at: https://docs.textql.com/llms.txt
Use this file to discover all available pages before exploring further.
Overview
The v2 API is a REST-native interface to the TextQL platform. It replaces the Connect-RPC protocol used by v1 with standard HTTP methods, path parameters, and JSON request/response bodies. What’s different from v1:- Standard HTTP methods (
GET,POST,PATCH,DELETE) instead of all-POST - Resource IDs in URL paths (
/v2/playbooks/{id}) instead of request bodies - Query parameters for filtering and pagination
- Plain JSON errors (
{"error": {"code": "...", "message": "..."}}) - SSE streaming via
text/event-streaminstead of Connect-RPC server streaming - No
Connect-Protocol-Versionheader required
Base URL
Authentication
All requests require a Bearer token in theAuthorization header:
Quick Examples
Create a chat
Stream a chat
List chats
List playbooks
Error Handling
All errors return a consistent JSON envelope:| HTTP Status | Error Code | Description |
|---|---|---|
| 400 | invalid_request | Malformed request or missing required fields |
| 401 | unauthenticated | Missing or invalid Bearer token |
| 403 | permission_denied | Insufficient permissions for the requested resource |
| 404 | not_found | Resource does not exist |
| 429 | rate_limit_exceeded | Too many requests |
| 500 | internal | Unexpected server error |
| 504 | timeout | Request timed out |
Rate Limiting
All v2 endpoints are rate-limited per organization. When the limit is exceeded, the API returns a429 status with the rate_limit_exceeded error code.