Links
Generated from LinkSnap's own code: every route in this area, what it takes and how to call it.
List links
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>"
Create link
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 link
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 link by ID or slug
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>"
Update link
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 link stats
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}'
Export links - MUST be before /:id to avoid matching 'export' as an ID
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>"
Import links (JSON body)
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}'