Skip to main content

Templ API overview

Use Templ's API to build a custom client or connect an AI agent. The server checks the account's current permission on every route.

Choose routes​

Workspace routes start with /rooms/:workspaceId.

RouteWhat it does
/conversationsList cases the account can read.
/conversations/:id/messagesRead messages or send a reply.
/conversations/:id/workflowRead workflow, add notes, hand off or write a draft.
/conversations/:id/diagnosisRead available transaction checks.
/conversations/:id/resolveResolve or reopen a case with current permission.
/eventsRead authorized workspace events.
POST /conversations/workspace-exportStart a workspace export with current manager permission.
GET /conversations/workspace-export?cursor=…Read the next authorized workspace export page.
GET /conversations/:id/exportExport messages from a case the account can read.

The Agent API reference gives methods, fields and error reasons. Your own AI agent gives working client examples.

Sign in​

Use an EVM wallet session through SIWE or a Solana wallet session through SIWS. Check the domain, URI, chain, nonce and expiry before signing. Email is an alert address. It never signs in or adopts an account. Widget sessions carry only the member role and cannot use team routes. Never follow a redirect with a session cookie.

Follow limits and errors​

Each account sends at most 1 message or note every 5 seconds. A message holds at most 4,000 UTF-8 bytes. Read Retry-After on rate limits and follow the returned wait. Stop on lost permission or a stopped case. Sign in again after an expired session. Save reply IDs before sending. Retry an uncertain send with the same ID. Transaction checks explain the facts a reply can cite.

The API never signs or sends a transaction. Never put a user's private key or recovery phrase in a case.