{"activeVersionTag":"latest","latestAvailableVersionTag":"latest","collection":{"info":{"_postman_id":"9d458495-a5dc-4bee-89ab-8aaf03694500","name":"Content Transformation API","description":"*Version: v1*\n\n***Content Transformation API*** is a suite of APIs developed by *codemantra* for automated transformation of content.\n\nOnce registered with *codemantra* for *Content Transformation* API suite, you can use below APIs for seamless integration into your products:\n\n*   **Authorize**\n*   **Content Transformation Request** - File or URL\n*   **Content Transformation Status**\n    \n\nFor password management, you can use below APIs:\n\n*   **Change Password**\n*   **Forgot Password**\n*   Password Policy\n    *   Minimum password length should be 8\n    *   Numbers are required\n    *   Special characters are required\n    *   Uppercase letters are required\n    *   Lowercase letters are required\n    *   The temporary password sent on registration will be valid for 365 days.\n    *   The temporary password sent on registration will be valid for 365 days.\n\n## Steps for Integration:\n\n1.  You can contact *codemantra* for registration.\n2.  Once the API administrator from *codemantra* registers your email, you'll receive a welcome mail, along with the temporary password.\n3.  You can set your permanent password by using the **Authorize API**. You'll have to send your temporary password along with your email and the password that you want to set as your permanent password.\n4.  Once you've set your password, you can use the **Authorize API** to generate authorization token by passing your email and password. The generated authorization token will have to be passed in other APIs as a header.\n5.  When you have your authorization token, you can use the **Content Transformation Request API** to upload files for transformation. The transformation will happen asynchronously, and you'll receive a request id to track your transformation request.\n    *   In case you want to upload a file directly, you can just pass the document name and format in the request, and you'll receive a presigned URL to upload the file.\n    *   However, if you want to upload file from a URL, you can pass the document URL, along with the document name and format.\n    *   Optionally, if you want certain information to be added to the **Content Transformation Request API** response for your downstream processing pipelines, you can pass that information as `info` object in the request body. The information will be added to the API response body without any modification.\n6.  You can check the status of your transformation request by using the **Content Transformation Status API,** passing the request id as the path parameter.\n7.  Once your transformation request is processed by *codemantra*, you will receive a url in the response of the **Content Transformation Status API** to downloand the transformed document. Also, an email will be sent to your email id to notify the completion of the transformation process. The email will also contain the url to download the transformed document. ***The transformed document will be only available for download till 7 days from the time the transformation request was processed by codemantra.***\n    \n\nAdditionally, *Content Transformation API* provides **websocket connect** and **callback url** features using which you can receive real-time transformation completion notifications.\n\nIf you happen to use the **websocket connect** or **callback url** feature, you'll not need to keep track of your requests by continuously polling **Content Transformation Status API**.\n\nYou can connect to the websocket using the below url:\n\n``` bash\nwss://transform.ws.codemantra.com?Authorization=[your-access-token]\n\n```\n\n#### NodeJs Template for connecting to Websocket:\n\n``` javascript\nvar WebSocketClient = require(\"websocket\").client\nvar client = new WebSocketClient();\nclient.on('connectFailed', function(error) {\n    console.log('Connect Error: ' + error.toString());\n});\nclient.on('connect', function(connection) {\n    console.log('WebSocket Client Connected');\n    connection.on('error', function(error) {\n        console.log(\"Connection Error: \" + error.toString());\n    });\n    connection.on('close', function() {\n        console.log('Connection Closed');\n    });\n    connection.on('message', function(message) {\n        const content = JSON.parse(message.utf8Data);\n        if (content.event == 'content-transformation-complete') {\n            console.log('Received new transformation complete notification');\n            console.log(content)\n            // Add your business logic here\n        }\n    });\n});\n// Obtain valid token from Authorize API\nconst token = \"[your-access-token]\";\nclient.connect('wss://transform.ws.codemantra.com?Authorization='+token);\n\n```\n\nIn case you wish to have your real-time transformation completion notifications pushed to an endpoint, you need to either provide the `callbackUrl` when you're registering for the API, or send the `callbackUrl` when you're giving an upload request. Once the transformation is completed, notification will be sent on the provided `callbackUrl`.","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","isPublicCollection":false,"owner":"14952611","team":1654986,"collectionId":"9d458495-a5dc-4bee-89ab-8aaf03694500","publishedId":"UVeFNmYt","public":true,"publicUrl":"https://transform.apidocs.codemantra.com","privateUrl":"https://go.postman.co/documentation/14952611-9d458495-a5dc-4bee-89ab-8aaf03694500","customColor":{"top-bar":"00834F","right-sidebar":"303030","highlight":"EF5B25"},"documentationLayout":"classic-double-column","customisation":null,"version":"8.10.1","publishDate":"2022-02-03T11:54:26.000Z","activeVersionTag":"latest","documentationTheme":"light","metaTags":{},"logos":{}},"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://res.cloudinary.com/postman/image/upload/t_team_logo_pubdoc/v1/team/2c69e5a38ae141a0a0f933a48fb1348ab17b207168111d2a7893f4a0c23fe0f9","favicon":"https://res.cloudinary.com/postman/image/upload/v1615912199/team/jbq2u9qwoh3veu3auhpf.ico"},"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://transform.apidocs.codemantra.com/view/metadata/UVeFNmYt"}