Docs

API Reference

TextForge provides a REST API for programmatic access to drafts, threads, and email management. Use Bearer token authentication with your API key.

Interactive API Reference

Try out API calls directly in your browser. The interactive reference includes request/response schemas, parameter documentation, and a built-in HTTP client.

Open Interactive Reference OpenAPI Spec (JSON)

Authentication

All API requests require a Bearer token in the Authorization header. Create API tokens in your TextForge dashboard under Settings → API Tokens.

Authorization: Bearer YOUR_API_TOKEN
API tokens are scoped to your account and have the same permissions you do. Keep them secure and rotate them if compromised.

Base URL

All API endpoints are relative to:

https://textforge.net/api/v1

Draft endpoints

GET /api/v1/drafts

List all drafts for the authenticated user

POST /api/v1/drafts

Create a new email draft

GET /api/v1/drafts/{id}

Get a specific draft by ID

PUT /api/v1/drafts/{id}

Update an existing draft

POST /api/v1/drafts/{id}/submit

Submit a draft for approval

Thread endpoints

GET /api/v1/threads

List email threads

GET /api/v1/threads/{id}

Get a specific thread with all messages

Error responses

The API uses standard HTTP status codes. Error responses include a JSON body with details:

{ "error": "Unauthorized", "message": "Invalid or expired API token" }

For full request/response schemas, parameter details, and try-it-out functionality, use the Interactive API Reference.