This site is a work in progress — content and design may change.
← Back to Documentation

API Overview

Tenant-scoped REST API with versioned media type, OAuth2/API key auth, role-based access, and resource endpoints.

API Overview

Epistola exposes a REST API defined by an OpenAPI 3.1 specification. All endpoints are tenant-scoped under /api/tenants/{tenantId}/....

Versioned media type

The API uses a versioned media type for content negotiation:

application/vnd.epistola.v1+json

Authentication

Four authentication methods are supported:

MethodUse case
OAuth2/OIDC (Keycloak)Production single sign-on
API key (X-API-Key header)Service-to-service integration
JWT bearer tokensDirect token authentication
Form loginDevelopment and demo environments

Roles

Access control is role-based:

RoleCapabilities
readerRead templates, view jobs, download documents
editorCreate and edit template drafts
generatorSubmit render requests and manage jobs
managerPublish versions, manage environments and deployments
tenant_controlManage tenant settings, attributes, and user access

Resource endpoints

The API provides endpoints for:

  • Templates — CRUD, listing, and search
  • Variants — Create, update, and manage per template
  • Versions — Create drafts, publish, archive
  • Themes — CRUD and listing
  • Environments — CRUD and listing
  • Attributes — CRUD and listing
  • Generation — Preview (sync), generate (async), batch (async)
  • Jobs — Status, listing, cancellation
  • Documents — Download generated documents
  • Stencils — CRUD, versioning, and usage tracking