Create a short link
destination you send.
Request body
destination(required): URL to shorten.trackingid(optional): Explicit affiliate tracking value. For Amazon links, this always overrides any existingtagquery parameter on the destination.require_choices(optional): Whentrue, the API returns409 choice_requiredinstead of using the default override behavior for supported conflicts.choices(optional): Map of choice ids to selected option ids. Use this when your integration already knows how it wants to resolve a conflict.sub_id2andsub_id3(optional): Impact SubID values. These are applied only when the final destination is an Impact affiliate URL. Omit a field to preserve an existing value, or send an empty string to clear it.
Default behavior
When you do not sendrequire_choices: true, the API resolves supported conflicts automatically:
- The API starts with the
destinationyou send. - If that destination is already an Impact affiliate link for a supported retailer, and your Joylink account has synced Impact tracking for that retailer, the API rewrites the link to use your tracking by default.
- If the final destination is an Impact affiliate URL,
sub_id2andsub_id3are applied after the Impact keep or override decision. - For Amazon URLs:
trackingidalways wins and replaces any existingtag.- If
trackingidis omitted, Joylink uses the Amazon tag configured in your Joylink user settings.
- If the product has a Creator Connections campaign available, the API uses that Creator Connections link by default.
- If there is no Creator Connections campaign, but a JL extra commission link is available, the API uses that extra commission link by default.
Choice required
Whenrequire_choices is true, the API returns a 409 response with a reusable choice_required envelope instead of taking the default override path.
The endpoint evaluates conflicts one at a time, in this order:
impact_link_overrideamazon_tag_overridecreator_connections_link_overridejl_extra_commission_link_override
choices, and the API may return another 409 for the next conflict in the sequence.
Supported conflicts:
- An Impact affiliate link that would otherwise be rewritten to use your synced Impact tracking.
- An Amazon link whose existing
tagdiffers from your Joylink user tag whentrackingidis omitted. - A product with an available Creator Connections campaign that would otherwise replace the original destination.
- A product with an available JL extra commission link that would otherwise replace the original destination.
choice_required.options[].url is included when the API can preview the resulting destination ahead of time. Keep options always include it. Override options for Creator Connections and JL extra commission may omit it.
Example Impact conflict:
overridereplaces the existing Impact affiliate link with the affiliate tracking configured on your Joylink account.keeppreserves the original affiliate destination instead of replacing it.
documentation_url field points to this section so an integration can surface a helpful link when it receives the conflict.
Example Amazon conflict:
overridereplaces the existing Amazontagwith your Joylink user tag.keeppreserves the original Amazontagalready present on the destination URL.
overrideuses the Creator Connections link that would normally be applied for this product.keeppreserves the original destination and skips the Creator Connections link rewrite.
overrideuses the JL extra commission link that would normally be applied for this product.keeppreserves the original destination and skips the extra commission link rewrite.
Choose the behavior up front
If your integration already knows how it wants to handle this conflict, send the choice up front in thechoices object.
Example request that uses the default override behavior:
trackingid, preserve the existing Amazon tag with:
409 flow, send:
Authorizations
Body
URL to shorten. This is the starting destination before any affiliate rewrites are applied.
"https://www.amazon.com/dp/B0TEST1234?tag=other-tag-20"
Optional explicit affiliate tracking value. For Amazon links, sending this always overrides any existing tag query parameter on the destination.
"my-tag-20"
When true, the API returns 409 choice_required instead of using the default override behavior for supported conflicts. Conflicts are evaluated one at a time in this order: impact_link_override, amazon_tag_override, creator_connections_link_override, jl_extra_commission_link_override.
false
Optional Impact SubID2 value. Applied only when the final destination is an Impact affiliate URL. Omit to preserve an existing value, or send an empty string to clear it.
"campaign-42"
Optional Impact SubID3 value. Applied only when the final destination is an Impact affiliate URL. Omit to preserve an existing value, or send an empty string to clear it.
"post-99"
Optional map of choice_required ids to selected option ids. Use override to accept Joylink's default rewrite, or keep to preserve the original value or destination for the returned conflict.
Response
Successfully created short link
The generated short URL.
"https://joylink.io/abc123"