{"info":{"_postman_id":"e142af73-4210-46ee-9bd3-2a632f9585e3","name":"Pastes.io- API","description":"<html><head></head><body><p><em><strong>Pastes.io</strong></em> <strong>- API for</strong> <a href=\"https://pastes.io\">https://pastes.io</a></p>\n<p><a href=\"https://pastes.io\">pastes.io</a> is a simple and efficient pastebin for mainly code to be distributed neatly and efficiently across the web. Website where you can paste and store any type of text or code snippets online and share it with your friends.</p>\n</body></html>","schema":"https://schema.getpostman.com/json/collection/v2.0.0/collection.json","toc":[],"owner":"25405096","collectionId":"e142af73-4210-46ee-9bd3-2a632f9585e3","publishedId":"2sAYX2Mirg","public":true,"customColor":{"top-bar":"FFFFFF","right-sidebar":"303030","highlight":"FF6C37"},"publishDate":"2025-07-12T23:43:44.000Z"},"item":[{"name":"Get Paste","id":"60d38930-bcaa-41a4-a8d5-68c871f0b532","request":{"method":"GET","header":[],"url":"https://pastes.io/api/pastes/<slug>","description":"<p>Get the paste and its metadata. This can only be used for pastes that are not protected by passwords. If the paste is protected by password, please use the POST version of this API to pass in the password.</p>\n<p>URL parameter:</p>\n<ol>\n<li>slug - this is required URL parameter which must be slug of your paste you want to delete. For example, if the paste URL is <a href=\"https://pastes.io/test-42644\">https://pastes.io/test-42644</a>, then slug is \"test-42644\"</li>\n</ol>\n<p><strong>Possible Good API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"success\": {\n        \"title\": \"Test\",\n        \"slug\": \"test-42644\",\n        \"syntax\": \"txt\",\n        \"expire_time\": 1792953990216,\n        \"status\": 2,\n        \"views\": 5,\n        \"extension\": \"txt\",\n        \"created_at\": 1761417919171,\n        \"content\": \"Hello world\",\n        \"url\": \"https://pastes.io/test-42644\"\n    }\n}\n\n</code></pre><p><strong>Possible Bad API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"error\": \"Paste not found\"\n}\n{\n    \"error\": \"You are not allowed to access this paste\"\n}\n{\n    \"error\": \"You are not allowed to access private paste\"\n}\n{\n    \"error\": \"Paste is expired\"\n}\n{\n    \"error\": \"Invalid password\"\n}\n\n</code></pre>","urlObject":{"protocol":"https","path":["api","pastes","<slug>"],"host":["pastes","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"60d38930-bcaa-41a4-a8d5-68c871f0b532"},{"name":"Get Raw Paste","id":"fc96859d-59eb-4cc5-97dc-4840514d47f8","request":{"method":"GET","header":[],"url":"https://pastes.io/raw/<slug>","description":"<p>Get the paste's raw data</p>\n<p>URL parameter:</p>\n<ol>\n<li>slug - this is required URL parameter which must be slug of your paste you want to delete. For example, if the paste URL is <a href=\"https://pastes.io/test-42644\">https://pastes.io/test-42644</a>, then slug is \"test-42644\"</li>\n</ol>\n<p>Query parameter:</p>\n<ol>\n<li>(Optional) password - provides the password for password protected pastes, such as <a href=\"https://raw.pastesio.com/test-42644?password=secret1234\">https://raw.pastesio.com/test-42644?password=secret1234</a></li>\n</ol>\n<p>Header:</p>\n<ol>\n<li>(Optional) x-password - provides the password for password protected pastes. This is more secured than using query parameter since it will not be exposed in the URL.</li>\n</ol>\n<p><strong>Possible Good API Responses (Raw content of the paste):</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>Hello world\n\n</code></pre><p><strong>Possible Bad API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"error\": \"Paste not found\"\n}\n{\n    \"error\": \"You are not allowed to access this paste\"\n}\n{\n    \"error\": \"This paste is password protected\"\n}\n{\n    \"error\": \"Paste is expired\"\n}\n{\n    \"error\": \"Invalid password\"\n}\n\n</code></pre>","urlObject":{"protocol":"https","path":["raw","<slug>"],"host":["pastes","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"fc96859d-59eb-4cc5-97dc-4840514d47f8"},{"name":"Get Paste (with password)","id":"3fa6dcda-d353-4f4e-81ff-efe35fd7a5fb","request":{"method":"POST","header":[{"key":"Accept","value":"application/json"}],"body":{"mode":"raw","raw":"{\r\n    \"password\": \"1234\"\r\n}","options":{"raw":{"language":"json"}}},"url":"https://pastes.io/api/pastes/<slug>","description":"<p>Include all the following POST body when you request the url:</p>\n<ol>\n<li>password - password of the paste you want requesting (Optional if paste is not password protected)</li>\n</ol>\n<p>URL parameter:</p>\n<ol>\n<li>slug - this is required URL parameter which must be slug of your paste you want to delete. For example, if the paste URL is <a href=\"https://pastes.io/test-42644\">https://pastes.io/test-42644</a>, then slug is \"test-42644\"</li>\n</ol>\n<p><strong>Possible Good API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"success\": {\n        \"title\": \"Test\",\n        \"slug\": \"test-42644\",\n        \"syntax\": \"txt\",\n        \"expire_time\": 1792953990216,\n        \"status\": 2,\n        \"views\": 5,\n        \"extension\": \"txt\",\n        \"created_at\": 1761417919171,\n        \"content\": \"Hello world\",\n        \"url\": \"https://pastes.io/test-42644\"\n    }\n}\n\n</code></pre><p><strong>Possible Bad API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"error\": \"Paste not found\"\n}\n{\n    \"error\": \"You are not allowed to access this paste\"\n}\n{\n    \"error\": \"You are not allowed to access private paste\"\n}\n{\n    \"error\": \"Paste is expired\"\n}\n{\n    \"error\": \"Invalid password\"\n}\n\n</code></pre>","urlObject":{"protocol":"https","path":["api","pastes","<slug>"],"host":["pastes","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"3fa6dcda-d353-4f4e-81ff-efe35fd7a5fb"},{"name":"Paste Create","id":"1641f9a0-c6a7-4123-ac9e-ce8422e61439","request":{"auth":{"type":"bearer","bearer":{"basicConfig":[{"key":"token","value":"<token>"}]},"isInherited":false},"method":"POST","header":[{"key":"Accept","value":"application/json"},{"key":"Authorization","value":"Bearer {api_key}","description":"<p>API key</p>\n"}],"body":{"mode":"raw","raw":"{\r\n    \"content\": \"this is new paste\",\r\n    \"title\": \"My paste\"\r\n}","options":{"raw":{"language":"json"}}},"url":"http://pastes.io/api/paste","description":"<p>This API requires an API key. You can obtain the API key at <a href=\"https://pastes.io/profile\">https://pastes.io/profile</a>. (<a href=\"https://pastes.io/pricing\">👑 PRO membership</a> required). Include the API key in the Authorization header as \"Bearer {api_key}\".</p>\n<p>Include all the following POST body when you send the request:</p>\n<ol>\n<li><p>content - this is a required parameter, containing the content of the paste</p>\n</li>\n<li><p>title - this is a required parameter which sets paste title</p>\n</li>\n<li><p>syntax - this is optional parameter, value must be valid syntax, such as php, javascript, txt, etc.</p>\n</li>\n<li><p>(optional) expire - the expiration time. Default to one month. Valid values are</p>\n<ol>\n<li><p>'N' (Never expire)</p>\n</li>\n<li><p>'1M' (1 month)</p>\n</li>\n<li><p>'1Y' (1 year)</p>\n</li>\n<li><p>'1W' (1 week)</p>\n</li>\n<li><p>'2W' (2 weeks)</p>\n</li>\n<li><p>'1D' (1 day)</p>\n</li>\n<li><p>'1H' (1 hour)</p>\n</li>\n<li><p>'10M' (10 minutes)</p>\n</li>\n<li><p>'SD' (Self destroy after read)</p>\n</li>\n</ol>\n</li>\n<li><p>(optional) password - the password for the paste</p>\n</li>\n</ol>\n<p><strong>Possible Good API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"success\": {\n        \"messages\": \"Paste successfully created\",\n        \"slug\": \"test-42644\",\n        \"paste_url\": \"http://pastes.io/test-42644\"\n    }\n}\n\n</code></pre>\n<p><strong>Possible Bad API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"message\": \"Unauthenticated.\"\n}\n\n</code></pre>","urlObject":{"protocol":"http","path":["api","paste"],"host":["pastes","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"1641f9a0-c6a7-4123-ac9e-ce8422e61439"},{"name":"Paste Delete","id":"429f4347-e2ac-4278-a857-b20551a4ed26","request":{"method":"DELETE","header":[{"key":"Authorization","value":"Bearer ","description":"<p>Bearer {api_key}</p>\n"}],"body":{"mode":"formdata","formdata":[{"key":"slug","value":"my-paste-123","description":"<p>Required - Slug of your paste that you want to delete</p>\n","type":"text"}]},"url":"https://pastes.io/api/pastes/<slug>","description":"<p>This API requires an API key. You can obtain the API key at <a href=\"https://pastes.io/profile\">https://pastes.io/profile</a>. (<a href=\"https://pastes.io/pricing\">👑 PRO membership</a> required). Include the API key in the Authorization header as \"Bearer {api_key}\".</p>\n<p>URL parameter:</p>\n<ol>\n<li>slug - this is required URL parameter which must be slug of your paste you want to delete. For example, if the paste URL is <a href=\"https://pastes.io/test-42644\">https://pastes.io/test-42644</a>, then slug is \"test-42644\"</li>\n</ol>\n<p><strong>Possible Good API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"success\": \"Paste successfully deleted\"\n}\n\n</code></pre><p><strong>Possible Bad API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"message\": \"Unauthenticated.\"\n}\n{\n    \"error\": \"Paste not found\"\n}\n\n</code></pre>","urlObject":{"protocol":"https","path":["api","pastes","<slug>"],"host":["pastes","io"],"query":[],"variable":[]}},"response":[],"_postman_id":"429f4347-e2ac-4278-a857-b20551a4ed26"},{"name":"List my pastes","id":"026fabaa-5045-4d15-8596-cf7a7dfe5904","request":{"method":"GET","header":[{"key":"Accept","value":"application/json"}],"body":{"mode":"formdata","formdata":[]},"url":"http://pastes.io/api/pastes?q","description":"<p>This API requires an API key. You can obtain the API key at <a href=\"https://pastes.io/profile.\">https://pastes.io/profile.</a> Include the API key in the Authorization header as \"Bearer {api_key}\"</p>\n<p>This API allows you to list all your pastes. You can optionally provide the q parameter to filter the pastes</p>\n<p>Include all the following GET parameters when you request the url:</p>\n<ol>\n<li>q - this will be the keyword you want to search in your pastes</li>\n</ol>\n<p><strong>Possible Good API Responses: (example)</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code class=\"language-json\">{\n    \"data\": [\n        {\n            \"id\": 201203,\n            \"title\": \"Auto-title Generator with Chat Completions\",\n            \"syntax\": \"php\",\n            \"slug\": \"auto-title-generator-with-chat-completions\",\n            \"created_at\": \"2025-10-24T22:43:16.435Z\",\n            \"password\": null,\n            \"expire_time\": null,\n            \"isOwner\": true,\n            \"views\": 3\n        }\n    ]\n}\n\n</code></pre>\n<p><strong>Possible Bad API Responses:</strong></p>\n<pre class=\"click-to-expand-wrapper is-snippet-wrapper\"><code>{\n    \"error\": {\n        \"keyword\": [\n            \"The keyword must be at least 2 characters.\"\n        ]\n    }\n}\n{\n    \"error\": \"This feature is disabled\"\n}\n\n</code></pre>","urlObject":{"protocol":"http","path":["api","pastes"],"host":["pastes","io"],"query":[{"description":{"content":"<p>Optional - search for keywoard in title</p>\n","type":"text/plain"},"key":"q","value":null}],"variable":[]}},"response":[],"_postman_id":"026fabaa-5045-4d15-8596-cf7a7dfe5904"}]}