Language

Links

Generated from LinkSnap's own code: every route in this area, what it takes and how to call it.

Method Path What it does
GET /api/v1/links List links
POST /api/v1/links Create link
DELETE /api/v1/links/{id} Delete link
GET /api/v1/links/{id} Get link by ID or slug
PATCH /api/v1/links/{id} Update link
GET /api/v1/links/{id}/stats List stats
GET /api/v1/links/{id}/stats/export Get link stats
POST /api/v1/links/bulk Bulk operations
GET /api/v1/links/export Export links - MUST be before /:id to avoid matching 'export' as an ID
POST /api/v1/links/import Import links (JSON body)
GET /api/v1/links

Query parameters

Name Type Required Notes
cursor any no
limit any no
order any no
q any no
sort any no
status any no
tag any no

Example

curl -X GET "https://linksnap.forjio.com/api/v1/links" \
  -H "Authorization: ApiKey lsk_live_<your API key>"
POST /api/v1/links

Body

Field Type Required Notes
expiresAt any no
maxClicks any no
slug any no
tags any no
url any no

Example

curl -X POST "https://linksnap.forjio.com/api/v1/links" \
  -H "Authorization: ApiKey lsk_live_<your API key>" \
  -H "Content-Type: application/json" \
  -d '{"expiresAt":null,"maxClicks":null,"slug":null,"tags":null,"url":null}'
DELETE /api/v1/links/{id}

Path parameters

Name Type Required Notes
id string yes

Example

curl -X DELETE "https://linksnap.forjio.com/api/v1/links/:id" \
  -H "Authorization: ApiKey lsk_live_<your API key>"
GET /api/v1/links/{id}

Path parameters

Name Type Required Notes
id string yes

Example

curl -X GET "https://linksnap.forjio.com/api/v1/links/:id" \
  -H "Authorization: ApiKey lsk_live_<your API key>"
PATCH /api/v1/links/{id}

Path parameters

Name Type Required Notes
id string yes

Body

Field Type Required Notes
expiresAt any no
maxClicks any no
slug any no
status any no
tags any no
url any no

Example

curl -X PATCH "https://linksnap.forjio.com/api/v1/links/:id" \
  -H "Authorization: ApiKey lsk_live_<your API key>" \
  -H "Content-Type: application/json" \
  -d '{"expiresAt":null,"maxClicks":null,"slug":null,"status":null,"tags":null,"url":null}'

List stats

GET /api/v1/links/{id}/stats

Path parameters

Name Type Required Notes
id string yes

Query parameters

Name Type Required Notes
from any no
to any no

Example

curl -X GET "https://linksnap.forjio.com/api/v1/links/:id/stats" \
  -H "Authorization: ApiKey lsk_live_<your API key>"
GET /api/v1/links/{id}/stats/export

Path parameters

Name Type Required Notes
id string yes

Query parameters

Name Type Required Notes
format any no
from any no
to any no

Example

curl -X GET "https://linksnap.forjio.com/api/v1/links/:id/stats/export" \
  -H "Authorization: ApiKey lsk_live_<your API key>"

Bulk operations

POST /api/v1/links/bulk

Body

Field Type Required Notes
action any no
ids any no
tag any no

Example

curl -X POST "https://linksnap.forjio.com/api/v1/links/bulk" \
  -H "Authorization: ApiKey lsk_live_<your API key>" \
  -H "Content-Type: application/json" \
  -d '{"action":null,"ids":null,"tag":null}'
GET /api/v1/links/export

Query parameters

Name Type Required Notes
format any no

Example

curl -X GET "https://linksnap.forjio.com/api/v1/links/export" \
  -H "Authorization: ApiKey lsk_live_<your API key>"
POST /api/v1/links/import

Body

Field Type Required Notes
dryRun any no
links any no

Example

curl -X POST "https://linksnap.forjio.com/api/v1/links/import" \
  -H "Authorization: ApiKey lsk_live_<your API key>" \
  -H "Content-Type: application/json" \
  -d '{"dryRun":null,"links":null}'
Language