---
updatedAt: 2025-11-05T21:11:54.000Z
agentTools:
  projectIndex: https://developers.short.io/llms.txt
---

# Archiving a short URL

An archived short link is only hidden from the Dashboard, yet it remains accessible and functions as intended

## To archive an existing short link

1. [Create a secret API key ](https://developers.short.io/docs/creating-an-api-key)from the **Integrations and API** menu: <https://app.short.io/settings/integrations/api-key>
2. Get the ID of the short link which you want to archive:

* In the **Short.io** Dashboard open the link for editing:

<Image align="center" src="https://files.readme.io/35cc762edd4ff806bcf6f038f14a31a0964757466be4ca20ad4618c901c0ce99-Screenshot_from_2025-04-30_11-57-26.png" />

* Copy the link ID from your browser's address bar:

<Image align="center" src="https://files.readme.io/96d2c075bb77f00641a133e8d977cab4e309aad64abc5b408dad28ba00be5b12-Screenshot_from_2025-04-30_11-58-55.png" />

3. Then you may need to install **prerequisites for HTTP requests** (if necessary, depending on your programming language and its version).
4. Use the following code snippets to archive a short URL:

> 📘
>
> Please replace **LINK_ID** and **{user.apiKey}** with the appropriate values.

```php

$curl = curl_init();

curl_setopt_array($curl, [
  CURLOPT_URL => "https://api.short.io/links/archive",
  CURLOPT_RETURNTRANSFER => true,
  CURLOPT_ENCODING => "",
  CURLOPT_MAXREDIRS => 10,
  CURLOPT_TIMEOUT => 30,
  CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
  CURLOPT_CUSTOMREQUEST => "POST",
  CURLOPT_POSTFIELDS => json_encode([
    'link_id' => 'LINK_ID'
  ]),
  CURLOPT_HTTPHEADER => [
    "Authorization: <<apiKey>>",
    "accept: application/json",
    "content-type: application/json"
  ],
]);

$response = curl_exec($curl);
$err = curl_error($curl);

curl_close($curl);

if ($err) {
  echo "cURL Error #:" . $err;
} else {
  echo $response;
}
```
```python
import requests

url = "https://api.short.io/links/archive"

payload = { "link_id": "LINK_ID" }
headers = {
    "accept": "application/json",
    "content-type": "application/json",
    "Authorization": "<<apiKey>>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```
```node Node.js
const url = 'https://api.short.io/links/archive';
const options = {
  method: 'POST',
  headers: {
    accept: 'application/json',
    'content-type': 'application/json',
    Authorization: '<<apiKey>>'
  },
  body: JSON.stringify({link_id: 'LINK_ID'})
};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```
```java
HttpRequest request = HttpRequest.newBuilder()
    .uri(URI.create("https://api.short.io/links/archive"))
    .header("accept", "application/json")
    .header("content-type", "application/json")
    .header("Authorization", "<<apiKey>>")
    .method("POST", HttpRequest.BodyPublishers.ofString("{\"link_id\":\"LINK_ID\"}"))
    .build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());
```
```csharp
using System.Net.Http.Headers;
var client = new HttpClient();
var request = new HttpRequestMessage
{
    Method = HttpMethod.Post,
    RequestUri = new Uri("https://api.short.io/links/archive"),
    Headers =
    {
        { "accept", "application/json" },
        { "Authorization", "<<apiKey>>" },
    },
    Content = new StringContent("{\"link_id\":\"LINK_ID\"}")
    {
        Headers =
        {
            ContentType = new MediaTypeHeaderValue("application/json")
        }
    }
};
using (var response = await client.SendAsync(request))
{
    response.EnsureSuccessStatusCode();
    var body = await response.Content.ReadAsStringAsync();
    Console.WriteLine(body);
}
```

5. The JSON response should be **"success":  true**:

```json
{
  "success":true
}
```

You have successfully archived a short link through our API.

The link is no longer visible from the **Branded links** panel. You can find it by using the filters and setting the **Search query** to **archived:true** :

<Image align="center" width="0px" src="https://files.readme.io/cafa8e653f8c99ccd519e1c85c075d3cad1626024da3fb78fb636b748b890215-Screenshot_from_2025-05-05_12-38-59.png" />

<Image align="left" width="60% " src="https://files.readme.io/4a479eb9926108edac1cfe1eed2d5bfd66f23ae844fe559a38794e511dd7f647-Screenshot_from_2025-05-05_12-41-02.png" />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

<br />

And if you wish to archive several short links at the same time, please refer to the following webpage for more information: <https://developers.short.io/reference/post_links-archive-bulk>