{"id":4773,"date":"2026-03-30T08:35:59","date_gmt":"2026-03-30T08:35:59","guid":{"rendered":"https:\/\/tinyurl.com\/blog\/?p=4773"},"modified":"2026-04-07T15:54:06","modified_gmt":"2026-04-07T15:54:06","slug":"how-archive-using-tinyurl-api","status":"publish","type":"post","link":"https:\/\/tinyurl.com\/blog\/how-archive-using-tinyurl-api\/","title":{"rendered":"How to Archive or Unarchive a TinyURL Using TinyURL API?"},"content":{"rendered":"\n<p style=\"font-size:16px\">It is possible to archive or unarchive TinyURLs on your account using&nbsp;<code>PATCH \/archive<\/code>&nbsp;endpoint.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:16px\">All API requests need an authentication token so the first step is to create one. For this particular request, the token must have API permission for \u201cArchive TinyURL\u201d. Please refer to \u201cHow to create or modify an API token with specific permissions?\u201d if you want guidance on how to create API token with specific permissions.<\/p>\n\n\n\n<div style=\"height:25px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:16px\">Once authenticated, all you need with the PATCH \/archive endpoint is a Request Body that contains a domain and alias as input variables so a link can be archived or unarchived.<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/malcolm-en-gb.s3.eu-west-1.amazonaws.com\/instances\/n9sEghF2ZC\/resources\/2BwXIFhCa7\/TinyURL%20Open%20API%20-%20Patch%20archive.png\" alt=\"TinyURL Open API - Patch archive (1).png\"\/><\/figure>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<p style=\"font-size:16px\">If all goes well, you should get a successful server response with&nbsp;<strong>Code 200<\/strong>.<\/p>\n\n\n\n<div style=\"height:50px\" aria-hidden=\"true\" class=\"wp-block-spacer\"><\/div>\n\n\n\n<figure class=\"wp-block-image\"><img decoding=\"async\" src=\"https:\/\/malcolm-en-gb.s3.eu-west-1.amazonaws.com\/instances\/n9sEghF2ZC\/resources\/JQVmNpb3w4\/TinyURL%20Open%20API%20-%20Patch%20archive%20Response.png\" alt=\"TinyURL Open API - Patch archive Response (1).png\"\/><\/figure>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>It is possible to archive or unarchive TinyURLs on your account using&nbsp;PATCH \/archive&nbsp;endpoint. All API requests need an authentication token so the first step is to create one. For this particular request, the token must have API permission for \u201cArchive TinyURL\u201d. Please refer to \u201cHow to create or modify an API token with specific permissions?\u201d [&hellip;]<\/p>\n","protected":false},"author":4,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[60],"tags":[67],"class_list":["post-4773","post","type-post","status-publish","format-standard","hentry","category-help","tag-api-help"],"_links":{"self":[{"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/posts\/4773","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/users\/4"}],"replies":[{"embeddable":true,"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/comments?post=4773"}],"version-history":[{"count":2,"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/posts\/4773\/revisions"}],"predecessor-version":[{"id":4809,"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/posts\/4773\/revisions\/4809"}],"wp:attachment":[{"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/media?parent=4773"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/categories?post=4773"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tinyurl.com\/blog\/wp-json\/wp\/v2\/tags?post=4773"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}