Skip to content

Create a folder

An account can have up to 500 folders.

POST/v1/folders
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
namestringrequired

1 to 300 characters, unique per account ignoring case.

min length 1 · max length 300
colorstring

A palette color.

Allowed:grayredorangeambergreentealbluevioletpink
kindstring

smart saves a search as a folder and needs query. Defaults to manual.

Allowed:manualsmart
querystring

A smart folder's search, with the qualifiers q accepts; at most 500 characters. A folder: must name one of your manual folders.

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
201

Folder created

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
400

Invalid name or color

409

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

Try it
Server
Authorization
Bodyapplication/json
Request
curl -X POST 'https://teakvault.com/api/v1/folders' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "name": "string",
  "color": "gray",
  "kind": "manual",
  "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?