Operations (sample payloads)

Main operations
Copy

Apply created template
Copy

Add property groups to a Dropbox file. Template property groups can be created using the "Create template" operation.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"path": "/Documents/Project_Report.docx",
4
"property_groups": [
5
{
6
"template_id": "ptid:1a2b3c4d5e6f7g8h9i0j",
7
"fields": [
8
{
9
"name": "Project",
10
"value": "Annual Report 2023"
11
},
12
{
13
"name": "Department",
14
"value": "Finance"
15
},
16
{
17
"name": "Status",
18
"value": "In Progress"
19
}
20
]
21
},
22
{
23
"template_id": "ptid:0a1b2c3d4e5f6g7h8i9j",
24
"fields": [
25
{
26
"name": "Confidentiality",
27
"value": "Internal Use Only"
28
},
29
{
30
"name": "ReviewDate",
31
"value": "2023-12-31"
32
}
33
]
34
}
35
]
36
}

Sample Output

1
{
2
"success": true
3
}

Continue list (pagination)
Copy

Retrieve further pages of results with a cursor.

Sample Input

1
{
2
"access_token": "sl.A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6",
3
"list_url": "/files/list_folder",
4
"cursor": "AAH_7wFUTPDZVPOmfDUwNjM2ODc3NDM4OTI5OmY5YzM4YTI4ZjI5MmM2Mzk5NDE5NDhjOGJiNzZhNGY5"
5
}

Sample Output

1
{
2
"cursor": "AAH_7wFUTPDZVPOmfDUwNjM2ODc3NDM4OTI5OmY5YzM4YTI4ZjI5MmM2Mzk5NDE5NDhjOGJiNzZhNGY5",
3
"has_more": true
4
}

Copy file/folder
Copy

Copy a file/folder from a specified path to target location.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"from_path": "/Documents/Project_X/report.pdf",
4
"to_path": "/Backup/Project_X_2023/report_copy.pdf",
5
"allow_shared_folder": false,
6
"autorename": true,
7
"allow_ownership_transfer": false
8
}

Sample Output

1
{
2
"metadata": {
3
"name": "report_copy.pdf",
4
"path_lower": "/backup/project_x_2023/report_copy.pdf",
5
"path_display": "/Backup/Project_X_2023/report_copy.pdf",
6
"id": "id:a1b2c3d4e5f6g7h8i9j0",
7
"tag": "file"
8
}
9
}

Create file request
Copy

Create a file request.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"title": "Project Proposal Submissions",
4
"destination": "/Project Proposals/2023",
5
"open": true
6
}

Sample Output

1
{
2
"id": "abcdef1234567890",
3
"url": "https://www.dropbox.com/request/abcdef1234567890",
4
"title": "Project Proposal Submissions",
5
"destination": "/Project Proposals/2023",
6
"created": "2023-05-15T14:30:00Z",
7
"is_open": true,
8
"file_count": 0
9
}

Create folder
Copy

Crate a folder at a given path.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"path": "/Documents/Project X",
4
"autorename": true
5
}

Sample Output

1
{
2
"metadata": {
3
"name": "Project X",
4
"path_lower": "/documents/project x",
5
"path_display": "/Documents/Project X",
6
"id": "id:a1b2c3d4e5f6g7h8i9j0"
7
}
8
}

Create template
Copy

Add a template to be associated with the current authenticated user account.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"name": "Project Proposal Template",
4
"description": "A template for creating project proposals",
5
"fields": [
6
{
7
"name": "project_name",
8
"description": "The name of the proposed project",
9
"type": "string"
10
},
11
{
12
"name": "start_date",
13
"description": "The proposed start date of the project",
14
"type": "string"
15
},
16
{
17
"name": "budget",
18
"description": "The estimated budget for the project",
19
"type": "string"
20
},
21
{
22
"name": "team_size",
23
"description": "The number of team members required for the project",
24
"type": "string"
25
}
26
]
27
}

Sample Output

1
{
2
"template_id": "tmpl_AbCdEfGhIjKlMnOpQrStUvWx"
3
}

Get account info
Copy

Retrieve information about the current user's account.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890-_"
3
}

Sample Output

