Getting link details

Each Link object has its own URL: https://api.rebrandly.com/v1/links/{id}, where {id} is the unique identifier of the branded short link.
To get Link object details, you should HTTP GET on the specific links endpoint, and a JSON object representing the link will be returned.

If you don't know a link's id, but you still know in which workspace it was created (if you have one single workspace, don't worry about), you can fetch it by getting the Listing of links filtered by domain.fullName (which is the FQDN of the domain) and by slashtag of the link.

E.g. if you are searching for link https://rebrand.ly/abc, you can filter the list by domain.fullName=rebrand.ly and slashtag=abc.

When you specify a domain fullName (if you have the domain id, you can use domain.id instead) and a slashtag, the resulting list will contain exactly one link as no two links can share the same domain name and slashtag.

Please mind that it is not allowed to filter the list of links by the slashtag only: the only case when slashtag input is considered is when you also specify a domain.id parameter or a domain.fullName in your request.

PATH PARAMETERS

Path parameterDescription
idUnique identifier of the branded short link you want to get details for
GETting link details
$ curl 'https://api.rebrandly.com/v1/links/FFfa4cc5b6ee45d6g7897b06ac2d16af' \
-H 'apikey: YOUR_API_KEY'
JSON Response (link details)
{
  "id": "fffa4cc5b6ee45d6g7897b06ac2d16af",
  "title": "What is Rebrandly",
  "slashtag": "video",
  "destination": "https://www.youtube.com/watch?v=3VmtibKpmXI",
  "createdAt": "2016-07-13T10:54:12.000Z",
  "updatedAt": "2016-07-13T10:54:12.000Z",
  "shortUrl": "rebrand.ly/video",
  "domain": {
    "id": "8f104cc5b6ee4a4ba7897b06ac2ddcfb",
    "ref": "/domains/8f104cc5b6ee4a4ba7897b06ac2ddcfb",
    "fullName": "rebrand.ly"
  },
  "status": "active"
}

Handling errors

HTTP StatusError typeDescription
404404 - Not foundGiven id does not correspond to any existing link