Update a file

Updates a file with a specified ID.

Note: Files can only be uploaded by POST request. For more information, see the Create a file operation.

SecuritySecretApiKey or JWT
Request
path Parameters
id
required
string <= 50 characters ^[@~\-\.\w]+$

ID of the resource.

Request Body schema: application/json

File resource.

name
string

Original file name.

extension
string

File extension.

description
string

Description of the file.

sourceType
string or null

Source of the file.

Enum: "upload" "camera" "organization-export" "organization-closure-export"
tags
Array of strings

List of tags associated with the file.

isPublic
boolean

Specifies if the file is available publicly without authentication. If this value is true, the permalink in the _links section contains the public URL.

Responses
200

File updated.

Response Schema: application/json
id
string <= 50 characters

Unique resource ID. Defaults to UUID v4.

name
string

Original file name.

extension
string

File extension.

description
string

Description of the file.

sourceType
string or null

Source of the file.

Enum: "upload" "camera" "organization-export" "organization-closure-export"
tags
Array of strings

List of tags associated with the file.

mime
string

MIME type of the file.

Enum: "image/png" "image/jpeg" "image/gif" "application/pdf"
size
integer

File size, in bytes.

width
integer

Image width. This field applicable to images only.

height
integer

Image height. This field applicable to images only.

sha1
string

Hash sum of the file.

createdTime
string <date-time> (CreatedTime)

Date and time which is set automatically when the resource is created.

updatedTime
string <date-time> (UpdatedTime)

Date and time which updates automatically when the resource is updated.

isPublic
boolean

Specifies if the file is available publicly without authentication. If this value is true, the permalink in the _links section contains the public URL.

Array of objects

Related links.

Array
href
string

Link URL.

rel
string

Type of link.

Enum: "self" "download" "signedLink" "permalink"
401

Unauthorized access. Invalid credentials used.

403

Access forbidden.

404

Resource not found.

422

Invalid data sent.

put/files/{id}
Request samples
application/json
{
  • "name": "string",
  • "extension": "string",
  • "description": "string",
  • "sourceType": "upload",
  • "tags": [
    ],
  • "isPublic": true
}
Response samples
application/json
{
  • "id": "4f6cf35x-2c4y-483z-a0a9-158621f77a21",
  • "name": "string",
  • "extension": "string",
  • "description": "string",
  • "sourceType": "upload",
  • "tags": [
    ],
  • "mime": "image/png",
  • "size": 0,
  • "width": 0,
  • "height": 0,
  • "sha1": "string",
  • "createdTime": "2019-08-24T14:15:22Z",
  • "updatedTime": "2019-08-24T14:15:22Z",
  • "isPublic": true,
  • "_links": [
    ]
}