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

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:

ParameterTypeRequiredDescription
qstringSearch query
startintegerOffset for pagination
limitintegerNumber 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:

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