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 nameTypeConstraintsDescription

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 StatusError typeDescription
403403 - Invalid formatInvalid query parameters format. Double check value for property query parameter. Details about validation failure in message field

Did this page help you?
// Bulk plan CTA banner: requested by Alison to promote the high-volume pricing plan. Injected in Footer HTML per ReadMe convention, but renderd at the top of the viewport via the fixed-position CSS above.
Sending 250K+ links a year? You qualify for a better rate. See high-volume pricing