Skip to main content
POST
JavaScript

Authorizations

Authorization
string
header
required

Enter your API Key in the format: Bearer . Get it from https://gbox.ai

Path Parameters

boxId
string
required

Box ID

Example:

"c9bdc193-b54b-4ddb-a035-5ac0c598d32d"

Body

application/json

Request parameters for checking if a file/directory exists

path
string
required

Target path in the box. If the path does not start with '/', the file/directory will be checked relative to the working directory

Example:

"/home/user/documents/output.txt"

workingDir
string

Working directory. If not provided, the file will be read from the box.config.workingDir directory.

Example:

"/home/user/documents"

Response

200 - application/json

Checks whether a file or directory exists inside a box. Use this endpoint for path validation.

Response after checking if a file/directory exists

exists
boolean
required

Exists

Example:

true

type
string
required

Type

Example:

"file"