{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"d583d0c2-6224-4045-9b84-80d2349c7f66","name":"Kolej eSign Portal API","description":"**Kolej eSign Portal** is a secure, developer-friendly digital signing platform that enables you to upload documents, define signature fields, invite recipients, and manage signed documents — all via a powerful REST API.\n\n---\n\n## 🚀 Overview\n\nThe **Kolej eSign API** allows you to:\n\n- 📤 Upload PDF documents for e-signing\n    \n- ✍️ Create and position signature fields\n    \n- 👤 Add recipients and assign signing roles\n    \n- 📩 Send documents for signing and track status\n    \n- 📁 Download fully signed documents\n    \n\nBase URL:\n\n```\nhttps://dev.kolej.com/v1/\n\n ```\n\nAll requests must be made over HTTPS.\n\n---\n\n## 🔐 Authentication\n\nThe Kolej eSign API uses **JWT (JSON Web Token)** for authentication.\n\nInclude your token in the `Authorization` header with the `Bearer` scheme:\n\n``` http\nAuthorization: Bearer <your_jwt_token>\n\n ```\n\nYou can generate tokens via your developer dashboard or through the authentication endpoint.\n\n---\n\n## ⚙️ Quick Start (JavaScript)\n\nHere’s a simple example using `fetch` in Node.js or browser environments:\n\n``` javascript\nconst BASE_URL = \"https://dev.kolej.com/v1\";\nconst token = \"YOUR_JWT_TOKEN\";\n// Example: Upload a document\nasync function uploadDocument(file) {\n  const formData = new FormData();\n  formData.append(\"file\", file);\n  const res = await fetch(`${BASE_URL}/documents`, {\n    method: \"POST\",\n    headers: {\n      Authorization: `Bearer ${token}`,\n    },\n    body: formData,\n  });\n  const data = await res.json();\n  console.log(\"Uploaded document:\", data);\n}\n\n ```\n\n---\n\n## 📚 Core API Endpoints\n\n### 1\\. 📤 Upload Document\n\n**POST** `/documents`\n\nUpload a new PDF document to begin the signing workflow.\n\n**Request:**\n\n``` http\nPOST /documents\nContent-Type: multipart/form-data\nAuthorization: Bearer <jwt>\nfile: <PDF_FILE>\n\n ```\n\n**Response:**\n\n``` json\n{\n  \"id\": \"doc_12345\",\n  \"name\": \"contract.pdf\",\n  \"status\": \"draft\",\n  \"created_at\": \"2025-10-06T12:00:00Z\"\n}\n\n ```\n\n---\n\n### 2\\. ✍️ Add Signature Field\n\n**POST** `/documents/:id/fields`\n\nDefine where recipients should sign or fill in fields.\n\n**Request:**\n\n``` json\n{\n  \"page\": 1,\n  \"position_x\": 120,\n  \"position_y\": 500,\n  \"width\": 200,\n  \"height\": 50,\n  \"type\": \"signature\",\n  \"recipient_email\": \"john@example.com\"\n}\n\n ```\n\n**Response:**\n\n``` json\n{\n  \"field_id\": \"field_abc123\",\n  \"type\": \"signature\",\n  \"recipient_email\": \"john@example.com\",\n  \"status\": \"pending\"\n}\n\n ```\n\n---\n\n### 3\\. 👤 Add Recipient\n\n**POST** `/documents/:id/recipients`\n\n**Request:**\n\n``` json\n{\n  \"full_name\": \"John Doe\",\n  \"email\": \"john@example.com\",\n  \"role\": \"SIGNER\"\n}\n\n ```\n\n**Response:**\n\n``` json\n{\n  \"recipient_id\": \"rec_98765\",\n  \"status\": \"invited\"\n}\n\n ```\n\n---\n\n### 4\\. 📩 Send for Signing\n\n**POST** `/documents/:id/send`\n\nSends the document to all recipients and starts the signing workflow.\n\n**Response:**\n\n``` json\n{\n  \"id\": \"doc_12345\",\n  \"status\": \"sent\"\n}\n\n ```\n\n---\n\n### 5\\. 📁 Download Signed Document\n\n**GET** `/documents/:id/download`\n\nDownloads the final, signed PDF.\n\n**Response:**\n\n- `Content-Type: application/pdf`\n    \n\n---\n\n## ❗ Error Handling\n\nThe API uses standard HTTP status codes to indicate success or failure:\n\n| Status | Meaning |\n| --- | --- |\n| 200 | ✅ Success |\n| 201 | ✅ Resource created |\n| 400 | ❌ Bad request (invalid input) |\n| 401 | 🔐 Unauthorized (invalid JWT) |\n| 404 | 🔎 Not found |\n| 500 | 💥 Internal server error |\n\n**Error Example:**\n\n``` json\n{\n  \"error\": \"Invalid token\",\n  \"code\": 401\n}\n\n ```\n\n---\n\n## 📣 Webhooks (Optional)\n\nYou can configure webhook URLs to get notified about key events:\n\n- `document.sent`\n    \n- `document.signed`\n    \n- `document.completed`\n    \n\nEach webhook event will POST a JSON payload to your endpoint.\n\n---\n\n## 🧰 Tips & Best Practices\n\n- Always validate document status before sending for signing.\n    \n- Store `document_id` and `recipient_id` for future updates.\n    \n- Use HTTPS everywhere — requests over HTTP are rejected.\n    \n\n---\n\n## 📞 Support\n\n- 📧 Email: [support@kolej.com](https://mailto:dev-support@kolej.com)\n    \n- 🧑‍💻 Developer Portal: [https://dev.kolejsign.com](https://dev.kolej.com/)\n    \n\n---\n\n### 🏁 Start Building Today\n\nWith just a few API calls, you can integrate secure document signing into your product in minutes.\n\nHappy coding with **Kolej eSign Portal API** 🚀","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"46801561","team":8870784,"collectionId":"d583d0c2-6224-4045-9b84-80d2349c7f66","publishedId":"2sB3HooJnC","public":true,"publicUrl":"https://documenter-api.postman.tech/view/46801561/2sB3HooJnC","privateUrl":"https://go.postman.co/documentation/46801561-d583d0c2-6224-4045-9b84-80d2349c7f66","customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"documentationLayout":"classic-double-column","customisation":{"metaTags":[{"name":"description","value":""},{"name":"title","value":""}],"appearance":{"default":"light","themes":[{"name":"dark","logo":null,"colors":{"top-bar":"212121","right-sidebar":"303030","highlight":"FF6C37"}},{"name":"light","logo":null,"colors":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"}}]}},"version":"8.12.13","publishDate":"2025-09-11T13:09:54.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{"title":"","description":""},"logos":{"logoLight":null,"logoDark":null}},"statusCode":200},"environments":[],"user":{"authenticated":false,"permissions":{"publish":false}},"run":{"button":{"js":"https://run.pstmn.io/button.js","css":"https://run.pstmn.io/button.css"}},"web":"https://www.getpostman.com/","team":{"logo":"https://postman-image-service.postman.com/api/cloudinary-proxy/postman/image/upload/t_team_logo_pubdoc/v1/team/1bbea5d220f0d29d942cce8adc33b60506bf3d489031f5f4565e5d07772a20dc","favicon":""},"isEnvFetchError":false,"languages":"[{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"HttpClient\"},{\"key\":\"csharp\",\"label\":\"C#\",\"variant\":\"RestSharp\"},{\"key\":\"curl\",\"label\":\"cURL\",\"variant\":\"cURL\"},{\"key\":\"dart\",\"label\":\"Dart\",\"variant\":\"http\"},{\"key\":\"go\",\"label\":\"Go\",\"variant\":\"Native\"},{\"key\":\"http\",\"label\":\"HTTP\",\"variant\":\"HTTP\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"OkHttp\"},{\"key\":\"java\",\"label\":\"Java\",\"variant\":\"Unirest\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"Fetch\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"jQuery\"},{\"key\":\"javascript\",\"label\":\"JavaScript\",\"variant\":\"XHR\"},{\"key\":\"c\",\"label\":\"C\",\"variant\":\"libcurl\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Axios\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Native\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Request\"},{\"key\":\"nodejs\",\"label\":\"NodeJs\",\"variant\":\"Unirest\"},{\"key\":\"objective-c\",\"label\":\"Objective-C\",\"variant\":\"NSURLSession\"},{\"key\":\"ocaml\",\"label\":\"OCaml\",\"variant\":\"Cohttp\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"cURL\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"Guzzle\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"HTTP_Request2\"},{\"key\":\"php\",\"label\":\"PHP\",\"variant\":\"pecl_http\"},{\"key\":\"powershell\",\"label\":\"PowerShell\",\"variant\":\"RestMethod\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"http.client\"},{\"key\":\"python\",\"label\":\"Python\",\"variant\":\"Requests\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"httr\"},{\"key\":\"r\",\"label\":\"R\",\"variant\":\"RCurl\"},{\"key\":\"ruby\",\"label\":\"Ruby\",\"variant\":\"Net::HTTP\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"Httpie\"},{\"key\":\"shell\",\"label\":\"Shell\",\"variant\":\"wget\"},{\"key\":\"swift\",\"label\":\"Swift\",\"variant\":\"URLSession\"}]","languageSettings":[{"key":"csharp","label":"C#","variant":"HttpClient"},{"key":"csharp","label":"C#","variant":"RestSharp"},{"key":"curl","label":"cURL","variant":"cURL"},{"key":"dart","label":"Dart","variant":"http"},{"key":"go","label":"Go","variant":"Native"},{"key":"http","label":"HTTP","variant":"HTTP"},{"key":"java","label":"Java","variant":"OkHttp"},{"key":"java","label":"Java","variant":"Unirest"},{"key":"javascript","label":"JavaScript","variant":"Fetch"},{"key":"javascript","label":"JavaScript","variant":"jQuery"},{"key":"javascript","label":"JavaScript","variant":"XHR"},{"key":"c","label":"C","variant":"libcurl"},{"key":"nodejs","label":"NodeJs","variant":"Axios"},{"key":"nodejs","label":"NodeJs","variant":"Native"},{"key":"nodejs","label":"NodeJs","variant":"Request"},{"key":"nodejs","label":"NodeJs","variant":"Unirest"},{"key":"objective-c","label":"Objective-C","variant":"NSURLSession"},{"key":"ocaml","label":"OCaml","variant":"Cohttp"},{"key":"php","label":"PHP","variant":"cURL"},{"key":"php","label":"PHP","variant":"Guzzle"},{"key":"php","label":"PHP","variant":"HTTP_Request2"},{"key":"php","label":"PHP","variant":"pecl_http"},{"key":"powershell","label":"PowerShell","variant":"RestMethod"},{"key":"python","label":"Python","variant":"http.client"},{"key":"python","label":"Python","variant":"Requests"},{"key":"r","label":"R","variant":"httr"},{"key":"r","label":"R","variant":"RCurl"},{"key":"ruby","label":"Ruby","variant":"Net::HTTP"},{"key":"shell","label":"Shell","variant":"Httpie"},{"key":"shell","label":"Shell","variant":"wget"},{"key":"swift","label":"Swift","variant":"URLSession"}],"languageOptions":[{"label":"C# - HttpClient","value":"csharp - HttpClient - C#"},{"label":"C# - RestSharp","value":"csharp - RestSharp - C#"},{"label":"cURL - cURL","value":"curl - cURL - cURL"},{"label":"Dart - http","value":"dart - http - Dart"},{"label":"Go - Native","value":"go - Native - Go"},{"label":"HTTP - HTTP","value":"http - HTTP - HTTP"},{"label":"Java - OkHttp","value":"java - OkHttp - Java"},{"label":"Java - Unirest","value":"java - Unirest - Java"},{"label":"JavaScript - Fetch","value":"javascript - Fetch - JavaScript"},{"label":"JavaScript - jQuery","value":"javascript - jQuery - JavaScript"},{"label":"JavaScript - XHR","value":"javascript - XHR - JavaScript"},{"label":"C - libcurl","value":"c - libcurl - C"},{"label":"NodeJs - Axios","value":"nodejs - Axios - NodeJs"},{"label":"NodeJs - Native","value":"nodejs - Native - NodeJs"},{"label":"NodeJs - Request","value":"nodejs - Request - NodeJs"},{"label":"NodeJs - Unirest","value":"nodejs - Unirest - NodeJs"},{"label":"Objective-C - NSURLSession","value":"objective-c - NSURLSession - Objective-C"},{"label":"OCaml - Cohttp","value":"ocaml - Cohttp - OCaml"},{"label":"PHP - cURL","value":"php - cURL - PHP"},{"label":"PHP - Guzzle","value":"php - Guzzle - PHP"},{"label":"PHP - HTTP_Request2","value":"php - HTTP_Request2 - PHP"},{"label":"PHP - pecl_http","value":"php - pecl_http - PHP"},{"label":"PowerShell - RestMethod","value":"powershell - RestMethod - PowerShell"},{"label":"Python - http.client","value":"python - http.client - Python"},{"label":"Python - Requests","value":"python - Requests - Python"},{"label":"R - httr","value":"r - httr - R"},{"label":"R - RCurl","value":"r - RCurl - R"},{"label":"Ruby - Net::HTTP","value":"ruby - Net::HTTP - Ruby"},{"label":"Shell - Httpie","value":"shell - Httpie - Shell"},{"label":"Shell - wget","value":"shell - wget - Shell"},{"label":"Swift - URLSession","value":"swift - URLSession - Swift"}],"layoutOptions":[{"value":"classic-single-column","label":"Single Column"},{"value":"classic-double-column","label":"Double Column"}],"versionOptions":[],"environmentOptions":[{"value":"0","label":"No Environment"}],"canonicalUrl":"https://documenter.gw.postman.com/view/metadata/2sB3HooJnC"}