List and search your links

Goal: page through your links, search them, filter by creation date or user, and sort the results.
Prerequisites: an API key (see Authentication).

Steps

1. List with default paging

curl -X POST https://api-sandbox.slimlinkdev.com/api/v1/links/list 
  -H "X-API-Key: <API_KEY>" 
  -H "Content-Type: application/json" 
  -d '{}'

Defaults to page 1, 20 items per page.

2. Search and filter

curl -X POST https://api-sandbox.slimlinkdev.com/api/v1/links/list 
  -H "X-API-Key: <API_KEY>" 
  -H "Content-Type: application/json" 
  -d '{
    "search": "spring-sale",
    "createdAt": { "after": "2026-01-01", "before": "2026-12-31" },
    "page": 1,
    "itemsPerPage": 50,
    "order": { "createdAt": "desc" }
  }'

search matches against title, long URL, path, and ID. order accepts exactly one of createdAt, expiredAt, or title, each asc or desc.

Expected response:

{
  "data": {
    "items": [ { "id": "...", "path": "spring-sale", "...": "..." } ],
    "total": 1
  },
  "error_code": null,
  "message": "Request successful"
}

Verify

Confirm total matches the expected count for your filters, and that every item in items matches your search/date filters.

Common failures

Symptom Cause Fix
401 Unauthorized Missing or invalid API key Confirm you’re sending X-API-Key.
Empty items unexpectedly Date filter or search term too narrow Widen createdAt.after/before or drop search to confirm the link exists.
Sort has no effect More than one key set in order order accepts at most one property at a time.