Files

Update a file

PATCH
Update a file, to change the workbook id for example

Path parameters

fileIdstringRequired
ID of file to update

Request

This endpoint expects an object.
workbookId
stringOptional
Workbook ID
name
stringOptional
The name of the file
mode
enumOptional
The storage mode of file to update
Allowed values: importexport
status
enumOptional
Status of the file
Allowed values: partialcompletearchivedpurgedfailed
actions
list of objectsOptional
The actions attached to the file

Response

This endpoint returns an object
data
object
Any uploaded file of any type

Errors

PATCH
$curl -X PATCH https://api.x.flatfile.com/v1/files/us_fl_YOUR_ID \
> -H "Authorization: Bearer <token>" \
> -H "Content-Type: application/json" \
> -d '{
> "name": "NewFileName"
>}'
Response
1{
2 "data": {
3 "id": "us_fl_YOUR_ID",
4 "name": "NewFileName",
5 "ext": "png",
6 "mimetype": "image/png",
7 "encoding": "7bit",
8 "status": "partial",
9 "size": 81953,
10 "bytesReceived": 81593,
11 "createdAt": "2023-11-15T19:31:33.015Z",
12 "updatedAt": "2023-11-15T19:31:33.015Z",
13 "spaceId": "us_sp_YOUR_ID",
14 "mode": "import"
15 }
16}