Rebrandly for Developers

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

Get Started

Listing your scripts

You can access your scripts collection at any time with an HTTP GET on the scripts endpoint https://api.rebrandly.com/v1/scripts.

Beware the script value

When you load a single script via API, we return the script content along with the API response. By contrast, when you ask for your scripts' list via API, we only reference the public URI where you can download the script's content.

Understanding pagination and sortings

We recommend you have deep comprehension about how our API manages Pagination and Sorting.

If you want to get only scripts matching a given set of conditions, you can attach filters to your request:

QUERY PARAMETERS

Parameter name
Type
Constraints
Description

orderBy

string enum

  • name
    default

See Sorting

optional

Sorting criteria to apply to your scripts collection

orderDir

string enum

  • desc
    default
  • asc

See Sorting

optional

Sorting direction to apply to your scripts collection

last

string

See Pagination

optional

The id of the last script you fetched in the last listing API call

limit

integer
default is 25

See Pagination

optional
Strictly positive
Max 25

How many scripts to load

GETting scripts collection

$ curl 'https://api.rebrandly.com/v1/scripts ?orderBy=name&orderDir=asc&limit=100' \
-H 'apikey: YOUR_API_KEY'

JSON response (list of scripts matching filters)

[
 {
  "id": "fffa4cc5b6ee45d6g7897b06ac2d16af",
  "name": "Alert1",
  "uri": "https://s3.amazonaws.com/rb-scripts/user/fffa4cc5b6ee45d6g7897b06ac2d16af"
 },
 {
  "id": "abcdecc5b6ee45d6g7897b06ac2d1xyz",
  "name": "Alert2",
  "uri": "https://s3.amazonaws.com/rb-scripts/user/abcdecc5b6ee45d6g7897b06ac2d1xyz"
 }
 // up to 100 scripts objects sorted by name
]

Handling errors

HTTP Status
Error type
Description

403

Invalid query parameters format. Double check value for property query parameter. Details about validation failure in message field

Listing your scripts


Suggested Edits are limited on API Reference Pages

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