Rebrandly for Developers

Use our API to create, track and share custom short links that incorporate your brand domain name.

Get Started

Attaching a script

You can attach a Script object to a Link object.
When someone clicks on the link, during the redirection process the script will be executed on his/her browser.


Check compatibility first

Double check whether your API key or OAuth token is enabled to use the Scripts feature.
For every account, you can check for features and limits with a preliminary API call.

In order to attach a Script to a Link, you must first create both the resources and get their unique identifiers. Once you have them, you can perform a POST API call (without body) to the association endpoint, which is composed as follow:, where sid is the Link resource's id property and sid is the Script resource's id property.

Path parameters

Path parameter



Unique identifier of the branded short link you want the script to be attached to


Unique identifier of the script you want to attach to the link

Attaching a Scripts to a Link

$ curl '' \
-H 'apikey: YOUR_API_KEY' \
-H 'Content-Type: application/json'

HTTP/1.1 200 OK

Updated about a year ago

Attaching a script

Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.