1
{
2
"account_id": "dbid:AAH4f99T0taONIb-OurWxbNQ6ywGRopQngc",
3
"name": {
4
"given_name": "John",
5
"surname": "Doe",
6
"familiar_name": "Johnny",
7
"display_name": "John Doe",
8
"abbreviated_name": "JD"
9
},
10
"email": "johndoe@example.com",
11
"email_verified": true,
12
"profile_photo_url": "https://dl-web.dropbox.com/account_photo/get/dbid%3AAAH4f99T0taONIb-OurWxbNQ6ywGRopQngc?size=128x128&vers=1634567890",
13
"disabled": false,
14
"country": "US",
15
"locale": "en",
16
"referral_link": "https://www.dropbox.com/referrals/r1a2b3c4d5e6f7g8h",
17
"is_paired": true,
18
"account_type": {
19
".tag": "basic"
20
},
21
"root_info": {
22
".tag": "user",
23
"root_namespace_id": "1234567890",
24
"home_namespace_id": "1234567890"
25
}
26
}

Get file by path
Copy

Get a file from your dropbox account using its path.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"path": "/Documents/Project_Report.pdf"
4
}

Sample Output

1
{
2
"file": {
3
"name": "Project_Report.pdf",
4
"url": "https://dl.dropboxusercontent.com/apitl/1/AbCdEfGhIjKlMnOpQrStUvWxYz",
5
"mime_type": "application/pdf",
6
"expires": 1623456789
7
}
8
}

Get file request
Copy

Retrieve the specified file request.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"file_request_id": "abcdef123456"
4
}

Sample Output

1
{
2
"id": "abcdef123456",
3
"url": "https://www.dropbox.com/request/abcdef123456",
4
"title": "Project Submission",
5
"destination": "/Project Submissions/",
6
"created": "2023-05-15T10:30:00Z",
7
"is_open": true,
8
"file_count": 5
9
}

Get file/folder metadata
Copy

Retrieve the metadata for a file or folder.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"path": "/Documents/Project_Report.docx",
4
"include_media_info": true,
5
"include_deleted": false,
6
"include_has_explicit_shared_members": true
7
}

Sample Output

1
{
2
"name": "Project_Report.docx",
3
"path_lower": "/documents/project_report.docx",
4
"path_display": "/Documents/Project_Report.docx",
5
"id": "id:a1b2c3d4e5f6g7h8i9j0",
6
"tag": "file"
7
}

Get latest folder content cursor
Copy

Retrieve a "latest" cursor for "List folder content".

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"path": "/Documents",
4
"recursive": true,
5
"include_deleted": false,
6
"include_has_explicit_shared_members": true,
7
"include_mounted_folders": true,
8
"include_non_downloadable_files": true,
9
"limit": 500
10
}

Sample Output

1
{
2
"cursor": "AAH_3wGxWWOQh9Rj3ZvkLcXKyYzNkL5OpQrStUvWxYz1234567890"
3
}

Get template
Copy

Get the schema for a specified template.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"template_id": "ptid:abcdefghijklmnopqrstuvwxyz123456"
4
}

Sample Output

1
{
2
"name": "Customer Feedback Form",
3
"description": "A template for collecting customer feedback on our products and services",
4
"fields": [
5
{
6
"name": "customer_name",
7
"description": "Full name of the customer",
8
"type": {
9
".tag": "string"
10
}
11
},
12
{
13
"name": "product_rating",
14
"description": "Rating of the product (1-5)",
15
"type": {
16
".tag": "number"
17
}
18
},
19
{
20
"name": "feedback_text",
21
"description": "Detailed feedback from the customer",
22
"type": {
23
".tag": "string"
24
}
25
}
26
]
27
}

List file requests
Copy

List your file requests.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"limit": 2
4
}

Sample Output

1
{
2
"file_requests": [
3
{
4
"id": "abcdef123456",
5
"url": "https://www.dropbox.com/request/abcdef123456",
6
"title": "Project Submissions",
7
"destination": "/Project Submissions",
8
"created": "2023-05-15T10:30:00Z",
9
"is_open": true,
10
"file_count": 5
11
},
12
{
13
"id": "ghijkl789012",
14
"url": "https://www.dropbox.com/request/ghijkl789012",
15
"title": "Vacation Photos",
16
"destination": "/Shared Albums/Summer Vacation 2023",
17
"created": "2023-06-01T14:45:00Z",
18
"is_open": true,
19
"file_count": 12
20
}
21
],
22
"cursor": "AAFu-_dcrLzpzQqyZnSb8eMUbTBpDO1234567890",
23
"has_more": true
24
}

List folder content
Copy

List the content of a folder.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"path": "/Documents",
4
"recursive": false,
5
"include_deleted": false,
6
"include_has_explicit_shared_members": false,
7
"include_mounted_folders": true,
8
"include_non_downloadable_files": true,
9
"limit": 100
10
}

