Skip to content

Rename, recolor or change the rules of a folder

Saving new auto-tags, or a new or resumed auto-file search, starts a rule run over the cards already in the library; the response’s ruleRunId names it.

PATCH/v1/folders/{folderId}
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.

Path parameters
folderIdstringrequired
Request body
requiredapplication/json
namestring

1 to 300 characters, unique per account ignoring case.

min length 1 · max length 300
colorstring | null

A palette color, or null to clear it.

Allowed:grayredorangeambergreentealbluevioletpinknull
querystring

A smart folder's new search (at most 500 characters). Manual folders have none.

max length 500
autoTagsstring[]

Tags every card that joins this manual folder gets, at most 10. An empty array clears them. Up to 50 folders per account can have rules.

max items 10
autoFileQuerystring | null

A search, with the qualifiers q accepts except like: and mood:, that files matching cards into this manual folder; at most 500 characters, or null to clear it.

max length 500
autoFileEnabledboolean

False pauses the auto-file search without clearing it.

Responses
200

Folder updated

idstringrequired
namestringrequired
colorstring | nullrequired
Allowed:grayredorangeambergreentealbluevioletpinknull
kindstringrequired

manual folders hold the cards put in them; smart folders show the cards that match their query when listed.

Allowed:manualsmart
querystring | nullrequired

A smart folder's search (the same grammar as q), written the canonical way; null for a manual folder.

cardCountnumber | nullrequired

Cards in a manual folder that are not archived or in Trash; null for a smart folder, whose cards are found when listed.

rulesFolderRules | nullrequired

A manual folder's rules; null for a smart folder.

Show properties
One of:
FolderRules
autoTagsstring[]required

Tags every card that joins the folder gets, however it joins. They stay when the card leaves.

autoFileobject | nullrequired

A search that files matching cards into the folder once their AI tags are written; null when the folder has none.

Show properties
One of:
object
querystringrequired
enabledbooleanrequired
null
null
null
null
ruleRunIdstring | nullrequired

The folder's latest rule run, which saving its rules starts. Follow it with getFolderRuleRun.

createdAtnumberrequired
updatedAtnumberrequired
404

Folder not found

409

A folder with this name exists (CONFLICT) or the account has rules on the most folders it can (RULE_LIMIT)

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X PATCH 'https://teakvault.com/api/v1/folders/string' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "color": "gray",
  "query": "string",
  "autoTags": [
    "string"
  ],
  "autoFileQuery": "string",
  "autoFileEnabled": true
}'
Response
{
  "id": "string",
  "name": "string",
  "color": "gray",
  "kind": "manual",
  "query": "string",
  "cardCount": 0,
  "rules": {
    "autoTags": [
      "string"
    ],
    "autoFile": {
      "query": "string",
      "enabled": true
    }
  },
  "ruleRunId": "string",
  "createdAt": 0,
  "updatedAt": 0
}

Was this page helpful?