POST /pub_api/v3/links/monetize write:links
▶  Run in console
Request body
urlrequired
string
Merchant URL to convert into an affiliate link.
titlerequired
string
Product or content title.
descriptionoptional
string
Product description. Also rewritten when AI is enabled.
rewrite_using_aioptional
boolean
Set to true to rewrite title and description as engaging marketing copy using AI. Default: false.
channel_idoptional
integer
Channel to attribute the click to.
shortenoptional
boolean
Pass true for a clnk.in short link.
subid – subid5optional
string
Affiliate sub IDs for attribution tracking.
Response fields
FieldTypeDescription
data.titlestringOriginal or AI-rewritten title.
data.original_titlestringThe title you submitted.
data.descriptionstringOriginal or AI-rewritten description. Omitted from the response when absent (never returned as null).
data.tracking_urlstringAffiliate tracking URL.
data.short_urlstringShortened link (only when shorten=true).
data.affiliatedbooleantrue if the link will earn commission.
data.original_urlstringThe merchant URL you submitted.
data.campaignobject | nullMatched campaign id and name.
data.ai_rewrittenbooleanWhether AI rewriting was applied. false on AI failure or when not requested.
Request (with AI)
curl -X POST https://developers.cuelinks.com/pub_api/v3/links/monetize \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "url": "https://www.flipkart.com/iphone-16",
    "title": "Apple iPhone 16 128GB Black",
    "description": "Latest iPhone with A18 chip",
    "rewrite_using_ai": true
  }'
200 OK200
{
  "data": {
    "title": "The iPhone 16 You've Been Waiting For",
    "original_title": "Apple iPhone 16 128GB Black",
    "description": "Powered by the A18 chip — the fastest iPhone yet",
    "tracking_url": "https://linksredirect.com/?cid=456&source=api&url=...",
    "affiliated": true,
    "original_url": "https://www.flipkart.com/iphone-16",
    "campaign": {
      "id": 101,
      "name": "Flipkart"
    },
    "ai_rewritten": true
  }
}
Request (without AI)
curl -X POST https://developers.cuelinks.com/pub_api/v3/links/monetize \
  -H "Authorization: Token YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"url": "https://www.flipkart.com/iphone", "title": "iPhone 16"}'
🤖
AI rewriting is optional and graceful
When rewrite_using_ai is true, the title is rewritten by AI as engaging marketing copy. If the AI service is unavailable, the original title is returned with ai_rewritten: false — the request never fails due to AI. Results are cached for 7 days.