API documentation
One API key, four endpoints, JSON in and JSON out. Everything lives under https://apizent.com/v1.
Quickstart
- Create an account and open the dashboard.
- Create an API key. It is shown once — copy it somewhere safe.
- Call an endpoint with the key in the
Authorizationheader.
curl -X POST https://apizent.com/v1/qr \
-H "Authorization: Bearer apz_your_key" \
-H "Content-Type: application/json" \
-d '{"text":"https://apizent.com","format":"png"}'
Authentication
Every request to /v1/* needs an API key:
Authorization: Bearer apz_xxxxxxxxxxxxxxxxxxxxxxxx
Keys can be created and revoked at any time in the dashboard. A revoked key stops working immediately. Keys are stored hashed, so the plaintext value is only visible when you create it.
QR codes
Creates a printable QR code for text, a URL or Wi-Fi details.
Body
| Field | Type | Description |
|---|---|---|
text | string | Required. Up to 2000 characters. |
size | number | Optional, 128–1024 px. Default 512. |
margin | number | Optional, 0–10 modules. Default 2. |
format | string | png, svg or dataurl. Default dataurl. |
curl -X POST https://apizent.com/v1/qr \
-H "Authorization: Bearer apz_your_key" \
-H "Content-Type: application/json" \
-d '{"text":"https://apizent.com","format":"png","size":512}'
Response
{
"status": "ok",
"format": "png",
"image": "data:image/png;base64,iVBORw0KGgo...",
"meta": { "size": 512, "margin": 2 }
}
Sends a transactional email. Requires a configured mail transport; otherwise the message is stored in the outbox.
Body
| Field | Type | Description |
|---|---|---|
to | string or string[] | Required. 1–5 valid addresses. |
subject | string | Required, max 200 characters. |
text | string | Plain-text body (or use html). |
html | string | HTML body. |
curl -X POST https://apizent.com/v1/mail \
-H "Authorization: Bearer apz_your_key" \
-H "Content-Type: application/json" \
-d '{"to":"user@example.com","subject":"Hello","text":"It works."}'
Response
{ "status": "sent", "id": 42, "provider": "smtp", "messageId": "..." }
Short links
Creates a short link and tracks clicks.
curl -X POST https://apizent.com/v1/shorten \
-H "Authorization: Bearer apz_your_key" \
-H "Content-Type: application/json" \
-d '{"url":"https://example.com/a/very/long/link"}'
Response
{ "status": "ok", "code": "aB3xK9", "url": "https://example.com/...", "shortUrl": "https://apizent.com/s/aB3xK9" }
Opening /s/<code> redirects (HTTP 302) to the target and increments the click counter.
PDF documents
Renders plain text into an A4 PDF document and returns it as a base64 data URL.
| Field | Type | Description |
|---|---|---|
text | string | Required, up to 20000 characters. |
title | string | Optional document title. |
author | string | Optional author metadata. |
filename | string | Optional file name suggestion. |
curl -X POST https://apizent.com/v1/pdf \
-H "Authorization: Bearer apz_your_key" \
-H "Content-Type: application/json" \
-d '{"title":"Invoice","text":"Line item ...","filename":"invoice"}'
Response
{ "status": "ok", "format": "pdf", "filename": "invoice.pdf", "pdf": "data:application/pdf;base64,...", "meta": { "bytes": 8123 } }
Errors & limits
Errors always use the same shape:
{ "error": { "code": "invalid_api_key", "message": "The API key is invalid or revoked." } }
| Status | Meaning |
|---|---|
401 | Missing, invalid or revoked API key. |
403 | The endpoint is disabled for your account. |
422 | Validation failed — check the field description. |
429 | Rate limit exceeded. Respect the Retry-After header. |
502 | An upstream dependency (for example the mail server) failed. |
Default rate limit is 120 requests per minute per key. Every response includes X-RateLimit-Limit and X-RateLimit-Remaining.
Integration notes
- Send
Content-Type: application/jsonwith every POST. - Requests are logged per key; you can inspect them under Logs in the dashboard.
- Endpoints can be disabled per account in the dashboard without revoking the key.
- CORS is enabled for
/v1, so the API can be called from the browser.