SDK6 min read•Audience: Developers
Client Libraries & SDKs
Copy-pasteable code examples for Node.js, TypeScript, Python, Go, PHP, Ruby, Java, C#, and cURL.
Key Takeaways
- Target the PostBrix v1 API from any modern programming language.
- TypeScript example with full type safety.
- Python example using requests and FastAPI.
- Go example using standard net/http.
cURL Example#
Render a template directly from the terminal:
code
bash
TypeScript / Node.js Example#
Using the official @postbrix/sdk package (npm install @postbrix/sdk):
code
typescript
Alternatively, using standard fetch directly against the REST endpoint:
code
typescript
Python Example#
Using requests:
code
python
Go Example#
Using net/http:
code
go
Frequently Asked Questions
Do I need an official npm package to use PostBrix with TypeScript?
We recommend installing the official `@postbrix/sdk` package (`npm install @postbrix/sdk`), which provides zero-dependency, type-safe template rendering with automatic retries. Alternatively, standard fetch() or axios works out of the box with the REST endpoint.
How do I handle network timeouts or API errors?
We recommend setting a 5-second request timeout on your client and implementing an exponential backoff retry policy for 5xx responses.