Documentation Index
Fetch the complete documentation index at: https://docs.getmaito.com/llms.txt
Use this file to discover all available pages before exploring further.
TypeScript SDK
The SDK inpackages/sdk is the preferred TypeScript client for browser,
server, CLI, and automation code that talks to the REST API.
Create A Client
authToken can be a string, null, undefined, or an async function returning
a token.
Example: List Drafts
Example: Upsert A Document
Example: Create A Newsletter Issue
Request Behavior
The SDK:- Normalizes
baseUrl - Adds
Authorization: Bearer <token>when a token is available - Sends JSON bodies with
content-type: application/json - Parses API success and error envelopes with shared contracts
- Throws on API errors, invalid response shapes, and failed requests
Contract Source
Request and response schemas live inpackages/contracts. Keep new public API
shape changes in contracts first, then update backend routes, SDK methods, and
docs together.