---
title: "Delete links"
method: DELETE
path: "/api/v1/workspace/{workspace_id}/links"
tags: ["Links"]
---

# Delete links

`DELETE /api/v1/workspace/{workspace_id}/links`

## Request

- Base URL: `https://api.linklyhq.com`
- URL: `https://api.linklyhq.com/api/v1/workspace/{workspace_id}/links`
- Auth: API key in query parameter `api_key`
- TypeScript: <https://skmtc.dev/linklyhq/apis/linkly-url-shortener-api/docs/api/v1/workspace/:workspace_id/links/delete.ts> (a function with typed inputs; its response is checked against the schema)

Delete one or more links by their IDs. Deleted links are moved to the workspace's trash and can be restored with restoreLinks.

## Path parameters

- `workspace_id` string, required

## Request body

- object: Delete body to delete links
  - `ids` integer[]

## Response `200`

LinksDeleted

- string

## Other responses

- `403`: Forbidden
- `404`: Error

---

[API](https://skmtc.dev/linklyhq/apis/linkly-url-shortener-api.md) - [All operations](https://skmtc.dev/linklyhq/apis/linkly-url-shortener-api/llms.txt) - [OpenAPI document](https://skmtc.dev/linklyhq/apis/linkly-url-shortener-api/revisions/968598ef7055?raw)
