Docs / API reference
API reference
DocsNG exposes REST endpoints under /api/[controller]/[action]. All routes require a JWT bearer token except login and public PDF validation. An interactive Swagger UI is available on your instance.
Authentication
| Method | Route | Purpose |
| POST | /api/Account/Login | username, password → JWT bearer token |
| GET | /api/Account/Logout | Sign out |
| POST | /api/Account/ChangePassword | Change a password |
Data models & entries
| Method | Route | Purpose |
| GET | /api/DefModel/List | List data models |
| GET | /api/DefModel/Get | Get a model with fields & relations |
| GET | /api/Data/List | List entries for a model |
| POST | /api/Data/Edit | Create or update an entry |
Documents
| Method | Route | Purpose |
| POST | /api/Document/GenerateDocumentFromJson | Template + JSON data → document id |
| POST | /api/Document/GenerateDocument | Template + entry ids → document id |
| POST | /api/Document/SignDocument | Sign a stored document |
| GET | /api/Document/DownloadDocument | Download a generated document (id, jwtToken) |
| POST | /api/Document/ValidatePdf | Verify a signed PDF (public) |
Generate — parameters
| Parameter | Description |
culture | Localisation override (e.g. en-US, nl-NL, de-DE) |
templateId | Template id |
outputType | 1 = DOCX, 2 = PDF |
encryptPwd | PDF encryption password |
pfxPwd | Password of the PFX in the user profile (advanced signing) |
The request body is a JSON array describing each document's model, fields (Name, Value, Type, IsRequired) and nested Relations. See the full structure and worked example.
API keys & service accounts
For server-to-server integrations, use scoped, revocable API keys / service accounts instead of user credentials. Send the key in the configured header; each key has scopes (e.g. generate, sign, read-templates) and can be rotated or revoked without affecting users.
Batch & asynchronous jobs
| Method | Route | Purpose |
| POST | /api/Document/GenerateBatch | One template + many records → zip or merged PDF |
| POST | /api/Jobs/Submit | Submit a long-running job → jobId |
| GET | /api/Jobs/Status | Poll job state & progress |
| GET | /api/Jobs/Result | Retrieve results by jobId |
Register a webhook to be notified on completion; callbacks are HMAC-signed. A versioned surface (/api/v1/…) and generated SDKs (C#, TypeScript, Python) are available. See Batch & async jobs.
Status codes
| Code | Meaning |
| 200 | Success |
| 400 | Bad request (validation, bad input) |
| 401 / 403 | Not authenticated / not authorised |
| 404 | Not found (template, entry, document) |
The interactive Swagger UI on your instance provides the exact, version-specific contract, and a public
Postman collection runs against the demo environment.
Need help? Contact us or try the live demo.