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/domain
GET /user/domain
List user's domains with pagination and filtering.
Required Scope: domains:read
Request:
curl -X GET "https://api.tinyrebrand.com/api/user/domain?q=company&start=0&limit=10" \
-H "Authorization: Bearer at_1234567890abcdef"
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
q | string | ❌ | Search query |
start | integer | ❌ | Offset for pagination |
limit | integer | ❌ | Number of results to return |
Response:
{
"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/domain
POST /user/domain
Add a new domain.
Required Scope: domains:write
Request:
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"
}'
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
name | string | ✅ | Domain name |
Response:
{
"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}/verify
POST /user/domain/{id}/verify
Verify domain ownership.
Required Scope: domains:write
Request:
curl -X POST https://api.tinyrebrand.com/api/user/domain/507f1f77bcf86cd799439014/verify \
-H "Authorization: Bearer at_1234567890abcdef"
Response:
{
"status": 200,
"code": "OK",
"message": "Domain verified successfully",
"data": {
"id": "507f1f77bcf86cd799439014",
"name": "links.mycompany.com",
"isVerified": true,
"verifiedAt": "2024-07-02T15:00:00.000Z"
}
}