{"info":{"_postman_id":"e0dedf23-51e0-429b-a699-65ca62651fed","name":"Trimy","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"description":"<html><head></head><body></body></html>","owner":"25579043","collectionId":"e0dedf23-51e0-429b-a699-65ca62651fed","publishedId":"2sB2j7cp23","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-05-06T17:19:21.000Z"},"item":[{"name":"Generate Short URL","id":"6ed64b50-c9b5-4f35-9dc2-ddfe7ae8f5fc","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"basic","basic":{"basicConfig":[{"key":"username","value":"{{username}}"},{"key":"password","value":"{{password}}"}]},"isInherited":false},"method":"POST","header":[{"key":"accept","value":"*/*"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"long_url\": \"\", // Mandatory Param\n    \"title\": \"\", // Mandatory Param\n    \"short_code\": \"\", //Optional Param\n    \"tags\": \"\" //Optional Param\n}","options":{"raw":{"language":"json"}}},"url":"https://api.trimy.in/v1/url","description":"<h3 id=\"request\">Request</h3>\n<p>This endpoint allows the user to create a new short URL. The request should be sent as an HTTP POST to <code>https://api.trimy.in/v1/url</code> with a raw request body.</p>\n<h4 id=\"request-body\">Request Body</h4>\n<ul>\n<li><p><code>long_url</code> (string, required): The long URL that needs to be shortened.</p>\n</li>\n<li><p><code>title</code> (string, required): Title for the URL.</p>\n</li>\n<li><p><code>short_code</code> (string, optional): Custom short code for the URL.</p>\n</li>\n<li><p><code>tags</code> (string, optional): Tags associated with the URL.</p>\n</li>\n</ul>\n<h3 id=\"response\">Response</h3>\n<p>The response for this request is as follows:</p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"result\": {\n        \"flag\": 0,\n        \"flag_message\": \"\"\n    },\n    \"data\": \"\"\n}\n\n</code></pre>\n<h4 id=\"json-schema\">JSON Schema</h4>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"type\": \"object\",\n    \"properties\": {\n        \"result\": {\n            \"type\": \"object\",\n            \"properties\": {\n                \"flag\": {\n                    \"type\": \"integer\"\n                },\n                \"flag_message\": {\n                    \"type\": \"string\"\n                }\n            }\n        },\n        \"data\": {\n            \"type\": \"string\"\n        }\n    }\n}\n\n</code></pre>\n","urlObject":{"protocol":"https","path":["v1","url"],"host":["api","trimy","in"],"query":[],"variable":[]}},"response":[{"id":"2de9e162-2265-47d1-b23a-0d6cd09e5023","name":"201-Success","originalRequest":{"method":"POST","header":[{"key":"accept","value":"*/*"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"long_url\": \"\", // Mandatory Param\n    \"title\": \"\", // Mandatory Param\n    \"short_code\": \"\", //Optional Param\n    \"tags\": \"\" //Optional Param\n}","options":{"raw":{"language":"json"}}},"url":"https://api.trimy.in/v1/url"},"status":"Created","code":201,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8; x-api-version=1"},{"key":"Date","value":"Fri, 02 May 2025 12:27:10 GMT"},{"key":"Server","value":"Kestrel"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"api-supported-versions","value":"1.0"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"flag\": 1,\n        \"flag_message\": \"Shortlink created successfully.\"\n    },\n    \"data\": \"Short Link\"\n}"},{"id":"b28abb89-87eb-4263-b586-d4979b65fbfe","name":"400-Error","originalRequest":{"method":"POST","header":[{"key":"accept","value":"*/*"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"long_url\": \"\", // Mandatory Param\n    \"title\": \"\", // Mandatory Param\n    \"short_code\": \"\", //Optional Param\n    \"tags\": \"\" //Optional Param\n}","options":{"raw":{"language":"json"}}},"url":"https://api.trimy.in/v1/url"},"status":"Bad Request","code":400,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Date","value":"Fri, 02 May 2025 12:53:47 GMT"},{"key":"Server","value":"Kestrel"},{"key":"Transfer-Encoding","value":"chunked"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"flag\": 0,\n        \"flag_message\": \"Title cannot be blank.\"\n    },\n    \"data\": null\n}"},{"id":"484c0b55-1940-4b6a-b604-b5e5bfc49a00","name":"401-Unauthorized","originalRequest":{"method":"POST","header":[{"key":"accept","value":"*/*"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"long_url\": \"\", // Mandatory Param\n    \"title\": \"\", // Mandatory Param\n    \"short_code\": \"\", //Optional Param\n    \"tags\": \"\" //Optional Param\n}","options":{"raw":{"language":"json"}}},"url":"https://api.trimy.in/v1/url"},"status":"Unauthorized","code":401,"_postman_previewlanguage":"plain","header":[{"key":"Content-Length","value":"0"},{"key":"Date","value":"Fri, 02 May 2025 12:57:27 GMT"},{"key":"Server","value":"Kestrel"}],"cookie":[],"responseTime":null,"body":""},{"id":"0280b7ac-aaa7-4d6d-933e-eb12b5413316","name":"500-Error","originalRequest":{"method":"POST","header":[{"key":"accept","value":"*/*"},{"key":"Content-Type","value":"application/json"}],"body":{"mode":"raw","raw":"{\n    \"long_url\": \"\", // Mandatory Param\n    \"title\": \"\", // Mandatory Param\n    \"short_code\": \"\", //Optional Param\n    \"tags\": \"\" //Optional Param\n}","options":{"raw":{"language":"json"}}},"url":"https://api.trimy.in/v1/url"},"status":"Internal Server Error","code":500,"_postman_previewlanguage":"json","header":[{"key":"Content-Type","value":"application/json; charset=utf-8; x-api-version=1"},{"key":"Date","value":"Fri, 02 May 2025 12:53:19 GMT"},{"key":"Server","value":"Kestrel"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"api-supported-versions","value":"1.0"}],"cookie":[],"responseTime":null,"body":"{\n    \"result\": {\n        \"flag\": 0,\n        \"flag_message\": \"Something went wrong.\"\n    },\n    \"data\": null\n}"}],"_postman_id":"6ed64b50-c9b5-4f35-9dc2-ddfe7ae8f5fc"}],"auth":{"type":"basic","basic":{"basicConfig":[]}},"event":[{"listen":"prerequest","script":{"type":"text/javascript","packages":{},"exec":[""],"id":"5a040355-8641-4f2f-b51e-747d83d648dd"}},{"listen":"test","script":{"type":"text/javascript","packages":{},"exec":[""],"id":"b200d97b-77ba-441f-9e2b-ef4c75915619"}}]}