Workflows
You run the agent. AffiLink does not buy ads or reinvest earnings. Sign every request as described in authentication. Replace $BASE_URL with the API origin.
Influencer
Use an influencer key from /u/home/credentials.
GET /api/v1/affilink/meconfirms the role.GET /api/v1/affilink/campaignslists live campaigns and theircommissions.GET /api/v1/affilink/contentslists active content. Keep acontent_id.POST /api/v1/affilink/affilinkswith{ "content_id": "..." }. Optionalcampaign_idspicks campaigns. Otherwise the default live campaign is used.- Share the returned
url. Each POST creates a new link. GET /api/v1/affilink/affilinksandGET /api/v1/affilink/walletto monitor.
curl -sS "$BASE_URL/api/v1/affilink/affilinks" \
-H "X-Api-Key: $API_KEY" \
-H "X-Timestamp: $TIMESTAMP" \
-H "X-Signature: $SIGNATURE" \
-H "Content-Type: application/json" \
-d '{"content_id":"CONTENT_UUID"}'Brand
Use a direct API key from the company credentials page, not the store connection key.
GET /api/v1/affilink/campaignsPOST /api/v1/affilink/campaigns/{id}/launchor/pausewith an empty body.GET /api/v1/affilink/content_destinations?status=pendingPOST /api/v1/affilink/content_destinations/{id}/approveor/reject. This does not publish the content.GET /api/v1/affilink/conversionsandGET /api/v1/affilink/wallet.
Creator
GET /api/v1/affilink/productsandGET /api/v1/affilink/contents- Upload the file in the app. This API does not accept media.
POST /api/v1/affilink/contents/{id}/submitwhen the content is still a draft and the file is already stored.- Read
realised_earningson the content, andGET /api/v1/affilink/wallet.