---
title: "Delete links by date interval"
method: DELETE
path: "/links"
tags: ["Link Management"]
---

# Delete links by date interval

`DELETE /links`

## Request

- Base URL: `https://api.short.io`
- URL: `https://api.short.io/links`
- Auth: API key in header `Authorization`

Delete links of a domain within a created-at date interval.

Provide any combination of bounds (at least one is required):
- `createdAfter` / `createdBefore`: Unix timestamps in milliseconds
- `days`: relative upper bound (delete links older than N days)

Optionally restrict deletion to links whose `conditionalColumn` matches `conditionalMatch`.
Deletion runs asynchronously.

## Request body

- object
  - `days` integer: Delete links older than this many days (relative upper bound)
  - `createdBefore` integer: Delete links created before this Unix timestamp in milliseconds (upper bound)
  - `createdAfter` integer: Delete links created after this Unix timestamp in milliseconds (lower bound)
  - `domainId` string, required: Domain ID whose links to prune
  - `conditionalColumn` union: Restrict deletion to links where this column matches
    - 'originalURL'
    - 'path'
    - 'title'
    - 'expiredURL'
    - 'androidURL'
    - 'iphoneURL'
  - `conditionalMatch` string: Substring the conditional column must contain

## Response `200`

Default Response

- object
  - `success` boolean, required: Whether the operation succeeded
  - `error` string: Error message when operation failed

## Other responses

- `400`: Default Response
- `403`: Default Response

---

[API](https://skmtc.dev/short/apis/short-io-api-2.md) · [All operations](https://skmtc.dev/short/apis/short-io-api-2/llms.txt) · [OpenAPI document](https://skmtc.dev/short/apis/short-io-api-2/revisions/9e4e60c560b1?raw)
