Tiny Rebrand DocsHome

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:
EndpointMethodPurposeRequired Scope
/user/tagGETList user's tagstags:read
/user/tagPOSTCreate a new tagtags:write
/user/tag/favoriteGETList user's favorite tagstags: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:

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

ParameterTypeRequiredDescription
namestringTag name
isFavoritebooleanMark 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
    }
  ]
}