Tiny Rebrand DocsHome

Links Endpoints

Complete reference for managing short links in TinyRebrand

The Links API allows you to create, read, update, and delete short links. All endpoints require authentication and appropriate scopes.

Available Endpoints

Complete CRUD operations for managing your short links:

EndpointMethodPurposeRequired Scope
/user/linkGETList user's linkslinks:read
/user/link/{id}GETGet specific linklinks:read
/user/linkPOSTCreate new linklinks:write
/user/link/{id}PUTUpdate existing linklinks:write
/user/link/{id}DELETEDelete linklinks:write
GET
/user/link/{id}

Get specific link

Get specific link details.

Bearer TokenScopes: links:read

Request

curl -X GET https://api.tinyrebrand.com/api/user/link/507f1f77bcf86cd799439013 \
-H "Authorization: Bearer at_1234567890abcdef"

Response 200

{
"status": 200,
"code": "OK",
"message": "Link fetched successfully",
"data": {
  "id": "507f1f77bcf86cd799439013",
  "title": "Analytics Dashboard",
  "slug": "analytics",
  "url": "https://mysite.com/analytics",
  "description": "Main analytics page",
  "status": true,
  "domainId": "507f1f77bcf86cd799439014",
  "hasPassword": false,
  "createdAt": "2024-01-15T10:30:00.000Z",
  "clicks": 156
}
}
POST
/user/link

Create new link

Create a new link.

Bearer TokenScopes: links:write

Request

curl -X POST https://api.tinyrebrand.com/api/user/link \
-H "Authorization: Bearer at_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
  "status": true,
  "title": "My Product Page",
  "slug": "product",
  "url": "https://mysite.com/product",
  "description": "Main product landing page",
  "domainId": "507f1f77bcf86cd799439014",
  "hasPassword": false
}'

Request Body

Link description - optional

Response 200

{
"status": 200,
"code": "OK",
"message": "Link created successfully",
"data": {
  "id": "507f1f77bcf86cd799439015",
  "title": "My Product Page",
  "slug": "product",
  "url": "https://mysite.com/product",
  "description": "Main product landing page",
  "status": true,
  "domainId": "507f1f77bcf86cd799439014",
  "hasPassword": false,
  "createdAt": "2024-07-02T15:00:00.000Z"
}
}
PUT
/user/link/{id}

Update existing link

Update existing link properties.

Bearer TokenScopes: links:write

Request

curl -X PUT https://api.tinyrebrand.com/api/user/link/507f1f77bcf86cd799439015 \
-H "Authorization: Bearer at_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
  "title": "Updated Title",
  "url": "https://newurl.com"
}'

Request Body

Link description - optional

Response 200

{
"status": 200,
"code": "OK",
"message": "Link updated successfully",
"data": {
  "id": "507f1f77bcf86cd799439015",
  "title": "Updated Title",
  "slug": "product",
  "url": "https://newurl.com",
  "updatedAt": "2024-07-02T15:00:00.000Z"
}
}
DELETE
/user/link/{id}

Delete link

Permanently delete a link.

Bearer TokenScopes: links:write

Request

curl -X DELETE https://api.tinyrebrand.com/api/user/link/507f1f77bcf86cd799439015 \
-H "Authorization: Bearer at_1234567890abcdef"

Response 200

{
"status": 200,
"code": "OK",
"message": "Link deleted successfully",
"data": {
  "deletedAt": "2024-07-02T15:00:00.000Z"
}
}