---
title: "Revoke a public link"
description: "Stops a download link from working, for good, including in mail that already went out with it."
url: "https://openemail.uk/docs/api/files/revoke-link"
area: "API"
category: "Mailbox"
---

# Revoke a public link

Stops a download link from working, for good, including in mail that already went out with it.

`DELETE /files/{id}/links/{linkId}`

## DELETE /files/{id}/links/{linkId}

Stops a download link from working, for good, including in mail that already went out with it.

## Example

Needs `files:write`. The answer is the link, with `revokedAt` set.

**curl**

```
curl -X DELETE "$OE/files/file_6bb640f5b99e47deb758f1f5/links/fshr_4d7a0c2e9b16f3584a2c7e90" -H "$AUTH"
```

**Response**

```
{
  "object": "file_link",
  "id": "fshr_4d7a0c2e9b16f3584a2c7e90",
  "fileId": "file_6bb640f5b99e47deb758f1f5",
  "filename": "invoice-0912.pdf",
  "mimeType": "application/pdf",
  "sizeBytes": 184233,
  "host": "files.acme.com",
  "url": "https://files.acme.com/f/8c2e…/invoice-0912.pdf",
  "downloads": 4,
  "lastDownloadAt": "2026-09-24T11:40:52.000Z",
  "revokedAt": "2026-09-24T12:00:03.000Z",
  "createdAt": "2026-09-24T10:02:17.000Z"
}
```

> Revoking a link that is already revoked answers with it unchanged, so the call is safe to repeat. An unknown link is a 404 `not_found`.
