Box

Interact with the Box API

Component key: box

Description#

Box is a file sharing platform that allows teams to collaborate and share files with one another. The Box component allows you to create, list, fetch, move, or delete files and folders in a customer's Box account.

Authorization Methods#

Box requires one of the following authorization methods:

Auth TypeKeyDescriptionFields
API Keyapi_keyAPI authorization based on an API key

API Key |  api_key

OAuth 2.0 - Authorization Codeoauth2OAuth 2.0 authorization using the authorization code grant type

Authorization URL |  auth_uri

Client ID |  client_id

Client Secret |  client_secret

Scopes |  scopes

Access Token URL |  token_uri

Box can use OAuth 2.0 for API authentication, or you can supply an API key. Information about generating Box OAuth2 Tokens can be found on their developer documentation site.

Actions#

Copy Object#

Copy a Folder or File from one path to another | key: copyObject

InputKeyNotesExample

From Path

string
/ Required
fromPathThis represents the source files's path. Include a leading //path/to/source/file.txt

To Path

string
/ Required
toPathThis represents the destination files's path. Include a leading //path/to/destination/file.txt

Output Example Payload#

{
"data": [
{
"id": "exampleId",
"name": "example",
"type": "folder"
}
]
}

Create Folder#

Create a Folder at the specified path | key: createFolder

InputKeyNotesExample

Path

string
/ Required
pathThis represents the files's path. Include a leading //path/to/file.txt

Output Example Payload#

{
"data": {
"id": "exampleId",
"name": "Example",
"folder": "exampleFolder",
"status": "active",
"created_at": "2020-01-01T12:00:00Z",
"description": "Example description."
}
}

Delete Object#

Delete a Folder or File at the specified path | key: deleteObject

InputKeyNotesExample

Path

string
/ Required
pathThis represents the files's path. Include a leading //path/to/file.txt

Download File#

Download the file at the specified path | key: downloadFile

InputKeyNotesExample

Path

string
/ Required
pathThis represents the files's path. Include a leading //path/to/file.txt

Output Example Payload#

{
"data": {
"data": [
101,
120,
97,
109,
112,
108,
101
],
"type": "Buffer"
},
"contentType": "application/octet"
}

Get File Download URL#

Get a URL to download the file at the specified path | key: getFileDownloadUrl

InputKeyNotesExample

Path

string
/ Required
pathThis represents the files's path. Include a leading //path/to/file.txt

Output Example Payload#

{
"data": "example.com/files/file.txt"
}

List Folder#

List Folder contents at the specified path | key: listFolder

InputKeyNotesExample

Path

string
/ Required
pathThis represents the files's path. Include a leading //path/to/file.txt

Output Example Payload#

{
"data": [
{
"id": "exampleId",
"name": "example",
"type": "folder"
}
]
}

Move Object#

Move a Folder or File from one path to another | key: moveObject

InputKeyNotesExample

From Path

string
/ Required
fromPathThis represents the source files's path. Include a leading //path/to/source/file.txt

To Path

string
/ Required
toPathThis represents the destination files's path. Include a leading //path/to/destination/file.txt

Output Example Payload#

{
"data": [
{
"id": "exampleId",
"name": "example",
"type": "folder"
}
]
}

Path Details#

Get detailed information about folders/files in the specified path | key: pathDetails

InputKeyNotesExample

Path

string
/ Required
pathThis represents the files's path. Include a leading //path/to/file.txt

Output Example Payload#

{
"data": [
{
"id": "exampleId",
"name": "example",
"type": "file"
}
]
}

Upload File#

Upload a file to the specified path | key: uploadFile

InputKeyNotesExample

File Contents

data
/ Required
fileContentsThe contents to write to a file. This can be a string of text, it can be binary data (like an image or PDF) that was generated in a previous step.My File Contents

Path

string
/ Required
pathThis represents the files's path. Include a leading //path/to/file.txt

Output Example Payload#

{
"data": [
{
"id": "exampleId",
"name": "example",
"type": "folder"
}
]
}