Overview
Tags provide a flexible way to organize and categorize your trading content. The Tags API allows you to create custom tag groups and tags to label trades, writeups, plans, strategies, report cards, chart books, playbooks, and accounts.
Base URL: /api/v1/tags
Tag Groups
Tag groups are containers that hold related tags. Each tag group can have a custom color and sort order.
List Tag Groups
Retrieves all tag groups with their associated tags.
GET /api/v1/tags
Response:
{
"tagGroups": [
{
"id": "uuid",
"name": "Market Conditions",
"color": "#3B82F6",
"sort_order": 0,
"tags": [
{
"id": "uuid",
"name": "Trending",
"tag_group_id": "uuid",
"sort_order": 0,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
],
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
]
}
Create Tag Group
Creates a new tag group.
POST /api/v1/tags
Content-Type: application/json
{
"type": "tag_group",
"name": "Market Conditions",
"color": "#3B82F6"
}
Response:
{
"tagGroup": {
"id": "uuid",
"name": "Market Conditions",
"color": "#3B82F6",
"sort_order": 0,
"tags": [],
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
}
Update Tag Group
Updates an existing tag group.
PUT /api/v1/tags
Content-Type: application/json
{
"type": "tag_group",
"id": "uuid",
"name": "Market Context",
"color": "#10B981"
}
Delete Tag Group
Deletes a tag group and all its associated tags.
DELETE /api/v1/tags?type=tag_group&id=uuid
Warning: Deleting a tag group will cascade delete all tags within that group and remove tag associations from all content.
Tags
Tags belong to tag groups and can be applied to various content types.
Create Tag
Creates a new tag within a tag group.
POST /api/v1/tags
Content-Type: application/json
{
"type": "tag",
"tag_group_id": "uuid",
"name": "Trending"
}
Response:
{
"tag": {
"id": "uuid",
"name": "Trending",
"tag_group_id": "uuid",
"sort_order": 0,
"created_at": "2024-01-15T10:00:00Z",
"updated_at": "2024-01-15T10:00:00Z"
}
}
Update Tag
Updates a tag's name, sort order, or moves it to a different tag group.
PUT /api/v1/tags
Content-Type: application/json
{
"type": "tag",
"id": "uuid",
"name": "Strong Trend",
"tag_group_id": "uuid",
"sort_order": 1
}
Bulk Update Tags
Updates multiple tags at once (useful for reordering).
PUT /api/v1/tags
Content-Type: application/json
{
"type": "bulk_tags",
"tagGroupId": "uuid",
"tags": [
{ "id": "uuid-1", "sort_order": 0 },
{ "id": "uuid-2", "sort_order": 1 },
{ "id": "uuid-3", "sort_order": 2 }
]
}
Delete Tag
Deletes a tag and removes it from all associated content.
DELETE /api/v1/tags?type=tag&id=uuid
Load Default Tags
Loads a predefined set of tag groups and tags for quick setup.
POST /api/v1/tags
Content-Type: application/json
{
"type": "load_defaults"
}
Response:
{
"tagGroups": [
{
"id": "uuid",
"name": "Setup Quality",
"color": "#3B82F6",
"sort_order": 0,
"tags": [
{ "id": "uuid", "name": "A+", "sort_order": 0 },
{ "id": "uuid", "name": "A", "sort_order": 1 },
{ "id": "uuid", "name": "B", "sort_order": 2 }
]
}
]
}
Tag Filtering
Tags are automatically included when fetching content that supports tagging. Use the tags parameter to filter by tag IDs:
GET /api/v1/trades?tags=uuid-1,uuid-2
This returns only trades that have at least one of the specified tags applied.
Use Cases
Organize by Setup Type:
{
"tag_group": "Setups",
"tags": ["Breakout", "Pullback", "Reversal", "Continuation"]
}
Track Execution Quality:
{
"tag_group": "Execution",
"tags": ["Excellent Entry", "Poor Exit", "Emotional Trade"]
}
Market Conditions:
{
"tag_group": "Market",
"tags": ["Trending", "Range-bound", "High Volatility"]
}
Strategies:
{
"tag_group": "Strategies",
"tags": ["Scalping", "Day Trading", "Swing Trading"]
}