Choose the integration method that best fits your application architecture.
The CertJS REST API allows applications to generate, monitor, and retrieve certificates using HTTPS endpoints. Every request is authenticated using an API Key and returns JSON responses.
https://api.certjs.hrishi-developer.inX-Api-Keyapplication/jsonThe REST API provides the following capabilities.
The CertJS SDK enables local certificate generation by bundling your template and configuration directly into your application. Unlike the REST API, your certificate templates do not need to be stored on CertJS servers.
npm install @certjs/sdkThe SDK focuses on local template management and application-first certificate generation.
Every request to the CertJS REST API must include your API key in the X-Api-Key request header.
X-Api-Key<your-api-key>X-Api-Key: <your-api-key>X-Api-Key: <your-api-key>const apiKey = process.env.CERTJS_API_KEY;const response = await fetch("https://api.certjs.hrishi-developer.in/api/v1/...", { headers: { "X-Api-Key": apiKey!, },});Complete reference for every CertJS REST API endpoint, including request examples, parameters, responses, and common error codes.
/api/v1/jobsconst apiKey = process.env.CERTJS_API_KEY;const response = await fetch( "https://api.certjs.hrishi-developer.in/api/v1/jobs", { method: "POST", headers: { "Content-Type": "application/json", "X-Api-Key": apiKey!, }, body: JSON.stringify({ templateId: "YOUR_TEMPLATE_ID", recipients: [ { name: "John Doe", score: 98, }, ], idempotencyKey: crypto.randomUUID(), }), });const { jobId, status, totalCount, processedCount,} = await response.json();console.log({ jobId, status, totalCount, processedCount,});| Parameter | Type | Required | Description |
|---|---|---|---|
templateId | UUID | Required | Unique identifier of the saved certificate template. |
recipients | Recipient[] | Required | List of recipients used to generate certificates. |
idempotencyKey | string | Required | Ensures duplicate requests are processed only once. |
webhookUrl | URL | Optional | Receives a callback when the job completes. |
{ "jobId": <jobId>, "status": "pending" | "processing" | "completed" | "failed", "totalCount": <count>, "processedCount": <count>}| Status | Error | Description |
|---|---|---|
| 400 | Bad Request | Request validation failed. |
| 401 | Unauthorized | Missing or invalid API Key. |
| 404 | Template Not Found | The provided Template ID does not exist. |
/api/v1/jobs/:jobIdconst apiKey = process.env.CERTJS_API_KEY;const jobId = "YOUR_JOB_ID";const response = await fetch( `https://api.certjs.hrishi-developer.in/api/v1/jobs/${jobId}`, { headers: { "X-Api-Key": apiKey!, }, });const job = await response.json();console.log(job);| Parameter | Type | Required | Description |
|---|---|---|---|
jobId | UUID | Required | Identifier of the job returned when creating a batch. |
{ "jobId": "4db2dcaf-5a2c-4d55-8d46-49c557a2f0ef", "status": "completed", "totalCount": 500, "processedCount": 500}| Status | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid Job ID format. |
| 401 | Unauthorized | Missing or invalid API Key. |
| 404 | Job Not Found | The specified job does not exist. |
/api/v1/jobs/:jobId/downloadconst apiKey = process.env.CERTJS_API_KEY;const jobId = "YOUR_JOB_ID";const response = await fetch( `https://api.certjs.hrishi-developer.in/api/v1/jobs/${jobId}/download`, { headers: { "X-Api-Key": apiKey!, }, });const download = await response.json();console.log(download.presignedZipUrl);| Parameter | Type | Required | Description |
|---|---|---|---|
jobId | UUID | Required | Identifier of the completed job whose certificates should be downloaded. |
{ "presignedZipUrl": "https://..."}| Status | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid Job ID format. |
| 401 | Unauthorized | Missing or invalid API Key. |
| 404 | Job Not Found | The specified job does not exist. |
| 409 | Job Not Completed | The job has not finished processing yet. |
/api/v1/jobs/:jobId/retryconst apiKey = process.env.CERTJS_API_KEY;const jobId = "YOUR_JOB_ID";const response = await fetch( `https://api.certjs.hrishi-developer.in/api/v1/jobs/${jobId}/retry`, { method: "POST", headers: { "X-Api-Key": apiKey!, }, });const result = await response.json();console.log(result);| Parameter | Type | Required | Description |
|---|---|---|---|
jobId | UUID | Required | Identifier of the job whose failed documents should be retried. |
{ "message": "Job queued for retry", "retryCount": 5}| Status | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid Job ID format. |
| 401 | Unauthorized | Missing or invalid API Key. |
| 404 | Job Not Found | The specified job does not exist. |
| 409 | No Failed Documents | The job has no failed documents available for retry. |
/api/v1/jobs/:jobId/documentsconst apiKey = process.env.CERTJS_API_KEY;const jobId = "YOUR_JOB_ID";const response = await fetch( `https://api.certjs.hrishi-developer.in/api/v1/jobs/${jobId}/documents`, { headers: { "X-Api-Key": apiKey!, }, });const documents = await response.json();console.log(documents);| Parameter | Type | Required | Description |
|---|---|---|---|
jobId | UUID | Required | Identifier of the completed job whose generated certificates should be retrieved. |
{ "count": 2, "documents": [ { "id": "3d5e8d8f-...", "jobId": "8cf8f58b-...", "recipientData": { "name": "John Doe", "score": 98 }, "status": "completed", "error": null, "verifyToken": "b1d6b5b0...", "s3Url": "https://...", "createdAt": "2026-08-06T10:15:30.000Z" } ]}| Status | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid Job ID format. |
| 401 | Unauthorized | Missing or invalid API Key. |
| 404 | Job Not Found | The specified job does not exist. |
/api/v1/documents/:documentIdconst apiKey = process.env.CERTJS_API_KEY;const documentId = "YOUR_DOCUMENT_ID";const response = await fetch( `https://api.certjs.hrishi-developer.in/api/v1/documents/${documentId}`, { headers: { "X-Api-Key": apiKey!, }, });const document = await response.json();console.log(document);| Parameter | Type | Required | Description |
|---|---|---|---|
documentId | UUID | Required | Identifier of the generated document to retrieve. |
{ "id": "34fd7d4e-...", "jobId": "c5f0b9c8-...", "recipientData": { "name": "John Doe", "score": 98 }, "status": "completed", "error": null, "verifyToken": "8a2d1efc...", "s3Url": "https://...", "createdAt": "2026-08-06T15:30:12.000Z", "jobStatus": "completed", "templateId": "cb4d7d5f-..."}| Status | Error | Description |
|---|---|---|
| 400 | Bad Request | Invalid Document ID format. |
| 401 | Unauthorized | Missing or invalid API Key. |
| 404 | Document Not Found | The specified document does not exist. |
Install the official CertJS SDK using your preferred package manager.
npm install @certjs/sdkCreate a CertJS client using your API Key. The client is reused for all subsequent SDK operations.
import { CertJS } from "@certjs/sdk";const certjs = new CertJS({ apiKey: process.env.CERTJS_API_KEY!,});• Upload your certificate.
• Edit placeholders visually.
• Save the template.
• Use the generated Template ID.
• Download certjs.config.json.
• Keep the PDF template locally.
• No Template ID required.
CertJS supports two template workflows. Choose the approach that best fits your application.
certjs.config.json.const certjs = new CertJS({ apiKey: process.env.CERTJS_API_KEY!, templateId: "YOUR_TEMPLATE_ID",});Generate one or more certificates using the configured template.
const job = await certjs.generate({ recipients: [ { name: "John Doe", score: 98, }, ],});console.log(job);Verify the authenticity of generated certificates using their verification token.
const certificate = await certjs.verify( "VERIFY_TOKEN");console.log(certificate);Configure CertJS using project-level configuration files.
{ "template": "./certificate.pdf", "placeholders": [ "name", "score" ]}Receive notifications automatically when certificate generation jobs complete.
app.post( "/certjs/webhook", async (req, res) => { const event = req.body; console.log(event); res.sendStatus(200); });Migrate existing REST API integrations to the CertJS SDK.
await fetch( "/api/v1/jobs", { method: "POST", headers: { "X-Api-Key": apiKey, }, body: JSON.stringify({ recipients, }), });await certjs.generate({ recipients,});