Listing your tags

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

đŸ“˜

Understanding pagination and sortings

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

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

QUERY PARAMETERS

Parameter nameTypeConstraintsDescription
orderBystring enum

- name
_default_See Sorting
optionalSorting criteria to apply to your tags collection
orderDirstring enum

- desc
default
- ascSee Sorting
optionalSorting direction to apply to your tags collection
laststring

See Pagination
optionalThe id of the last tag you fetched in the last listing API call
limitinteger
default is 25

See Pagination
optional
Strictly positive
Max 25
How many tags to load
GETting tags collection
$ curl 'https://api.rebrandly.com/v1/tags?orderBy=name&orderDir=asc&limit=100' \
-H 'apikey: YOUR_API_KEY'
JSON response (list of tags matching filters)
[
 {
  "id": "fffa4cc5b6ee45d6g7897b06ac2d16af",
  "name": "promo",
  "color": "FF9944"
 },
 {
  "id": "abcdecc5b6ee45d6g7897b06ac2d1xyz",
  "name": "tracked",
  "color": "55223D"
 }
 // up to 100 tag objects sorted by name asc
]

Handling errors

HTTP StatusError typeDescription
403403 - Invalid formatInvalid query parameters format. Double check value for property query parameter. Details about validation failure in message field