Tags Endpoints
Complete reference for managing tags to organize your links
The Tags API allows you to create and manage tags for organizing your short links. All endpoints require authentication and appropriate scopes.
Available Endpoints
Complete list of tag management endpoints and their purposes:
Endpoint | Method | Purpose | Required Scope |
---|---|---|---|
/user/tag | GET | List user's tags | tags:read |
/user/tag | POST | Create a new tag | tags:write |
/user/tag/favorite | GET | List user's favorite tags | tags:read |
GET /user/tag
GET /user/tag
List user's tags with pagination and filtering.
Required Scope: tags:read
Request:
curl -X GET "https://api.tinyrebrand.com/api/user/tag?q=marketing&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": "Tags fetched successfully",
"data": [
{
"id": "507f1f77bcf86cd799439016",
"name": "Marketing",
"isFavorite": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"linkCount": 25
}
],
"meta": {
"total": 1,
"start": 0,
"limit": 10
}
}
POST /user/tag
POST /user/tag
Create a new tag.
Required Scope: tags:write
Request:
curl -X POST https://api.tinyrebrand.com/api/user/tag \
-H "Authorization: Bearer at_1234567890abcdef" \
-H "Content-Type: application/json" \
-d '{
"name": "Marketing",
"isFavorite": true
}'
Parameters:
Parameter | Type | Required | Description |
---|---|---|---|
name | string | ✅ | Tag name |
isFavorite | boolean | ❌ | Mark as favorite tag |
Response:
{
"status": 200,
"code": "OK",
"message": "Tag created successfully",
"data": {
"id": "507f1f77bcf86cd799439016",
"name": "Marketing",
"isFavorite": true,
"createdAt": "2024-07-02T15:00:00.000Z",
"linkCount": 0
}
}
GET /user/tag/favorite
GET /user/tag/favorite
List user's favorite tags.
Required Scope: tags:read
Request:
curl -X GET https://api.tinyrebrand.com/api/user/tag/favorite \
-H "Authorization: Bearer at_1234567890abcdef"
Response:
{
"status": 200,
"code": "OK",
"message": "Tags fetched successfully",
"data": [
{
"id": "507f1f77bcf86cd799439016",
"name": "Marketing",
"isFavorite": true,
"createdAt": "2024-01-15T10:30:00.000Z",
"linkCount": 25
}
]
}