Create LINK
Endpoint: or use your
Method: PUT
Authentication: key = Write key found in API settings (required)

Parameters (JSON):
- long = The long URL to shorten. (required)
Long URL can also contain UTM Parameters (utm_campaign, utm_source, utm_medium), Social Preview (st, sd, si) and other custom URL Parameters (fname, etc)

- redirectType = 301|302|307|iframe|meta (default to 301 if not specified)
- slug = custom path for your Link. (default to random string if not specified)

- meta_refresh_url = Meta refresh URL. (Only for redirectType = meta) (optional)
- meta_refresh_delay = Meta refresh delay. (optional)

- gtmid = Google Tag Manager ID. i.e., GTM-XXXXXXX (Only for redirectType = meta|iframe) (optional)

Callbacks (optional):
Triggered everytime a short URL is visited. Visitor data such as IP, User-Agent, Country, short, long, timestamp, etc, are sent to the callback destination(s).
- callback_webhook = Webhook URL Callback.
- callback_ga = Google Analytics Tracking ID i.e., UA-XXXX-Y
- callback_segment = HTTP Write Key

Response (JSON):
- error - Exists if something went wrong. Will contain error message.

If successful, will return:
- id - The random slug generated, or the slug you speciified in the request.
- short - The short URL.
- dateCreated - The current date the slug created.

Get User Links
Returns an array of user's shortened links.
Method: GET
Authentication: key = Read key found in API Settings. (required)

Parameters (JSON):
- getlinks = 1 (required)

Response (JSON):
An array of JSON objects containing:
- id - The slug
- owner - User ID of the token owner
- long - The long url
- short - The short url
- redirectType - The redirect type. 301|302|307|iframe|meta.
- meta_refresh_url - The meta refresh url. (if set)
- meta_refresh_delay - The meta refresh delay in seconds. (if set)
- callback_webhook - Webhook URL Callback. (if set)
- callback_segment - HTTP Write Key (if set)
- callback_ga - Google Analytics Tracking ID i.e., UA-XXXX-Y (if set)
- gtmid - The GTM ID (if set)
- origin - The origin showing how the link is created.
Was this article helpful?
Thank you!