Apizent

API documentation

One API key, four endpoints, JSON in and JSON out. Everything lives under https://apizent.com/v1.

RESTJSONBearer auth120 requests / minute

Quickstart

  1. Create an account and open the dashboard.
  2. Create an API key. It is shown once — copy it somewhere safe.
  3. Call an endpoint with the key in the Authorization header.
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

POST /v1/qr

Creates a printable QR code for text, a URL or Wi-Fi details.

Body

FieldTypeDescription
textstringRequired. Up to 2000 characters.
sizenumberOptional, 128–1024 px. Default 512.
marginnumberOptional, 0–10 modules. Default 2.
formatstringpng, 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 }
}

Email

POST /v1/mail

Sends a transactional email. Requires a configured mail transport; otherwise the message is stored in the outbox.

Body

FieldTypeDescription
tostring or string[]Required. 1–5 valid addresses.
subjectstringRequired, max 200 characters.
textstringPlain-text body (or use html).
htmlstringHTML 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

POST /v1/shorten

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

POST /v1/pdf

Renders plain text into an A4 PDF document and returns it as a base64 data URL.

FieldTypeDescription
textstringRequired, up to 20000 characters.
titlestringOptional document title.
authorstringOptional author metadata.
filenamestringOptional 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." } }
StatusMeaning
401Missing, invalid or revoked API key.
403The endpoint is disabled for your account.
422Validation failed — check the field description.
429Rate limit exceeded. Respect the Retry-After header.
502An 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/json with 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.
Need a key? Create a free account and generate one in seconds.