Skip to main content
GET
/
boxes
/
{boxId}
/
files
Read a file from a Box
curl --request GET \
  --url https://ascii.dev/api/box/v1/boxes/{boxId}/files \
  --header 'Authorization: Bearer <token>'
{
  "ok": true,
  "type": "<string>",
  "success": true,
  "path": "<string>",
  "size": 123,
  "content": "<string>"
}

Authorizations

Authorization
string
header
required

Box API key in the form box_.... Create and rotate keys in the Box dashboard or through the v1 API key endpoints.

Path Parameters

boxId
string
required

Public Box id returned by create/list/get box calls.

Pattern: ^bx_[23456789abcdefghjkmnpqrstuvwxyz]{8}$

Query Parameters

path
string
required
encoding
enum<string>
default:utf8
Available options:
utf8,
base64

Response

200 - application/json

File contents.

ok
boolean
required
Example:

true

type
string
required

Stable success envelope discriminator added by v1.

Allowed value: "file.read"
success
boolean
required
path
string
required
encoding
enum<string>
required
Available options:
utf8,
base64
size
integer
required
content
string
required