Skip to content
Skip to Content
Full reference

Tags

List the user's tags

GET
/v1/tags

The signed-in user's own tags, with how many of their items carry each, most used first (ties by tag, A to Z). Use it for search suggestions and tag autocomplete. An API key needs read access to items.

  • Only live items count: deleted and archived items are left out (archived items are put away, so their tags are not suggested). A tag no live item carries is not listed.
  • Tags are case-insensitive: Design and design are one tag, returned lowercase, the spelling Trova stores tags in (it lowercases them when they are saved).
  • By default only the user's own tags count. With include_ai=true, ai_tags count too; an item with a tag as both its own and an AI tag counts once.
  • q keeps tags that start with it, case-insensitively, after folding white space as tags are.

Counts come from a per-user aggregate kept current by the database as items change, so the request reads a few index rows rather than every item.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Query Parameters

q?string

Prefix to match, case-insensitive.

Lengthlength <= 64
limit?integer
Range1 <= value <= 200
Default50
include_ai?boolean

Also count AI tags.

Defaultfalse

Response Body

Tags, most used first

application/json
  1. response
tags*array<>
Example Request
curl -X GET 'https://example.com/v1/tags'
Example Response
{  "tags": [    {      "tag": "string",      "count": 1    }  ]}
POST
/v1/tags/rename

Every item of the user that has tag (its own tag or an AI tag; archived items too, deleted ones not) gets to instead. Renaming to a tag that already exists merges the two: an item with both keeps one, in the earlier place. Tags are compared after lowercasing and folding white space. Each changed item sends an item.updated webhook. An API key needs write access to items.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Request Body

application/json
  1. body
tag*string
Lengthlength <= 64
to*string
Lengthlength <= 64

Response Body

Done. items is how many of the user's items changed.

application/json
  1. response
items*integer
Range0 <= value
Example Request
curl -X POST 'https://example.com/v1/tags/rename' \  -H 'Content-Type: application/json' \  -d '{  "tag": "string",  "to": "string"}'
Example Response
{  "items": 0}
POST
/v1/tags/merge

Like renameTag for several tags at once: each of tags becomes into. into may be one of tags (it is left alone). An API key needs write access to items.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Request Body

application/json
  1. body
tags*array<>
Items1 <= items <= 50
into*string
Lengthlength <= 64

Response Body

Done. items is how many of the user's items changed.

application/json
  1. response
items*integer
Range0 <= value
Example Request
curl -X POST 'https://example.com/v1/tags/merge' \  -H 'Content-Type: application/json' \  -d '{  "tags": [    "string"  ],  "into": "string"}'
Example Response
{  "items": 0}
POST
/v1/tags/delete

Removes the tags from the user's items (own and AI tags; archived items too) and dismisses them on those items, so tagging them again does not suggest them back. Allowed while the library is read-only over its plan's limits. Smart Spaces and rules that name a deleted or renamed tag are not changed. An API key needs write access to items.

Authorization

bearer
headerAuthorizationBearer <token>

Supabase access token (JWT) or personal API key (ga_…). A key gets 403 on a resource it has no access to, and on anything that changes data without write access.

Request Body

application/json
  1. body
tags*array<>
Items1 <= items <= 50

Response Body

Done. items is how many of the user's items changed.

application/json
  1. response
items*integer
Range0 <= value
Example Request
curl -X POST 'https://example.com/v1/tags/delete' \  -H 'Content-Type: application/json' \  -d '{  "tags": [    "string"  ]}'
Example Response
{  "items": 0}