Sample Output

1
{
2
"entries": [
3
{
4
".tag": "file",
5
"name": "Project Proposal.docx",
6
"path_lower": "/documents/project proposal.docx",
7
"path_display": "/Documents/Project Proposal.docx",
8
"id": "id:a1b2c3d4e5f6g7h8i9j0",
9
"client_modified": "2023-05-15T14:32:18Z",
10
"server_modified": "2023-05-15T14:32:20Z",
11
"rev": "015a1b2c3d4e5f6g7h",
12
"size": 2564738,
13
"is_downloadable": true,
14
"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
15
},
16
{
17
".tag": "folder",
18
"name": "Images",
19
"path_lower": "/documents/images",
20
"path_display": "/Documents/Images",
21
"id": "id:k1l2m3n4o5p6q7r8s9t0"
22
},
23
{
24
".tag": "file",
25
"name": "Budget.xlsx",
26
"path_lower": "/documents/budget.xlsx",
27
"path_display": "/Documents/Budget.xlsx",
28
"id": "id:u1v2w3x4y5z6a7b8c9d0",
29
"client_modified": "2023-05-10T09:15:30Z",
30
"server_modified": "2023-05-10T09:15:32Z",
31
"rev": "015b2c3d4e5f6g7h8i",
32
"size": 1048576,
33
"is_downloadable": true,
34
"content_hash": "f3a1b2c3d4e5f6g7h8i9j0k1l2m3n4o5p6q7r8s9t0u1v2w3x4y5z6a7b8c9d0"
35
}
36
],
37
"cursor": "AAH_kWBToR9VpIVq8bGXpJ7Xh1h1234567890",
38
"has_more": false
39
}

List templates
Copy

List the Template IDs associated with this user.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890"
3
}

Sample Output

1
{
2
"template_ids": [
3
"ptid:abcdefghijklmnopqrstuvwxyz123456",
4
"ptid:zyxwvutsrqponmlkjihgfedcba654321",
5
"ptid:1a2b3c4d5e6f7g8h9i0j1k2l3m4n5o6p"
6
]
7
}

Raw HTTP request (advanced)
Copy

Perform a raw HTTP request with some pre-configuration and processing by the connector, such as authentication.

Sample Input

1
{
2
"access_token": "YOUR_ACCESS_TOKEN",
3
"method": "POST",
4
"url": {
5
"endpoint": "/files/upload"
6
},
7
"headers": [
8
{
9
"key": "Content-Type",
10
"value": "application/octet-stream"
11
},
12
{
13
"key": "Dropbox-API-Arg",
14
"value": "{\"path\": \"/sample_file.txt\", \"mode\": \"add\", \"autorename\": true}"
15
}
16
],
17
"body": {
18
"raw": "This is the content of the file being uploaded to Dropbox."
19
},
20
"include_raw_body": true,
21
"parse_response": "true"
22
}

Sample Output

1
{
2
"response": {
3
"status_code": 200,
4
"headers": {
5
"Content-Type": "application/json",
6
"Dropbox-API-Result": "{\"name\": \"sample_file.txt\", \"path_lower\": \"/sample_file.txt\", \"path_display\": \"/sample_file.txt\", \"id\": \"id:a4ayc_80_OEAAAAAAAAAXw\", \"client_modified\": \"2023-06-15T10:30:15Z\", \"server_modified\": \"2023-06-15T10:30:15Z\", \"rev\": \"015a0000000000000000000000000001\", \"size\": 48, \"is_downloadable\": true, \"content_hash\": \"e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855\"}"
7
},
8
"body": {
9
"name": "sample_file.txt",
10
"path_lower": "/sample_file.txt",
11
"path_display": "/sample_file.txt",
12
"id": "id:a4ayc_80_OEAAAAAAAAAXw",
13
"client_modified": "2023-06-15T10:30:15Z",
14
"server_modified": "2023-06-15T10:30:15Z",
15
"rev": "015a0000000000000000000000000001",
16
"size": 48,
17
"is_downloadable": true,
18
"content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
19
}
20
}
21
}

Update file request
Copy

Update a file request.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"file_request_id": "abcdefghijklmnopqrstuvwxyz",
4
"title": "Updated Project Submissions",
5
"destination": "/Project Files/Submissions",
6
"open": false
7
}

Sample Output

1
{
2
"id": "abcdefghijklmnopqrstuvwxyz",
3
"url": "https://www.dropbox.com/request/abcdefghijklmnopqrstuvwxyz",
4
"title": "Updated Project Submissions",
5
"destination": "/Project Files/Submissions",
6
"created": "2023-05-15T14:30:00Z",
7
"is_open": false,
8
"file_count": 12
9
}

