Skip to content
Skip to Content
DevelopersAPI referenceTags

Rename a tag on all the user's items

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>

A personal API key (ga_…), sent as Authorization: Bearer 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}