For AI agents: a documentation index is available at the root level at /llms.txt and /llms-full.txt. Append /llms.txt to any URL for a page-level index, or .md for the markdown version of any page.
Logo
Resources
Log inGet a demo
Get startedAPI referenceImplementation
Get startedAPI referenceImplementation
    • Overview
    • File Picker
          • The Folder object
          • GET/folders
          • POST/folders
          • GET/folders/{id}
          • GET/folders/meta/post
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsFolders

/folders

GET
/filestorage/v1/folders
GET
/api/filestorage/v1/folders
$curl -G https://api.merge.dev/api/filestorage/v1/folders \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -d cursor=cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw \
> -d drive_id=drive_id \
> --data-urlencode expand=permissions,parent_folder,drive \
> -d parent_folder_id=parent_folder_id
200Retrieved
1{
2 "next": "cD0yMDIxLTAxLTA2KzAzJTNBMjQlM0E1My40MzQzMjYlMkIwMCUzQTAw",
3 "previous": "cj1sZXdwd2VycWVtY29zZnNkc2NzUWxNMEUxTXk0ME16UXpNallsTWtJ",
4 "results": [
5 {
6 "id": "e021f7a7-74fc-4487-8e12-14180c92d3b7",
7 "remote_id": "14",
8 "created_at": "2021-09-15T00:00:00Z",
9 "modified_at": "2021-10-16T00:00:00Z",
10 "name": "R&D",
11 "folder_url": "https://drive.com/1234",
12 "size": 2738000,
13 "description": "All things R&D related at Merge!",
14 "parent_folder": "47ce474c-asdf-34a2-754r-629f799f7d31",
15 "drive": "31ce474c-asdf-34a2-754r-629f799f7d12",
16 "permissions": [
17 {
18 "id": "105b9265-0d52-4e5c-bb88-0cb681ec77f6",
19 "remote_id": "102895",
20 "created_at": "2020-03-31T00:00:00Z",
21 "modified_at": "2020-06-20T00:00:00Z",
22 "user": "21ce474c-asdf-34a2-754r-629f799f7d12",
23 "group": null,
24 "type": "USER",
25 "roles": [
26 "OWNER"
27 ],
28 "remote_data": null
29 },
30 {
31 "id": "a77ac1b4-a04f-4baa-a388-de3c0c173e1c",
32 "remote_id": null,
33 "created_at": "2020-03-31T00:00:00Z",
34 "modified_at": "2020-06-20T00:00:00Z",
35 "user": null,
36 "group": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
37 "type": "GROUP",
38 "roles": [
39 "READ"
40 ],
41 "remote_data": null
42 }
43 ],
44 "remote_created_at": "2024-02-02T00:00:00Z",
45 "remote_updated_at": "2024-06-10T00:00:00Z",
46 "remote_was_deleted": true,
47 "field_mappings": {
48 "organization_defined_targets": {
49 "custom_key": "custom_value"
50 },
51 "linked_account_defined_targets": {
52 "custom_key": "custom_value"
53 }
54 },
55 "remote_data": [
56 {
57 "path": "/folders",
58 "data": null
59 }
60 ]
61 }
62 ]
63}

Returns a list of Folder objects.

Field support by integration

See all supported fields

Use the /linked-accounts endpoint to pull platform support information

Was this page helpful?
Previous

The Folder object

Next

/folders

Built with

Authentication

AuthorizationBearer

Token-based authentication with required prefix “Bearer”

Headers

X-Account-TokenstringRequired
Token identifying the end user.

Query parameters

created_afterdatetimeOptional
If provided, will only return objects created after this datetime.
created_beforedatetimeOptional
If provided, will only return objects created before this datetime.
cursorstringOptional
The pagination cursor value.
drive_idstringOptional
If provided, will only return folders in this drive.
expandenumOptional
Which relations should be returned in expanded form. Multiple relation names should be comma separated without spaces.
include_deleted_databooleanOptional
Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. [Learn more](https://docs.merge.dev/integrations/hris/supported-features/).
include_remote_databooleanOptional

Whether to include the original data Merge fetched from the third-party to produce these models.

include_shell_databooleanOptional

Whether to include shell records. Shell records are empty records (they may contain some metadata but all other fields are null).

modified_afterdatetimeOptional
If provided, only objects synced by Merge after this date time will be returned.
modified_beforedatetimeOptional
If provided, only objects synced by Merge before this date time will be returned.
namestringOptional
If provided, will only return folders with this name. This performs an exact match.
page_sizeintegerOptional
Number of results to return per page. The maximum limit is 100.
parent_folder_idstringOptional
If provided, will only return folders in this parent folder. If null, will return folders in root directory.
remote_idstringOptional
The API provider's ID for the given object.

Response

nextstring or null
previousstring or null
resultslist of objects

Indicates whether or not this object has been deleted in the third party platform. Full coverage deletion detection is a premium add-on. Native deletion detection is offered for free with limited coverage. Learn more.