Tiny Rebrand DocsHome

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:

EndpointMethodPurposeRequired Scope
/user/domainGETList user's domainsdomains:read
/user/domainPOSTAdd a new domaindomains:write
/user/domain/{id}/verifyPOSTVerify domain ownershipdomains:write
GET
/user/domain

List user's domains

List user's domains with pagination and filtering.

Bearer TokenScopes: domains:read

Request

curl -X GET "https://api.tinyrebrand.com/api/user/domain?q=company&start=0&limit=10" \
-H "Authorization: Bearer at_1234567890abcdef"

Query Parameters

NameTypeDescription
qstringSearch query
startintegerOffset for pagination
limitintegerNumber 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/domain

Add new domain

Add a new domain.

Bearer TokenScopes: 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"
}'

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}/verify

Verify domain ownership

Verify domain ownership.

Bearer TokenScopes: domains:write

Request

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"
}
}