Developers5 min read•Audience: Developers
Developer Platform Overview
Integrate PostBrix into your tech stack using our REST API, TypeScript SDK, JSON template schema, and server-side MJML rendering engine.
Key Takeaways
- Render dynamic transactional emails on demand via simple HTTP POST requests.
- Authenticate securely using Bearer API keys (pb_live_...).
- Access project ASTs as structured JSON or compiled HTML.
- Server-side MJML caching delivers sub-50ms response times for repeated template renders.
Developer Architecture#
PostBrix was built for developers who need to automate transactional emails without maintaining brittle, bespoke HTML templates in application code.
Key developer capabilities:
- Render API: Call
POST /api/v1/templates/:templateId/renderwith runtime JSON variables to receive production-ready HTML in milliseconds. - REST Endpoints: Programmatically list projects, inspect template ASTs, and manage workspace templates.
- Strict AST Validation: Every template is validated against our structural schema before compilation, preventing illegal nesting from reaching inboxes.
- Caching Layer: Pre-compiled MJML templates are hashed and cached with Redis, ensuring fast response times at scale.
The Production Workflow for Engineers#
- Design Once: Designers and product managers build and maintain templates visually in the PostBrix dashboard.
- Reference by ID: Developers reference the template by its unique ID (e.g.,
proj_clx1abc123). - Inject Data at Runtime: Your application server sends an HTTP POST request containing customer variables.
- Dispatch: Hand the returned HTML to SendGrid, Postmark, AWS SES, or Mailgun for instant delivery.
Frequently Asked Questions
Does PostBrix have rate limits on the Render API?
Standard plans include 120 requests/minute per workspace. Enterprise plans offer custom limits exceeding 2,000 requests/minute with dedicated Redis cache clusters.
Can I render templates offline or locally without internet access?
You can export templates as raw MJML files and compile them locally using the open-source @mjml CLI or Node.js package.