Files

This resource represents a file object. A file object is a file, folder, or link shared in the Files App of your portal, with the type specified by the object property. Every file object belongs to a File Channel. This API resource describes the metadata of the file object.

To upload or download the contents of a file (as opposed to link or folder), you need to make two API calls. Details are specified in the Create a File and Retrieve a File pages.

Properties

idstring

The unique identifier for this item.

createdAtstring

The date this item was created in RFC3339 format.

updatedAtstring

The date this item was updated in RFC3339 format.

objectstring

The object type of this resource. The file resource can represent either a file, link, or folder.

createdBystring

The ID of the user that created this item.

channelIdstring

The ID of the channel this file is assigned to.

downloadUrlstring

A URL that can be used to download file objects. Field does not appear for folder and link objects. Expires after 15 minutes.

pathstring

The relative location from the channel root for this object. This is a / delimited string where each separated value represents a folder name, until the last value which represents the name of this file resource.

Object What the last separated value represents
folder The name of the folder. In the Example Folder Object below, the name of the folder is Test Folder and it is inside another folder named Example.
file The name of the file including the file extension.
link The name of the link (i.e. the label of the link in the UI).

clientPermissionsstring

When the file object is type folder, this will be set to the permissions type for the folder.

Client Permission Functionality
read-write (default) Clients can view and modify the contents of the folder.
read-only Clients can view, but not modify the contents of the folder.

linkUrlstring

When the file object is type link, this will be set to the URL the link points to. Otherwise this will be an empty string.

statusstring

When the file object is type file, this can be either pending or completed. This represents the current state of a file being created via the API. If the status is pending, the file has been created via the API but not yet uploaded. Once the file is uploaded, the status will be completed. This field is only present for file objects.

sizenumber

Describes the size of the file, in bytes. This field is only present for file objects when performing Retrieve a File

lastModifiedByobject

Contains the data of who modified the file last. The object contains:

The ID of the user who modified the file.

The object type of the user (one of client, internalUser).

Example Folder Object Example File Object Example Link Object

{
    "channelId": "us-east-1_Gz7TRlAaM/7787061b-21d6-4742-b38d-319f3d18831b/none",
    "createdAt": "2024-02-29T22:34:48.044346124Z",
    "creatorId": "dc0f1749-7d01-48b7-bd80-fcbfce835642",
    "id": "9640718b-e291-4c93-8366-989ae26f58c9",
    "linkUrl": "",
    "name": "Example Folder",
    "object": "folder",
    "path": "Example Folder",
    "lastModifiedBy": {
        "id": "9640718b-e291-4c93-8366-989ae26f58c9",
        "object": "internalUser"
    },
   "updatedAt": "2024-02-29T22:34:48.044346124Z",
        "clientPermissions": "read-write"

}
{
    "id": "79d08b61-626a-4587-9e2c-b2ab01184a99",
    "object": "file",
    "createdBy": "1dbb3e36-af70-4f41-89e6-6ddf9e2c62b5",
    "createdAt": "2023-03-21T14:22:53.150948433Z",
    "updatedAt": "2023-03-21T14:22:53.150948433Z",
    "channelId": "us-east-1_eq0ubI3tM/c6e79bda-08b0-4654-9d8b-23a4b5ff6e52",
    "downloadUrl": "https://copilot-user-files.s3-accelerate.amazonaws.com/protected/us-east-1%3Aa8c85d0b-f134-4084-9b02-4fea797c36de/files/2023-12-06T17%3A19%3A50.611Z/bigclient3.csv?X-Amz-Algorithm=AWS4-HMAC-SHA256&X-Amz-Credential=ASIARGA4UFWVEFZ74D5I%2F20231206%2Fus-east-1%2Fs3%2Faws4_request&X-Amz-Date=20231206T171959Z&X-Amz-Expires=10800&X-Amz-Security-Token=IQoJb3JpZ2luX2VjECoaCXVzLWVhc3QtMSJGMEQCIGhmJ%2B1Pnuq8zoyJu8nRC1oFBaG0c4U8iL1dWZGZ2JknAiBxPRZc0iUtksBpLxEfgsCytLXyKLWLsxYNWzNxiP%2FPjCqHAwiS%2F%2F%2F%2F%2F%2F%2F%2F%2F%2F8BEAIaDDA4MTY2NDQyMTI5MCIMJBHumxEhzXNCyUX2KtsCYQwFNC1kzSWWA%2FYZbyCiHGvN22f6wXCM2OXcsNieK2JwEmVMOEmgiwqc%2B9LVJPRsX5cWqBwnuc8JHh6IPZtfyyOPWk9WBDT8okLvBcqya8YYf%2FjOJwQVpkNGIcy3o%2BInM37KayGPwnG7v0jvSgh7G9ynYpWWSalG43%2BBesBI63d3Fo6FUunzKXh0aFLKBaa3JRd1WJO0sLiXLoTRxB%2BxeX28uACWCkJ8BoWG0v2a%2BGKYk8xqsSlgJb30ZAoaeCzqjxwv6u6pwqjy3W05GgOdzQ3t6p1XhBuWAHexGgL4ooIYAzrydYCtcOpgwqeaUZ%2F%2F2lJ8Zc8kbIS6mDAkiafukQmW0zZCAyvg33JwuBWpgKxNRc6WvOs57ugJgWa2iz5CYoLupL9kYHythYP%2F%2F22nG5%2FqG3GqG%2Bx4IHizDblM5je7UTSKwC9TEFRgclEU9ipPCiljF0gqVA%2BhWPkw2tnCqwY6nwG7wZ7pKfr7O7PJyWRfh2qxAkmoAhTuxaBXZpFH68mFLTAepve6JrWBwiB%2FYA8%2FXHMGcRveVSt61A1xUj2IMllKoX1cXP96wkUxhvo522Bbq%2F%2BJqtmL8hIJQow7M2uO1gPk8ImuRcWxq4uzFn%2FfP1%2FFfMQLuIRrkypXFLrVhQAm3b0TU6OJKNQ8v4cVFEKkuIEQEdwsWFGsQwBqO8mz%2FVg%3D&X-Amz-SignedHeaders=host&X-Amz-Signature=ecdb567a708eed617f3a50376e33635d4935171de3df465616363246646cdb99",
    "name": "Screenshot 2022-08-02 at 16.32.54.png",
    "path": "Example/Test Folder/Screenshot 2022-08-02 at 16.32.54.png",
    "status": "complete",
    "size": 145777,
    "linkUrl": "",
    "lastModifiedBy": {
        "id": "9640718b-e291-4c93-8366-989ae26f58c9",
        "object": "internalUser"
    }
}
{
    "id": "79d08b61-626a-4587-9e2c-b2ab01184a99",
    "object": "link",
    "createdBy": "1dbb3e36-af70-4f41-89e6-6ddf9e2c62b5",
    "createdAt": "2023-03-21T14:22:53.150948433Z",
    "updatedAt": "2023-03-21T14:22:53.150948433Z",
    "channelId": "us-east-1_eq0ubI3tM/c6e79bda-08b0-4654-9d8b-23a4b5ff6e52",
    "name": "Reference Documentation",
    "path": "Example/Test Folder/Reference Documentation",
    "linkUrl": "<https://example.com>",
    "lastModifiedBy": {
        "id": "9640718b-e291-4c93-8366-325235gds",
        "object": "client"
    }
}