---
title: "CloudObjects.update"
method: PATCH
path: "/entities/CloudObjects/{id}"
tags: ["Document"]
---

# CloudObjects.update

`PATCH /entities/CloudObjects/{id}`

## Request

- Base URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id`
- URL: `https://us-east.api.coevera.com/api/v100/rest/spaces/your_space_id/entities/CloudObjects/{id}`
- Auth: HTTP basic
- TypeScript: <https://skmtc.dev/coevera/apis/coevera-crm-api/docs/entities/CloudObjects/:id/patch.ts> (a function with typed inputs; its response is checked against the schema)

Changes fields of the CloudObject record with the given id; fields left out keep their values.

## Path parameters

- `id` string, uuid, required

## Query parameters

- `validation-level` integer

## Request body

- UpdateCloudObjectInput: Field values to change on a CloudObject record; fields left out keep their values.
  - `application_id` string, uuid: Id of the producing application.
  - `company_cloud_object_folder_id` string, uuid: Id of the company folder, or empty when the object is not stored in the company tree.
  - `creator_id` string, uuid: Id of the uploading user.
  - `filename` string: File name (with extension) used when downloading the object.
  - `is_public` boolean: When true, the object can be served via a public URL (see public_url).
  - `params` object: Additional metadata about the object (e.g. image dimensions, audio duration), as a JSON object.
  - `upload_source` 1 | 2: Editor the uploaded image is embedded in, such as an email template or rich-text content. Empty for files that are not embedded images. Integer enum value: 1 - EmailTemplate, 2 - RichTextEditor
  - `revision` integer: Revision when entity was lastly changed.

## Response `200`

The changed CloudObject record.

- object
  - `success` boolean: True when the request succeeded; false on error.
  - `data` CloudObject: File stored in the space, such as a document, image or recording, that can be attached to records.
    - `is_delete_protected` boolean, required: True when the record is protected against deletion because it must always exist in the space. Deleting a record that is not protected can still fail on other checks. Read-only.
    - `id` string, uuid, required: Unique identifier of entity.
    - `is_deleted` boolean: Specifies if the entity is considered deleted.
    - `modified` string, date-time: Last modification time.
    - `created` string, date-time: Creation time.
    - `application` string, uri: Application that produced the object (e.g. Online Forms). Related Application record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'Application' for its fields.
    - `company_cloud_object_folder` string, uri: Company-level folder that contains the object, when stored in the company document tree. Related CloudObjectFolder record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'CloudObjectFolder' for its fields.
    - `creator` string, uri: User who uploaded the object. Related Client record, returned as the URI of the record. With the 'expand' parameter the full record is returned instead; see 'Client' for its fields.
    - `application_id` string, uuid: Id of the producing application.
    - `company_cloud_object_folder_id` string, uuid: Id of the company folder, or empty when the object is not stored in the company tree.
    - `creator_id` string, uuid: Id of the uploading user.
    - `filename` string, required: File name (with extension) used when downloading the object.
    - `is_public` boolean: When true, the object can be served via a public URL (see public_url).
    - `mime_type` string: Mime-type of the cloud object Is detected from content.
    - `params` object: Additional metadata about the object (e.g. image dimensions, audio duration), as a JSON object.
    - `size` integer, required: Size of the object in bytes.
    - `type` -1 | 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10, required: Where the file is stored and how its content is obtained: a file in Coevera storage, a file linked from a cloud drive such as Google Drive or OneDrive, or an external URL. Set on create only. Integer enum value: -1 - S3FileUpload, 1 - S3File, 2 - S3Image, 3 - GoogleDriveFile, 4 - OneDriveFile, 5 - BoxFile, 6 - DropboxFile, 7 - SharepointFile, 8 - ExternalURL, 9 - AlfrescoFile, 10 - UrlFile
    - `upload_source` 1 | 2: Editor the uploaded image is embedded in, such as an email template or rich-text content. Empty for files that are not embedded images. Integer enum value: 1 - EmailTemplate, 2 - RichTextEditor
    - `url` string: URL of the object. If URL scheme is not defined "http://" is automatically prepended to supplied URL.
    - `revision` integer: Revision when entity was lastly changed.
    - `dimensions` object: Width and height of the image in pixels; empty for files that are not images.
    - `duration` number, double: Duration of the audio recording in seconds; empty for other files.
    - `public_url` string: Publicly accessible link to the file; empty unless the file is marked as public.

## Other responses

- `400`: Bad request: a bad or unknown parameter (codes 117, 118), a missing permission (code 50), conflicting data (code 2002) or any other API error. The REST API answers 400 where others answer 403 or 409; check `code`.
- `401`: Not authenticated: missing or wrong credentials, a credential of another space, or an expired token (code 401, ERROR_UNAUTHORIZED).
- `404`: No such record or entity (code 143 ERROR_NO_ENTITY, or 2006 ERROR_UNKNOWN_TYPE).
- `422`: Validation failed (code 40000, with the failing fields) or a required parameter is missing (code 119). By default one failed item fails a whole batch and nothing is written.
- `429`: Too many requests (code 182). Wait for the seconds in Retry-After, then retry.
- `500`: Unexpected server error (code 1000, ERROR_UNKNOWN).

---

[API](https://skmtc.dev/coevera/apis/coevera-crm-api.md) - [All operations](https://skmtc.dev/coevera/apis/coevera-crm-api/llms.txt) - [OpenAPI document](https://skmtc.dev/coevera/apis/coevera-crm-api/revisions/40ebbc83f179?raw)
