Skip to content
campaiDeveloper
campai.com

Misc ยท Drive

POST/{organizationId}/misc/drive/copy

Copy files

Copies each requested file next to its original. Provide an organizationId and up to 100 unique fileIds. The endpoint returns no content.

Permissions

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

Who may call it

  • The caller must have organization access and the drive.insert permission.
  • For assigned-only drive access, each found file must be inside a folder shared with the caller.

Request

Path parameters

  • organizationIdidrequired

Body

Content-Type: application/json

  • fileIdsid[]required

    at most 100 items

Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request POST 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/misc/drive/copy' \
  --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

  • Inserts a driveFiles record for each copy.
  • Updates contentUpdatedAt on the copies' folders and their ancestor folders, when present.

Errors

Other errors

StatusErrorWhen
403You can only work inside folders shared with youReturns 403 with key misc.drive.sharedFoldersOnly if assigned-only drive access does not allow work in a requested file's folder.
404The file was not foundReturns 404 with key routes.misc.drive.noFile if any requested file is not found in the organization.
404The file was not foundReturns 404 with key routes.misc.drive.noFile if a file's stored resource cannot be copied.

Errors nearly every request can meet are listed under Errors.