Tags
Tags let you categorize and filter ideas. Each tag has a name, an optional color, and a count of associated ideas.
List Tags
Section titled “List Tags”GET /api/v1/tags
Returns all tags for the authenticated user, including the number of ideas associated with each tag.
curl https://neuralrepo.com/api/v1/tags \ -H "X-API-Key: nrp_YOUR_KEY"const res = await fetch("https://neuralrepo.com/api/v1/tags", { headers: { "X-API-Key": "nrp_YOUR_KEY" },});const tags = await res.json();Response 200 OK
[ { "id": 1, "name": "feature-request", "color": "#4f46e5", "idea_count": 12 }, { "id": 2, "name": "bug", "color": "#dc2626", "idea_count": 5 }]Create Tag
Section titled “Create Tag”POST /api/v1/tags
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
name | string | Yes | 1-50 characters, must be unique |
color | string | No | Hex color in #rrggbb format |
curl -X POST https://neuralrepo.com/api/v1/tags \ -H "X-API-Key: nrp_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"name": "backend", "color": "#059669"}'const res = await fetch("https://neuralrepo.com/api/v1/tags", { method: "POST", headers: { "X-API-Key": "nrp_YOUR_KEY", "Content-Type": "application/json", }, body: JSON.stringify({ name: "backend", color: "#059669" }),});const tag = await res.json();Response 201 Created
{ "id": 3, "name": "backend", "color": "#059669", "idea_count": 0}Update Tag
Section titled “Update Tag”PATCH /api/v1/tags/:id
Update the name, color, or both. Only provided fields are changed.
Request Body
Section titled “Request Body”| Field | Type | Required | Description |
|---|---|---|---|
name | string | No | 1-50 characters |
color | string | No | Hex color in #rrggbb format |
curl -X PATCH https://neuralrepo.com/api/v1/tags/3 \ -H "X-API-Key: nrp_YOUR_KEY" \ -H "Content-Type: application/json" \ -d '{"color": "#0ea5e9"}'Response 200 OK
{ "id": 3, "name": "backend", "color": "#0ea5e9", "idea_count": 0}Delete Tag
Section titled “Delete Tag”DELETE /api/v1/tags/:id
Removes the tag. Ideas that had this tag will have it detached but are not otherwise affected.
curl -X DELETE https://neuralrepo.com/api/v1/tags/3 \ -H "X-API-Key: nrp_YOUR_KEY"Response 204 No Content
Tag Schema
Section titled “Tag Schema”| Field | Type | Description |
|---|---|---|
id | number | Unique tag identifier |
name | string | Display name |
color | string | null | Hex color code |
idea_count | number | Number of ideas using this tag |
Status Codes
Section titled “Status Codes”| Status | Meaning |
|---|---|
200 OK | Successful read or update |
201 Created | Tag created |
204 No Content | Tag deleted |
400 Bad Request | Validation error (name too long, invalid color) |
401 Unauthorized | Missing or invalid auth |
404 Not Found | Tag not found |
409 Conflict | Tag with that name already exists |