Domains Endpoints
Complete reference for managing custom domains in TinyRebrand
The Domains API allows you to manage custom domains for your short links. All endpoints require authentication and appropriate scopes.
Available Endpoints
Complete list of domain management endpoints and their purposes:
| Endpoint | Method | Purpose | Required Scope |
|---|---|---|---|
/user/domain | GET | List user's domains | domains:read |
/user/domain | POST | Add a new domain | domains:write |
/user/domain/{id}/verify | POST | Verify domain ownership | domains:write |
GET
/user/domainList user's domains
List user's domains with pagination and filtering.
Bearer Token•Scopes:
domains:readRequest
curl -X GET "https://api.tinyrebrand.com/api/user/domain?q=company&start=0&limit=10" \
-H "Authorization: Bearer at_1234567890abcdef"Query Parameters
| Name | Type | Description |
|---|---|---|
q | string | Search query |
start | integer | Offset for pagination |
limit | integer | Number of results to return |
Response 200
{
"status": 200,
"code": "OK",
"message": "Domains found successfully",
"data": [
{
"id": "507f1f77bcf86cd799439014",
"name": "links.mycompany.com",
"isVerified": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"dnsRecord": "CNAME tinyrebrand.com"
}
],
"meta": {
"total": 1,
"start": 0,
"limit": 10
}
}POST
/user/domainAdd new domain
Add a new domain.
Bearer Token•Scopes:
domains:writeRequest
curl -X POST https://api.tinyrebrand.com/api/user/domain \
-H "Authorization: Bearer at_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"name": "links.mycompany.com"
}'Request Body
Response 200
{
"status": 200,
"code": "OK",
"message": "Domain created successfully",
"data": {
"id": "507f1f77bcf86cd799439014",
"name": "links.mycompany.com",
"isVerified": false,
"createdAt": "2024-07-02T15:00:00.000Z",
"dnsRecord": "CNAME tinyrebrand.com"
}
}POST
/user/domain/{id}/verifyVerify domain ownership
Verify domain ownership.
Bearer Token•Scopes:
domains:writeRequest
curl -X POST https://api.tinyrebrand.com/api/user/domain/507f1f77bcf86cd799439014/verify \
-H "Authorization: Bearer at_1234567890abcdef"Response 200
{
"status": 200,
"code": "OK",
"message": "Domain verified successfully",
"data": {
"id": "507f1f77bcf86cd799439014",
"name": "links.mycompany.com",
"isVerified": true,
"verifiedAt": "2024-07-02T15:00:00.000Z"
}
}