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
Base URL
All API endpoints are relative to:
https://textforge.net/api/v1
Draft endpoints
List all drafts for the authenticated user
Create a new email draft
Get a specific draft by ID
Update an existing draft
Submit a draft for approval
Thread endpoints
List email threads
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"
}
400- Bad Request (invalid parameters)401- Unauthorized (invalid/missing token)403- Forbidden (insufficient permissions)404- Not Found429- Too Many Requests (rate limited)500- Internal Server Error
For full request/response schemas, parameter details, and try-it-out functionality, use the Interactive API Reference.