Counting your domains
Your branded domains collection size can be read with a HTTP GET
on the count domains endpoint https://api.rebrandly.com/v1/domains/count
.
If you want to get the number of branded domains matching a given set of conditions (e.g. answering how many active branded domains are in my account?), you can attach filters to your request:
QUERY PARAMETERS
Parameter name | Type | Constraints | Description |
---|---|---|---|
active | boolean | optional | Filter branded domains depending on whether they can be used to branded short links or not |
type | string enum - user - service | optional | Filter branded domains depending on their type (own by user or service domains like rebrand.ly) |
GETting domains collection size
$ curl 'https://api.rebrandly.com/v1/domains/count?active=true&type=user' \
-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 |
Updated 7 months ago