links

Embed
Preview of the card
<a href="https://linkyhub.net/docs/ref-links"><img src="https://linkyhub.net/docs/_api/public/orgs/2fd2a4b7-b627-4925-af1e-1c51bf890403/spaces/c4b920fb-a433-40b5-b354-ff84bf0c3eb1/pages/214441ad-eb2b-46e2-93b4-6154fa329293/social-card.svg?v=3e7ae33eec8b" alt="links" width="600" height="315"></a>
GEThttps://linkyhub.net/api/v3/linksScope links:read

Short links with click counts, and how many the plan allows.

Code samples

cURL
curl -X GET "https://linkyhub.net/api/v3/links" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
Example
{
  "data": [
    {}
  ]
}
Schema
dataobject[]required
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.
Example
{
  "error": "string",
  "message": "string"
}
Schema
errorstringrequired
A stable code to branch on, e.g. insufficient_scope.
messagestringrequired
A sentence to show a person.
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
POSThttps://linkyhub.net/api/v3/linksScope links:write

Create a short link to a public URL. The slug is generated unless given.

Request body

application/json
destinationstringrequired
slugstring
titlestring
utmSourcestring
utmMediumstring
utmCampaignstring
utmTermstring
utmContentstring
expiresAtstring
After this the link stops redirecting.
{
  "destination": "string",
  "slug": "string",
  "title": "string",
  "utmSource": "string",
  "utmMedium": "string",
  "utmCampaign": "string",
  "utmTerm": "string",
  "utmContent": "string",
  "expiresAt": "2024-01-01T00:00:00Z"
}

Code samples

cURL
curl -X POST "https://linkyhub.net/api/v3/links" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destination":"string","slug":"string","title":"string","utmSource":"string","utmMedium":"string","utmCampaign":"string","utmTerm":"string","utmContent":"string","expiresAt":"2024-01-01T00:00:00Z"}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

201 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /links

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
DELETEhttps://linkyhub.net/api/v3/links/{linkId}Scope links:write

Delete a short link. Anyone following it afterwards gets a 404.

Parameters

linkIdstringpathrequired

Code samples

cURL
curl -X DELETE "https://linkyhub.net/api/v3/links/{linkId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY"
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /links

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
PATCHhttps://linkyhub.net/api/v3/links/{linkId}Scope links:write

Change where a short link points, its title, or switch it off.

Parameters

linkIdstringpathrequired

Request body

application/json
destinationstring
titlestring
isActiveboolean
{
  "destination": "string",
  "title": "string",
  "isActive": true
}

Code samples

cURL
curl -X PATCH "https://linkyhub.net/api/v3/links/{linkId}" \
  -H "Authorization: Bearer $LINKYHUB_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"destination":"string","title":"string","isActive":true}'
TypeScript
Python
Go
PHP
Ruby
Java

Responses

200 Done.
{}
Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
default An error.

Same as default · GET /links

Headers
RateLimit-Limitinteger
Requests allowed in the current window.
RateLimit-Remaininginteger
Requests left in the current window.
RateLimit-Resetinteger
Seconds until the window resets.
Updated