> ## Content Index
> Fetch the complete content index at: https://logbuch-dev-blog.nichedthemes.com/llms.txt
> Use this file to discover other available public pages before exploring further.

# v1.4.0: Links that expire
- URL: https://logbuch-dev-blog.nichedthemes.com/v1-4-0-links-that-expire/
- Published: 2026-10-30T18:00:00.000Z
- Updated: 2026-10-30T18:00:00.000Z
- Description: Links can expire after a date or a number of clicks, and the API answers 410 for them. The link list now comes wrapped in an object.
- Author: Mira Okafor
- Tags: stummel, Backend, #changelog, #Import 2026-11-19 07:37

A link can carry `expires_at` or `max_clicks` now, and stummel answers `410 Gone` once either is reached. Half the links people asked me to delete were for events that were over.

⚠️

`GET /api/links` returns `{ "links": [...], "next": "..." }` instead of a bare array, so the list can page. Update your client before you upgrade.

## Added

- `expires_at` and `max_clicks` on a link, in the API and the form.
- Expired links answer `410 Gone` with a short page instead of `404`.
- Paging for `GET /api/links` with `next`.

## Changed

- Breaking: `GET /api/links` wraps the list in `links`.
- Codes are five characters for new links; old codes keep working.

## Fixed

- The click counter counted bots that only fetched the preview.

```diff-ts
-const links: Link[] = await res.json();
+const { links, next } = await res.json() as { links: Link[]; next?: string };
```