Upload file
Copy

Upload a file.

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890",
3
"file": {
4
"name": "example.txt",
5
"content": "This is the content of the file.",
6
"content_type": "text/plain"
7
},
8
"path": "/Documents/example.txt",
9
"autorename": true
10
}

Sample Output

1
{
2
"name": "example.txt",
3
"path_lower": "/documents/example.txt",
4
"path_display": "/Documents/example.txt",
5
"id": "id:a1b2c3d4e5f6g7h8i9j0",
6
"client_modified": "2023-05-15T14:30:00Z",
7
"server_modified": "2023-05-15T14:30:05Z",
8
"rev": "015a1b2c3d4e5f6g7h",
9
"size": 31,
10
"is_downloadable": true,
11
"content_hash": "abcdef1234567890abcdef1234567890abcdef1234567890abcdef1234567890"
12
}

DDL operations
Copy

List file requests (DDL)
Copy

Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

Sample Input

1
{
2
"access_token": "sl.A1B2C3D4E5F6G7H8I9J0K1L2M3N4O5P6"
3
}

Sample Output

1
{
2
"file_requests": [
3
{
4
"id": "abcdef123456",
5
"url": "https://www.dropbox.com/request/abcdef123456",
6
"title": "Project Submissions",
7
"created": "2023-05-15T10:30:00Z",
8
"is_open": true,
9
"file_count": 5,
10
"destination": "/File Requests/Project Submissions",
11
"deadline": "2023-06-15T23:59:59Z"
12
},
13
{
14
"id": "ghijkl789012",
15
"url": "https://www.dropbox.com/request/ghijkl789012",
16
"title": "Vacation Photos",
17
"created": "2023-04-01T14:45:00Z",
18
"is_open": false,
19
"file_count": 20,
20
"destination": "/File Requests/Vacation Photos",
21
"deadline": null
22
}
23
],
24
"has_more": false
25
}

List folder content (DDL)
Copy

Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

Sample Input

1
{
2
"access_token": "sl.BfG8hJ2K3L4M5N6O7P8Q9R0S1T2U3V4W5X6Y7Z8a9b0c1d2e3f4g5h6i7j8k"
3
}

Sample Output

1
{
2
"folders": [
3
{
4
"name": "Documents",
5
"path": "/Documents",
6
"id": "id:abcdefghijklmnopqrst"
7
},
8
{
9
"name": "Photos",
10
"path": "/Photos",
11
"id": "id:uvwxyz1234567890abcd"
12
}
13
],
14
"files": [
15
{
16
"name": "Project_Report.pdf",
17
"path": "/Project_Report.pdf",
18
"id": "id:efghijklmnopqrstuvwx",
19
"size": 2456789,
20
"modified": "2023-06-15T14:32:21Z"
21
},
22
{
23
"name": "Meeting_Notes.docx",
24
"path": "/Meeting_Notes.docx",
25
"id": "id:yz1234567890abcdefghi",
26
"size": 145678,
27
"modified": "2023-06-14T09:45:30Z"
28
}
29
]
30
}

List templates (DDL)
Copy

Note that DDL operations can only be called directly by Connectors API, or when using CustomJS in the Embedded solution editor for e.g. DDL-dependent data mapping

Sample Input

1
{
2
"access_token": "sl.AbCdEfGhIjKlMnOpQrStUvWxYz1234567890"
3
}

Sample Output

1
{
2
"templates": [
3
{
4
"id": "template_123456",
5
"name": "Invoice Template",
6
"description": "Standard invoice template for billing",
7
"type": "docx",
8
"last_modified": "2023-05-15T10:30:45Z"
9
},
10
{
11
"id": "template_789012",
12
"name": "Project Proposal",
13
"description": "Template for creating project proposals",
14
"type": "pptx",
15
"last_modified": "2023-05-10T14:22:30Z"
16
},
17
{
18
"id": "template_345678",
19
"name": "Monthly Report",
20
"description": "Template for generating monthly performance reports",
21
"type": "xlsx",
22
"last_modified": "2023-05-01T09:15:00Z"
23
}
24
],
25
"cursor": "AAFu-_hGpqOBzPH2k-NEw-fK0EAAAAA6vgbMqRzMtlyDr1XjxCfmNdJJeGxF8bS_YYgFJzqNHFAZv1p4dkvlHQ",
26
"has_more": false
27
}