GET/v1/folders
Get the folder trees of all collections
folder_trees
Returns, in one response, the folder trees of all collections where the user can see at least one object, with the same visibility rules as GET /v1/collections/{name}/folders and in the order of GET /v1/collections. A collection without visible objects is left out. Besides cards, each folder has the subtree totals cards_total, sensitive_total and top_category. With updated_since or metadata[<key>]=, the folders of each collection hold the matching folders as a flat list (children is empty, and parent_id gives the place in the tree). With updated_since, they are sorted by updated_at ascending, then by id; without it, in sort_key order. Collections without matching folders are left out.
Authentication
Send an API key in the Authorization header: Authorization: Bearer <key>.
Query parameters
limitintegerPage size. Without
limitandcursorthe whole list is returned; with it, at mostlimititems, and the next page is given in theLink(rel="next") andX-Next-Cursorheaders.≥ 1, ≤ 200
cursorstringCursor of the next page from
X-Next-Cursorornext_cursorof the previous response with the same filters; it carries the page size. Together withoffset:422 validation.failed; a cursor of another list, other filters or a malformed one:400 api.cursor_invalid.length ≤ 512
updated_sincestring (date-time)Only objects with
updated_atat or after this moment (RFC 3339 with an offset), for synchronization. With it, the list is sorted byupdated_atascending, then byid, and the cursor continues in that order. Deleted objects are not listed: deletions come as events.length ≤ 512
metadatamap of stringFilter by
metadata:metadata[<key>]=<value>matches exactly. Up to 3 conditions, and all of them must match (?metadata[team]=support&metadata[crm_id]=A-1042). More than 3 conditions or an invalid key returns400 api.metadata_invalid.
Responses
200OK
Response headers
LinkAddress of the next page,
<…>; rel="next". No header means this is the last page.X-Next-CursorCursor of the next page for the
cursorparameter. No header means this is the last page.RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
application/json
collection_idintegerrequiredcollection_namestringrequiredcollection_titlestringrequiredCollection name for display.
permissionsarray of stringrequiredThe user's effective permissions on the collection.
unfiledintegerrequiredCards of the collection available to the user that are not in any folder. Archived cards are not counted, as in the default card list.
401No credentials were sent (neither a session cookie nor an API key), or the key was not found.
Response headers
RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
application/json
429Too many requests (`api.rate_limited`), the organization's quota for the minute, day or month is used up (`api.quota_exceeded`; `error.details` holds `quota`, `limit` and `reset_at`), the organization's limit is reached, or the answer service is busy (`answers.engine_busy`). Wait for the time in the `Retry-After` header.
Response headers
Retry-AfterNumber of seconds to wait before you retry the request.
RateLimit-PolicyLimits in effect, in the format of the IETF draft
draft-ietf-httpapi-ratelimit-headers: comma-separated items"<name>";q=<quota>;w=<window in seconds>.keyis the request rate of the API key (the quota is the burst, the window is the time to refill it fully; for a session it isuser, without credentialsip);minute,dayandmonthare the organization's quotas for the calendar minute, day and month in UTC.RateLimitWhat is left of each limit in
RateLimit-Policy:"<name>";r=<remaining>;t=<seconds until reset>.X-RateLimit-LimitLimit of the strictest entry in
RateLimit-Policy(the one with the fewest requests left).X-RateLimit-RemainingRequests left under the strictest limit.
X-RateLimit-ResetSeconds until the strictest limit resets.
application/json
Error codes
Codes this endpoint can return in error.code, besides the general codes of every request.
Rate limits
Responses carry the RateLimit and RateLimit-Policy headers and the earlier X-RateLimit-Limit, X-RateLimit-Remaining and X-RateLimit-Reset. A 429 response has Retry-After in seconds: wait and retry.