Listing your domains
You can access your branded domains collection at any time with an HTTP GET
on the branded domains endpoint https://api.rebrandly.com/v1/domains
.
We recommend you have deep comprehension about how our API manages Pagination and Sorting.
If you want to get only branded domains matching a given set of conditions, you can attach filters to your request:
QUERY PARAMETERS
Parameter name | Type | Constraints | Description |
---|---|---|---|
orderBy | string enum - createdAt default - updatedAt - fullName See Sorting | optional | Sorting criteria to apply to your branded domains collection |
orderDir | string enum - desc default - asc See Sorting | optional | Sorting direction to apply to your branded domains collection |
last | string See Pagination | optional | The id of the last domain you fetched in the last listing API call |
limit | integer default is 25 See Pagination | optional Strictly positive Max 25 | How many branded domains to load |
active | boolean | optional | Filter branded domains depending on whether they can be used to brand short links or not |
type | string enum - user - service | optional | Filter branded domains depending on their type (owned by user or service domains like rebrand.ly) |
GETting branded domains collection
$ curl 'https://api.rebrandly.com/v1/domains?orderBy=createdAt&orderDir=desc&limit=100&active=true&type=user' \
-H 'apikey: YOUR_API_KEY'
JSON response (list of domains matching filters)
[
{
"id": "4d20ec31db1e48c5aded19e93f137a11",
"fullName": "brand.cool",
"topLevelDomain": "cool",
"createdAt": "2016-07-01T13:12:22.000Z",
"updatedAt": "2016-07-03T13:17:50.000Z",
"type": "user",
"active": false
},
// up to 100 active user branded domains
]
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