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:
| Endpoint | Method | Purpose | Required Scope |
|---|---|---|---|
/user/link | GET | List user's links | links:read |
/user/link/{id} | GET | Get specific link | links:read |
/user/link | POST | Create new link | links:write |
/user/link/{id} | PUT | Update existing link | links:write |
/user/link/{id} | DELETE | Delete link | links:write |
GET
/user/linkList user's links
List user's links with pagination and filtering.
Bearer Token•Scopes:
links:readRequest
curl -X GET "https://api.tinyrebrand.com/api/user/link?q=analytics&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": "Links fetched successfully",
"data": [
{
"id": "507f1f77bcf86cd799439013",
"title": "Analytics Dashboard",
"slug": "analytics",
"url": "https://mysite.com/analytics",
"status": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"clicks": 156
}
],
"meta": {
"total": 1,
"start": 0,
"limit": 10
}
}GET
/user/link/{id}Get specific link
Get specific link details.
Bearer Token•Scopes:
links:readRequest
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/linkCreate new link
Create a new link.
Bearer Token•Scopes:
links:writeRequest
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 Token•Scopes:
links:writeRequest
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 Token•Scopes:
links:writeRequest
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"
}
}