{"info":{"_postman_id":"cb929b25-6395-4248-964e-bf520f464e93","name":"Pasteview API","description":"<html><head></head><body><p>This collection contains an API to create a new paste.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"41629477","collectionId":"cb929b25-6395-4248-964e-bf520f464e93","publishedId":"2sAYQiAn2L","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"01D86D"},"publishDate":"2025-01-28T18:54:30.000Z"},"item":[{"name":"Create a new Paste","event":[{"listen":"test","script":{"id":"3b3d876c-73aa-4d7b-890e-0a5e606b5b04","exec":["pm.test(\"Successful POST request\", function () {","    pm.expect(pm.response.code).to.be.oneOf([200, 201]);","});",""],"type":"text/javascript","packages":{}}}],"id":"cef7ac4f-ac83-4182-989f-f90a471312cf","protocolProfileBehavior":{"disableBodyPruning":true},"request":{"auth":{"type":"noauth","isInherited":false},"method":"POST","header":[{"key":"x-api-key","value":"YOUR_API_KEY","type":"text"}],"url":"https://pasteview.com/api/pastes","description":"<h1 id=\"create-a-new-paste\">Create a New Paste</h1>\n<p>This endpoint is used to create a new paste with the specified details.</p>\n<h2 id=\"request-body-parameters\">Request Body Parameters</h2>\n<h3 id=\"title-section\">Title Section:</h3>\n<ul>\n<li><p>title: The title of the paste.</p>\n</li>\n<li><p>titleRedirectUrl (optional): The URL to redirect when the title is clicked.</p>\n</li>\n<li><p>color1 (optional)</p>\n</li>\n<li><p>color2 (optional)</p>\n</li>\n<li><p>color3 (optional)</p>\n</li>\n<li><p>color4 (optional)</p>\n</li>\n<li><p>color5 (optional)</p>\n</li>\n</ul>\n<p>You can choose up to 5 colors for the title of your pastes. Multiple colors will form a gradient together of the chosen colors.<br />The color fields are not required, if you don't choose a color it will default to your badge colors.</p>\n<p><strong>Available colors (more info in</strong> <a href=\"https://pasteview.com/user/profile\">user dashboard</a><strong>)</strong></p>\n<div class=\"click-to-expand-wrapper is-table-wrapper\"><table>\n<thead>\n<tr>\n<th>Badge title</th>\n<th>Color code</th>\n</tr>\n</thead>\n<tbody>\n<tr>\n<td>Default</td>\n<td>#FFFFFF</td>\n</tr>\n<tr>\n<td>Active</td>\n<td>#0087BB</td>\n</tr>\n<tr>\n<td>Popular</td>\n<td>#26E796</td>\n</tr>\n<tr>\n<td>Famous</td>\n<td>#FF6E00</td>\n</tr>\n<tr>\n<td>Legendary</td>\n<td>Custom</td>\n</tr>\n</tbody>\n</table>\n</div><h3 id=\"content\">Content:</h3>\n<ul>\n<li>content: The content of the paste.</li>\n</ul>\n<h3 id=\"content-syntax\">Content Syntax:</h3>\n<ul>\n<li><p>syntax (optional): The optional syntax highlighting for the paste content. Allowed values are:</p>\n<ul>\n<li><code>'html', 'css', 'javascript', 'json', 'python', 'c++', 'c#', 'java', 'php', 'sql', 'xml'</code></li>\n</ul>\n</li>\n</ul>\n<h3 id=\"paste-status\">Paste Status:</h3>\n<ul>\n<li><p>status: The status of the paste. Allowed values are:</p>\n<ul>\n<li><code>'public', 'private', 'password'</code></li>\n</ul>\n</li>\n</ul>\n<h3 id=\"paste-security\">Paste Security:</h3>\n<ul>\n<li>password (optional): The password for accessing the paste, only add this if you have selected 'password' as the status.</li>\n</ul>\n<h3 id=\"paste-expiry\">Paste Expiry:</h3>\n<ul>\n<li><p>expiration: The expiration time for the paste. Allowed values are:</p>\n<ul>\n<li><code>'never', '1h', '6h', '12h', '1d', '1w', '1m', '1y'</code></li>\n</ul>\n</li>\n</ul>\n","urlObject":{"protocol":"https","path":["api","pastes"],"host":["pasteview","com"],"query":[],"variable":[]}},"response":[{"id":"12304cdc-6cd4-4842-9c5c-dd3d48ba4572","name":"Successful Response","originalRequest":{"method":"POST","header":[{"key":"x-api-key","value":"b019585d4236d67126466b9a380562c3f9d425z24b5ad1194ae0f00ceaff2fa8","type":"text"}],"body":{"mode":"raw","raw":"{\n    \"titleSection\": {\n        \"title\": \"API Paste\",\n        \"titleRedirectUrl\": \"https://example.com\",\n        \"color1\": \"#FFFFFF\",\n        \"color2\": \"#0087BB\",\n        \"color3\": \"#26E796\",\n        \"color4\": \"#FF6E00\",\n        \"color5\": \"#000000\"\n    },\n    \"content\": \"Created with the Pasteview API.\",\n    \"syntax\": \"javascript\",\n    \"status\": \"public\",\n    \"expiration\": \"1d\"\n}","options":{"raw":{"language":"json"}}},"url":"https://pasteview.com/api/pastes"},"status":"OK","code":200,"_postman_previewlanguage":"json","header":[{"key":"Date","value":"Tue, 04 Feb 2025 05:29:03 GMT"},{"key":"Content-Type","value":"application/json; charset=utf-8"},{"key":"Transfer-Encoding","value":"chunked"},{"key":"Connection","value":"keep-alive"},{"key":"content-security-policy","value":"default-src 'self';base-uri 'self';font-src 'self' https: data:;form-action 'self';frame-ancestors 'self';img-src 'self' data:;object-src 'none';script-src 'self';script-src-attr 'none';style-src 'self' https: 'unsafe-inline';upgrade-insecure-requests"},{"key":"cross-origin-opener-policy","value":"same-origin"},{"key":"cross-origin-resource-policy","value":"same-origin"},{"key":"origin-agent-cluster","value":"?1"},{"key":"referrer-policy","value":"no-referrer"},{"key":"strict-transport-security","value":"max-age=31536000; includeSubDomains"},{"key":"x-content-type-options","value":"nosniff"},{"key":"x-dns-prefetch-control","value":"off"},{"key":"x-download-options","value":"noopen"},{"key":"x-frame-options","value":"SAMEORIGIN"},{"key":"x-permitted-cross-domain-policies","value":"none"},{"key":"x-xss-protection","value":"0"},{"key":"access-control-allow-origin","value":"*"},{"key":"access-control-allow-credentials","value":"true"},{"key":"etag","value":"W/\"1ca-IibgaLtyfnHdCjGv/37iH2lDVBo\""},{"key":"cf-cache-status","value":"DYNAMIC"},{"key":"Report-To","value":"{\"endpoints\":[{\"url\":\"https:\\/\\/a.nel.cloudflare.com\\/report\\/v4?s=iF2B5QFRZ2eDGQLIJNok7SLtow1ocw%2FHw7dct1ZQqVjAm2cJpM%2FOfP5lxYf0itTNLLxgR4Z9ZB9xFbRrwrVYi5e6dJaSk%2FwugzfMLAjGTOyyklD%2BTQTB8F4UzmrxSZLgrgDM6UQ%3D\"}],\"group\":\"cf-nel\",\"max_age\":604800}"},{"key":"NEL","value":"{\"success_fraction\":0,\"report_to\":\"cf-nel\",\"max_age\":604800}"},{"key":"Server","value":"cloudflare"},{"key":"CF-RAY","value":"90c842c40e61c978-IAD"},{"key":"Content-Encoding","value":"br"},{"key":"alt-svc","value":"h3=\":443\"; ma=86400"},{"key":"server-timing","value":"cfL4;desc=\"?proto=TCP&rtt=2862&min_rtt=2696&rtt_var=902&sent=4&recv=6&lost=0&retrans=0&sent_bytes=2832&recv_bytes=1299&delivery_rate=1068634&cwnd=251&unsent_bytes=0&cid=07d2bf73d59b8f91&ts=353&x=0\""}],"cookie":[],"responseTime":null,"body":"{\n    \"message\": \"Paste created successfully\",\n    \"result\": {\n        \"syntax\": \"javascript\",\n        \"status\": \"public\",\n        \"createdBy\": \"test2\",\n        \"expiryTime\": \"2025-02-05T05:29:03.652Z\",\n        \"_id\": \"a1ff367\",\n        \"createdAt\": \"2025-02-04T05:29:03.653Z\",\n        \"updatedAt\": \"2025-02-04T05:29:03.653Z\",\n        \"titleSection\": {\n            \"title\": \"API color paste\",\n            \"titleRedirectUrl\": \"https://example.com\",\n            \"color1\": null,\n            \"color2\": \"#ffffff\",\n            \"color3\": null,\n            \"color4\": null,\n            \"color5\": \"#0087FF\"\n        },\n        \"pasteLink\": \"https://pasteview.com/a1ff367\"\n    }\n}"}],"_postman_id":"cef7ac4f-ac83-4182-989f-f90a471312cf"}],"event":[{"listen":"prerequest","script":{"type":"text/javascript","exec":[""],"id":"c5e657e2-c71f-4a40-9561-7998ec2ec0a5"}},{"listen":"test","script":{"type":"text/javascript","exec":[""],"id":"94b6a155-1f74-44fc-8d79-8935c9ebac20"}}],"variable":[{"key":"id","value":"1"},{"key":"base_url","value":"https://postman-rest-api-learner.glitch.me/"}]}