affiliates
GET
https://linkyhub.net/api/v3 /affiliates Scope affiliates:readPeople promoting the creator, their sales and what they are owed.
Code samples
cURL
curl -X GET "https://linkyhub.net/api/v3/affiliates" \
-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.
PATCH
https://linkyhub.net/api/v3 /affiliates/{affiliateId} Scope affiliates:writeApprove, reject or suspend an affiliate.
Parameters
affiliateIdstringpathrequiredRequest body
application/json
statusstringrequired{
"status": "APPROVED"
}Code samples
cURL
curl -X PATCH "https://linkyhub.net/api/v3/affiliates/{affiliateId}" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"status":"APPROVED"}'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 /affiliates
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 /affiliates/{affiliateId}/mark-paid Scope affiliates:writeRecord that what an affiliate is owed has been paid. A bookkeeping mark; no money moves.
Parameters
affiliateIdstringpathrequiredCode samples
cURL
curl -X POST "https://linkyhub.net/api/v3/affiliates/{affiliateId}/mark-paid" \
-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 /affiliates
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
GET
https://linkyhub.net/api/v3 /affiliates/program Scope affiliates:readThe creator’s affiliate programme terms, or null if they have never run one.
Code samples
cURL
curl -X GET "https://linkyhub.net/api/v3/affiliates/program" \
-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 /affiliates
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 /affiliates/program Scope affiliates:writeStart, change or pause the affiliate programme. Past sales keep the rate they earned at.
Request body
application/json
commissionPercentintegerrequiredcookieDaysintegerrequiredHow long a click keeps counting.
requiresApprovalbooleanrequiredApprove each affiliate yourself, rather than anyone who applies.
termsstringisActivebooleanrequired{
"commissionPercent": 0,
"cookieDays": 0,
"requiresApproval": true,
"terms": "string",
"isActive": true
}Code samples
cURL
curl -X PUT "https://linkyhub.net/api/v3/affiliates/program" \
-H "Authorization: Bearer $LINKYHUB_API_KEY" \
-H "Content-Type: application/json" \
-d '{"commissionPercent":0,"cookieDays":0,"requiresApproval":true,"terms":"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 /affiliates
Headers
RateLimit-LimitintegerRequests allowed in the current window.
RateLimit-RemainingintegerRequests left in the current window.
RateLimit-ResetintegerSeconds until the window resets.
Updated