---
updatedAt: 2025-12-04T00:03:11.000Z
agentTools:
  projectIndex: https://streak.readme.io/llms.txt
---

# Add file(s) to box

This call lets you add one or more files from Google Drive to a **single box**. Please note that the "Try it" functionality is nonfunctional in this example.

> 📘 Adding multiple files
>
> For every additional file, you'll need to specify the `driveBoxKey` again and pair it with the respective new `driveFileId`.

The payload is an array of JSON matching the two name–value pairs above. You can pass one or more by using commas between each JSON object.

> 🚧 Authorization
>
> Make sure to include your authorization in any request you make on your own.

# OpenAPI definition

```json
{
  "openapi": "3.1.0",
  "info": {
    "title": "DIRECTORY FIELDS",
    "version": "1"
  },
  "servers": [
    {
      "url": "https://api.streak.com/api/v2"
    }
  ],
  "components": {
    "securitySchemes": {
      "sec0": {
        "type": "http",
        "scheme": "basic"
      }
    }
  },
  "security": [
    {
      "sec0": []
    }
  ],
  "paths": {
    "/files/": {
      "post": {
        "summary": "Add file(s) to box",
        "description": "This call lets you add one or more files from Google Drive to a **single box**. Please note that the \"Try it\" functionality is nonfunctional in this example.",
        "operationId": "add-files",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "driveFileId": {
                    "type": "string",
                    "description": "The ID from Google Drive that matches a file you're adding"
                  },
                  "driveBoxKey": {
                    "type": "string",
                    "description": "The key of the box you'd like to add this file to"
                  }
                }
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "200",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "[\n  {\n    \"fileType\": \"DRIVE\",\n    \"fileOwner\": \"agxzfm1haW\",\n    \"creationTimestamp\": 1546470485725,\n    \"lastUpdatedTimestamp\": 1546470485725,\n    \"size\": \"0\",\n    \"mimeType\": \"application/vnd.google-apps.document\",\n    \"fileName\": \"Bernard Lowe Self-Assessment (Q1'2031)\",\n    \"mainFileName\": \"Bernard Lowe Self-Assessment (Q1'2031)\",\n    \"driveUrl\": \"https://drive.google.com/a/file/d/1YMZjIZKR6o43Zj0d7ni\",\n    \"driveFileId\": \"1YMZjIZKR6o43Zj0d7ni\",\n    \"driveIconUrl\": \"https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.document\",\n    \"driveOwnerId\": \"494833869\",\n    \"driveBoxKey\": \"MfcgxwBTs\",\n    \"isCurrentUserOwnerInDrive\": false,\n    \"fileKey\": \"agxzfm1haWxmb29\",\n    \"key\": \"yLQsSDE9yZ2FuaXphd\",\n    \"boxKey\": \"yLQsSDE9yZ2FuaXphd\",\n    \"lastSavedTimestamp\": 1546470485847\n  }\n]"
                  }
                },
                "schema": {
                  "type": "array",
                  "items": {
                    "type": "object",
                    "properties": {
                      "fileType": {
                        "type": "string",
                        "example": "DRIVE"
                      },
                      "fileOwner": {
                        "type": "string",
                        "example": "agxzfm1haW"
                      },
                      "creationTimestamp": {
                        "type": "integer",
                        "example": 1546470485725,
                        "default": 0
                      },
                      "lastUpdatedTimestamp": {
                        "type": "integer",
                        "example": 1546470485725,
                        "default": 0
                      },
                      "size": {
                        "type": "string",
                        "example": "0"
                      },
                      "mimeType": {
                        "type": "string",
                        "example": "application/vnd.google-apps.document"
                      },
                      "fileName": {
                        "type": "string",
                        "example": "Bernard Lowe Self-Assessment (Q1'2031)"
                      },
                      "mainFileName": {
                        "type": "string",
                        "example": "Bernard Lowe Self-Assessment (Q1'2031)"
                      },
                      "driveUrl": {
                        "type": "string",
                        "example": "https://drive.google.com/a/file/d/1YMZjIZKR6o43Zj0d7ni"
                      },
                      "driveFileId": {
                        "type": "string",
                        "example": "1YMZjIZKR6o43Zj0d7ni"
                      },
                      "driveIconUrl": {
                        "type": "string",
                        "example": "https://drive-thirdparty.googleusercontent.com/16/type/application/vnd.google-apps.document"
                      },
                      "driveOwnerId": {
                        "type": "string",
                        "example": "494833869"
                      },
                      "driveBoxKey": {
                        "type": "string",
                        "example": "MfcgxwBTs"
                      },
                      "isCurrentUserOwnerInDrive": {
                        "type": "boolean",
                        "example": false,
                        "default": true
                      },
                      "fileKey": {
                        "type": "string",
                        "example": "agxzfm1haWxmb29"
                      },
                      "key": {
                        "type": "string",
                        "example": "yLQsSDE9yZ2FuaXphd"
                      },
                      "boxKey": {
                        "type": "string",
                        "example": "yLQsSDE9yZ2FuaXphd"
                      },
                      "lastSavedTimestamp": {
                        "type": "integer",
                        "example": 1546470485847,
                        "default": 0
                      }
                    }
                  }
                }
              }
            }
          },
          "400": {
            "description": "400",
            "content": {
              "application/json": {
                "examples": {
                  "Result": {
                    "value": "{}"
                  }
                },
                "schema": {
                  "type": "object",
                  "properties": {}
                }
              }
            }
          }
        },
        "deprecated": false,
        "x-readme": {
          "code-samples": [
            {
              "language": "curl",
              "code": "curl --request POST \\\n\t--url https://www.streak.com/api/v2/files/ \\\n\t-H \"Content-Type: application/json\" \\\n\t-d '[{\"driveBoxKey\": \"agxzfm1haWxmb2\", \"driveFileId\": \"1mfDH53TbCT7RCs\"}]'"
            },
            {
              "language": "python",
              "code": "import requests\n\nurl = \"https://www.streak.com/api/v2/files/\"\ndata = [{ \"driveFileId\": \"1mfDH53TbCT7RCs\", \"driveBoxKey\": \"agxzfm1haWxmb2\" }] \n\nresponse = requests.post(url, json=data)\n\nprint(response.text)"
            }
          ],
          "samples-languages": [
            "curl",
            "python"
          ]
        }
      }
    }
  },
  "x-readme": {
    "headers": [
      {
        "key": "Content-Type",
        "value": "application/json"
      }
    ],
    "explorer-enabled": true,
    "proxy-enabled": true
  },
  "x-readme-fauxas": true
}
```