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

MethodRoutePurpose
POST/api/Account/Loginusername, password → JWT bearer token
GET/api/Account/LogoutSign out
POST/api/Account/ChangePasswordChange a password

Data models & entries

MethodRoutePurpose
GET/api/DefModel/ListList data models
GET/api/DefModel/GetGet a model with fields & relations
GET/api/Data/ListList entries for a model
POST/api/Data/EditCreate or update an entry

Documents

MethodRoutePurpose
POST/api/Document/GenerateDocumentFromJsonTemplate + JSON data → document id
POST/api/Document/GenerateDocumentTemplate + entry ids → document id
POST/api/Document/SignDocumentSign a stored document
GET/api/Document/DownloadDocumentDownload a generated document (id, jwtToken)
POST/api/Document/ValidatePdfVerify a signed PDF (public)

Generate — parameters

ParameterDescription
cultureLocalisation override (e.g. en-US, nl-NL, de-DE)
templateIdTemplate id
outputType1 = DOCX, 2 = PDF
encryptPwdPDF encryption password
pfxPwdPassword 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

MethodRoutePurpose
POST/api/Document/GenerateBatchOne template + many records → zip or merged PDF
POST/api/Jobs/SubmitSubmit a long-running job → jobId
GET/api/Jobs/StatusPoll job state & progress
GET/api/Jobs/ResultRetrieve 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

CodeMeaning
200Success
400Bad request (validation, bad input)
401 / 403Not authenticated / not authorised
404Not 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.