blocks
POST
https://linkyhub.net/api/v3 /pages/{pageId}/blocks Scope pages:writeAdd a block to a page, after another block or at the end. Visible as soon as the page is published.
Parameters
pageIdstringpathrequiredRequest body
application/json
typestringrequiredA block type, e.g. LINK, TEXT, PRODUCT.
afterBlockIdstringsettingsobjectChecked against the block type’s schema.
{
"type": "string",
"afterBlockId": "string",
"settings": {}
}Code samples
cURL
curl -X POST "https://linkyhub.net/api/v3/pages/{pageId}/blocks" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"type":"string","afterBlockId":"string","settings":{}}'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.
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.
DELETE
https://linkyhub.net/api/v3 /blocks/{blockId} Scope pages:writeRemove a block. A product block takes its product with it.
Parameters
blockIdstringpathrequiredCode samples
cURL
curl -X DELETE "https://linkyhub.net/api/v3/blocks/{blockId}" \
-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 · POST /pages/{pageId}/blocks
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 /blocks/{blockId} Scope pages:writeChange a block’s settings, hide or show it, or schedule when it is visible.
Parameters
blockIdstringpathrequiredRequest body
application/json
settingsobjectThe full settings; checked against the block type’s schema.
hiddenbooleanvisibleFromstringvisibleUntilstring{
"settings": {},
"hidden": true,
"visibleFrom": "2024-01-01T00:00:00Z",
"visibleUntil": "2024-01-01T00:00:00Z"
}Code samples
cURL
curl -X PATCH "https://linkyhub.net/api/v3/blocks/{blockId}" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"settings":{},"hidden":true,"visibleFrom":"2024-01-01T00:00:00Z","visibleUntil":"2024-01-01T00:00:00Z"}'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 · POST /pages/{pageId}/blocks
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 /blocks/{blockId}/move Scope pages:writeMove a block between two others. Positions are computed here; never send one.
Parameters
blockIdstringpathrequiredRequest body
application/json
beforeIdstringThe block that should come before it (null: first).
afterIdstringThe block that should come after it (null: last).
{
"beforeId": "string",
"afterId": "string"
}Code samples
cURL
curl -X POST "https://linkyhub.net/api/v3/blocks/{blockId}/move" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"beforeId":"string","afterId":"string"}'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 · POST /pages/{pageId}/blocks
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 /blocks/{blockId}/duplicate Scope pages:writeCopy a block, placing the copy straight after it.
Parameters
blockIdstringpathrequiredCode samples
cURL
curl -X POST "https://linkyhub.net/api/v3/blocks/{blockId}/duplicate" \
-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 · POST /pages/{pageId}/blocks
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
PUT
https://linkyhub.net/api/v3 /blocks/{blockId}/audience Scope pages:writeShow a block only to some countries or devices. Empty lists show it to everyone.
Parameters
blockIdstringpathrequiredRequest body
application/json
countriesstring[]requiredISO 3166 two-letter codes.
devicesstring[]required{
"countries": [
"string"
],
"devices": [
"mobile"
]
}Code samples
cURL
curl -X PUT "https://linkyhub.net/api/v3/blocks/{blockId}/audience" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"countries":["string"],"devices":["mobile"]}'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 · POST /pages/{pageId}/blocks
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
PUT
https://linkyhub.net/api/v3 /blocks/{blockId}/password Scope pages:writePut a password on a link block, or null to remove it.
Parameters
blockIdstringpathrequiredRequest body
application/json
passwordstringrequired{
"password": "string"
}Code samples
cURL
curl -X PUT "https://linkyhub.net/api/v3/blocks/{blockId}/password" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"password":"string"}'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 · POST /pages/{pageId}/blocks
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 /blocks/{blockId}/chat Scope pages:writeTurn on a CHAT block by setting up the creator’s live chat. Replies are read in the Linky Hub dashboard.
Parameters
blockIdstringpathrequiredCode samples
cURL
curl -X POST "https://linkyhub.net/api/v3/blocks/{blockId}/chat" \
-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 · POST /pages/{pageId}/blocks
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
Updated