links
GET
https://linkyhub.net/api/v3 /links Scope links:readShort 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[]requiredHeaders
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Example
{
"error": "string",
"message": "string"
}Schema
errorstringrequiredA stable code to branch on, e.g. insufficient_scope.
messagestringrequiredA sentence to show a person.
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
POST
https://linkyhub.net/api/v3 /links Scope links:writeCreate a short link to a public URL. The slug is generated unless given.
Request body
application/json
destinationstringrequiredslugstringtitlestringutmSourcestringutmMediumstringutmCampaignstringutmTermstringutmContentstringexpiresAtstringAfter 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-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /links
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
DELETE
https://linkyhub.net/api/v3 /links/{linkId} Scope links:writeDelete a short link. Anyone following it afterwards gets a 404.
Parameters
linkIdstringpathrequiredCode 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-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /links
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
PATCH
https://linkyhub.net/api/v3 /links/{linkId} Scope links:writeChange where a short link points, its title, or switch it off.
Parameters
linkIdstringpathrequiredRequest body
application/json
destinationstringtitlestringisActiveboolean{
"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-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
default An error.
Same as default · GET /links
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
Updated