Skip to content

Rename a tag

Renames a tag on every card. Renaming to a different casing of the same tag recases it. Returns at once; poll the operation for progress. One tag change runs at a time per account.

POST/v1/tags/rename
Authorization
AuthorizationBearer token (OAuth access token or teakapi_ API key) · headerrequired

Bearer token. Accepts either an OAuth 2.0 access token (obtained via browser sign-in; expires after 1 hour and is refreshable) or a teakapi_ API key.

Request body
requiredapplication/json
fromstringrequired

The tag to rename, matched ignoring case.

max length 64
tostringrequired

The new name, written exactly as given.

max length 64
Responses
202

Tag change started

idstringrequired
kindstringrequired
Allowed:renamemergedelete
fromstringrequired

The tag being changed, lowercased.

tostring | nullrequired

The new name (rename) or the tag merged into (merge).

statusstringrequired
Allowed:runningcompletedfailed
totalnumberrequired

Cards carrying the tag when the change started (counted up to 10000).

processednumberrequired

Cards looked at so far.

changednumberrequired

Cards rewritten so far.

errorstring | nullrequired
createdAtnumberrequired
updatedAtnumberrequired
completedAtnumber | nullrequired
operationIdstringrequired

Poll GET /v1/tags/operations/{operationId}.

400

Invalid tag name

404

No card has the tag

409

Another tag change is still running (TAG_OPERATION_RUNNING) or a tag with the new name exists (TAG_EXISTS; merge into it instead)

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://teakvault.com/api/v1/tags/rename' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "from": "string",
  "to": "string"
}'
Response
{
  "id": "string",
  "kind": "rename",
  "from": "string",
  "to": "string",
  "status": "running",
  "total": 0,
  "processed": 0,
  "changed": 0,
  "error": "string",
  "createdAt": 0,
  "updatedAt": 0,
  "completedAt": 0,
  "operationId": "string"
}

Was this page helpful?