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:
clientId metadata that TQL
row-level security reads per request — the pattern for embedding and
multi-tenant API access (see the
embedding guide).
Revoke keys with Revoke API Key.
Quick Examples
Create a chat
Stream a chat
List chats
List playbooks
Error Handling
All errors return a consistent JSON envelope: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.