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 File object
          • GET/files
          • POST/files
          • GET/files/{id}
          • GET/files/{id}/download
          • GET/files/{id}/download/request-meta
          • GET/files/download/request-meta
          • GET/files/meta/post
UnifiedAgent HandlerGateway
UnifiedAgent HandlerGateway
Resources
Log inGet a demo
Common ModelsFiles

/files

Beta
POST
/filestorage/v1/files
POST
/api/filestorage/v1/files
$curl -X POST https://api.merge.dev/api/filestorage/v1/files \
> -H "X-Account-Token: X-Account-Token" \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "model": {}
>}'
201Created
1{
2 "model": {
3 "id": "45ce474c-dhcj-43a6-754r-629f799f7d68",
4 "remote_id": "12",
5 "created_at": "2021-09-15T00:00:00Z",
6 "modified_at": "2021-10-16T00:00:00Z",
7 "name": "merge_file_storage_launch.docx",
8 "file_url": "https://drive.com/1234",
9 "file_thumbnail_url": "https://drive.com/1234/thumbnail.png",
10 "size": 254,
11 "mime_type": "application/vnd.openxmlformats-officedocument.wordprocessingml.document",
12 "description": "Use common model scopes to redact data returned in Merge's Common Models!",
13 "folder": "8e889422-e086-42dc-b99e-24d732039b0b",
14 "checksum": {
15 "type": "sha256",
16 "content_hash": "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"
17 },
18 "permissions": [
19 {
20 "id": "31ce489c-asdf-68b1-754r-629f799f7123",
21 "remote_id": "102895",
22 "created_at": "2020-03-31T00:00:00Z",
23 "modified_at": "2020-06-20T00:00:00Z",
24 "user": "21ce474c-asdf-34a2-754r-629f799f7d12",
25 "group": null,
26 "type": "USER",
27 "roles": [
28 "OWNER"
29 ],
30 "remote_data": null
31 },
32 {
33 "id": "2ea7db93-1ae9-4686-82c9-35c768000736",
34 "remote_id": null,
35 "created_at": "2020-03-31T00:00:00Z",
36 "modified_at": "2020-06-20T00:00:00Z",
37 "user": null,
38 "group": "3fa85f64-5717-4562-b3fc-2c963f66afa6",
39 "type": "GROUP",
40 "roles": [
41 "READ"
42 ],
43 "remote_data": null
44 }
45 ],
46 "drive": "204ca79c-0c86-4f6c-9ca6-61b946a4708a",
47 "remote_created_at": "2022-02-02T00:00:00Z",
48 "remote_updated_at": "2022-02-03T00:00:00Z",
49 "remote_was_deleted": true,
50 "field_mappings": {
51 "organization_defined_targets": {
52 "custom_key": "custom_value"
53 },
54 "linked_account_defined_targets": {
55 "custom_key": "custom_value"
56 }
57 },
58 "remote_data": [
59 {
60 "path": "/files",
61 "data": null
62 }
63 ]
64 },
65 "warnings": [
66 {
67 "title": "Unrecognized Field",
68 "detail": "An unrecognized field, age, was passed in with request data.",
69 "problem_type": "UNRECOGNIZED_FIELD",
70 "source": {
71 "pointer": "/age"
72 },
73 "block_merge_link": true,
74 "raw_error": "string",
75 "error_code": 1
76 }
77 ],
78 "errors": [
79 {
80 "title": "Missing Required Field",
81 "detail": "custom_fields is a required field on model.",
82 "problem_type": "MISSING_REQUIRED_FIELD",
83 "source": {
84 "pointer": "/model/custom_fields"
85 },
86 "block_merge_link": true,
87 "raw_error": "string",
88 "error_code": 1
89 }
90 ],
91 "logs": [
92 {
93 "log_id": "99433219-8017-4acd-bb3c-ceb23d663832",
94 "dashboard_view": "https://app.merge.dev/logs/99433219-8017-4acd-bb3c-ceb23d663832",
95 "log_summary": {
96 "url": "www.exampleintegration.com/api/v1/exampleapi",
97 "method": "POST",
98 "status_code": 200
99 }
100 }
101 ]
102}

Creates a File object with the given values.

Field support by integration

See all supported fields

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

Was this page helpful?
Previous

/files

Next

/files/{id}

Built with

Authentication

AuthorizationBearer

Token-based authentication with required prefix “Bearer”

Headers

X-Account-TokenstringRequired
Token identifying the end user.

Query parameters

is_debug_modebooleanOptional

Whether to include debug fields (such as log file links) in the response.

run_asyncbooleanOptional

Whether or not third-party updates should be run asynchronously.

Request

This endpoint expects an object.
modelobjectRequired

Description

The File object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists.

Usage Example

Fetch from the GET /api/filestorage/v1/files endpoint and view their files.

Response

modelobject

Description

The File object is used to represent a file in the workspace. The Object typically exists under a folder or drive, if it exists.

Usage Example

Fetch from the GET /api/filestorage/v1/files endpoint and view their files.

warningslist of objects
errorslist of objects
logslist of objects