Skip to content
campaiDeveloper
campai.com

Misc · Drive

POST/{organizationId}/misc/drive/folders/{folderId}

Update folder

Updates a folder’s name, color, and cover image using the organization ID, folder ID, and folder fields. Returns no value on success.

Permissions

Send an API key of the organization in the path, using the X-API-Key header.

Who may call it

  • Callers must have organization access and the drive.edit permission.
  • For callers with assigned-only drive access, the folder’s parent must be shared with them.

Request

Path parameters

  • organizationIdidrequired
  • folderIdidrequired

Body

Content-Type: application/json

  • namestringrequired

    1–128 characters

  • colorstringrequired
    22 values
    slate gray zinc neutral stone red orange amber yellow lime green emerald teal cyan sky blue indigo violet purple fuchsia pink rose
  • coverFileidrequirednullable
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/misc/drive/folders/YOUR_FOLDER_ID' \
  --header 'X-API-Key: YOUR_API_KEY'

No request that worked has been recorded yet, so the body is not shown.

Response

200 Successful response

No response body is specified.

What else happens

  • The endpoint updates the folder’s name, color, and coverFile in driveFolders.

Errors

Other errors

StatusErrorWhen
403You can only work inside folders shared with youIf a caller with assigned-only drive access is not allowed to update the folder, the endpoint returns FORBIDDEN 403.
404The file was not foundIf coverFile is provided but does not identify an image in the folder’s descendants, the endpoint returns NOT_FOUND 404.
404The folder was not foundIf the folder is not found in the organization, the endpoint returns NOT_FOUND 404.

Errors nearly every request can meet are listed under Errors.