Skip to content
Pile
Esc
↑↓navigate↵open⌘Jpreview

Create file

POST/workspaces/{organizationId}/files
Authorization
AuthorizationBearer token · headerrequired

Workspace API key (Authorization: Bearer <key>). Issue keys under Settings → Developer or POST /workspaces/{organizationId}/tokens.

Path parameters
organizationIdstringrequired
Request body
application/json
filenamestringrequired
min length 1
contentTypestring
contentBase64stringrequired
min length 1
Responses
201

File uploaded

idstringrequired
keystringrequired
urlstringrequired
contentTypestringrequired
sizeintegerrequired
503

File storage not configured

Try it
Server
Authorization
Parameters
Bodyapplication/json
Request
curl -X POST 'https://pile.nyc/workspaces/string/files' \
  -H 'Authorization: Bearer YOUR_TOKEN' \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{
  "filename": "string",
  "contentType": "string",
  "contentBase64": "string"
}'
Response
{
  "id": "string",
  "key": "string",
  "url": "string",
  "contentType": "string",
  "size": 0
}

Was this page helpful?