Counting your links
Your branded short links collection size can be read with a HTTP GET
on the count links endpoint https://api.rebrandly.com/v1/links/count
.
If you want to get the number of branded short links matching a given set of conditions (e.g. answering how many branded short links have been created with the domain brand.cool?), you can attach filters to your request:
QUERY PARAMETERS
Parameter name | Type | Constraints | Description |
---|---|---|---|
favourite | boolean | optional | Filter branded short links depnding on the favourite (loved) property |
domain.id | string | optional | Filter branded short links which refer to a specific branded domain id |
GETting filtered links collection size
$ curl 'https://api.rebrandly.com/v1/links/count?favourite=false&status=active&domain.id=8f104cc5b6ee4a4ba7897b06ac2ddcfb' \
-H 'apikey: YOUR_API_KEY'
A numeric value is provided back:
{
"count": 42
}
Handling errors
HTTP Status | Error type | Description |
---|---|---|
403 | 403 - Invalid format | Invalid query parameters format. Double check value for property query parameter. Details about validation failure in message field. |
404 | 404 - Not found with property value "domain.id" | Given domain.id does not correspond to any existing domain |
Updated 7 months ago