Skip to content
campaiDeveloper
campai.com

Misc · Drive

GET/{organizationId}/misc/drive/folders/{folderId}Reads only

Get folder

Gets a folder by organization ID and folder ID, including its totals and preview files. Returns its direct and inherited shares only when the caller has unrestricted drive.read access.

Permissions

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

Who may call it

  • Requires organization authentication.
  • Callers with drive.read access that is not assigned-only can view the folder. Other callers can view it only if it is shared with them.
  • Actor details are protected using user.read. Non-contact actors other than the current actor are masked without it.
  • API actor details are masked without apiKey.read. A non-current API actor is also masked without user.read.
  • Legacy contact.read also allows contact actor details to be shown.

Request

Path parameters

  • organizationIdidrequired
  • folderIdidrequired
Request
curl --fail-with-body --silent --show-error --max-time 30 --globoff \
  --request GET 'https://cloud.campai.com/api/YOUR_ORGANIZATION_ID/misc/drive/folders/YOUR_FOLDER_ID' \
  --header 'X-API-Key: YOUR_API_KEY'

Response

200 Successful response

Content-Type: application/json

  • folderobject
    14 properties
    • _idid
    • parentidnullable
    • namestring

      1–128 characters

    • colorstring
      22 values
      slate gray zinc neutral stone red orange amber yellow lime green emerald teal cyan sky blue indigo violet purple fuchsia pink rose
    • coverFileidnullable
    • contentUpdatedAtstring · date-time
    • createdAtstring · date-timenullable
    • createdByobjectnullable
    • fileCountinteger

      at least 0

    • folderCountinteger

      at least 0

    • sizeBytesnumber

      at least 0

    • shareCountinteger

      at least 0

    • peekFilesobject[]
      14 properties
      • _idid
      • folderidnullable
      • namestring

        1–128 characters

      • kindstring
        image video audio pdf word excel powerpoint text archive other
      • fileobject
        4 properties
        • resourcestring

          at least 1 characters

        • fileNamestring

          at most 128 characters

        • contentTypestring

          at most 75 characters

        • fileSizeBytesinteger

          at least 0

      • thumbnailobjectnullable
        4 properties
        • resourcestring

          at least 1 characters

        • fileNamestring

          at most 128 characters

        • contentTypestring

          at most 75 characters

        • fileSizeBytesinteger

          at least 0

      • widthintegernullable
      • heightintegernullable
      • durationSecondsnumbernullable

        at least 0

      • waveformnumber[]nullable

        at most 96 items · each 0–1

      • createdAtstring · date-timenullable
      • createdByobjectnullable
      • updatedAtstring · date-timenullable
      • updatedByobjectnullable
    • coverobjectnullable
      14 properties
      • _idid
      • folderidnullable
      • namestring

        1–128 characters

      • kindstring
        image video audio pdf word excel powerpoint text archive other
      • fileobject
        4 properties
        • resourcestring

          at least 1 characters

        • fileNamestring

          at most 128 characters

        • contentTypestring

          at most 75 characters

        • fileSizeBytesinteger

          at least 0

      • thumbnailobjectnullable
        4 properties
        • resourcestring

          at least 1 characters

        • fileNamestring

          at most 128 characters

        • contentTypestring

          at most 75 characters

        • fileSizeBytesinteger

          at least 0

      • widthintegernullable
      • heightintegernullable
      • durationSecondsnumbernullable

        at least 0

      • waveformnumber[]nullable

        at most 96 items · each 0–1

      • createdAtstring · date-timenullable
      • createdByobjectnullable
      • updatedAtstring · date-timenullable
      • updatedByobjectnullable
  • sharesobject[]

    shares is empty without drive.read access that is not assigned-only.

    5 properties
    • typestring
      user contact segment contactType team
    • idstring

      1–64 characters

    • namestring

      1–200 characters

    • accessstring
      view add submit
    • hasConnectAccessboolean
  • inheritedSharesobject[]

    inheritedShares is empty without drive.read access that is not assigned-only.

    6 properties
    • typestring
      user contact segment contactType team
    • idstring

      1–64 characters

    • namestring

      1–200 characters

    • accessstring
      view add submit
    • hasConnectAccessboolean
    • viaobject
      2 properties
      • _idid
      • namestring

        1–128 characters

Response200
{
  "folder": {
    "_id": "000000000000000000000001",
    "parent": "000000000000000000000001",
    "name": "string",
    "color": "slate",
    "coverFile": "000000000000000000000001",
    "contentUpdatedAt": "2026-06-15T22:30:00Z",
    "fileCount": 0,
    "folderCount": 0,
    "sizeBytes": 0,
    "shareCount": 0,
    "peekFiles": [
      {
        "_id": "000000000000000000000001",
        "folder": "000000000000000000000001",
        "name": "string",
        "kind": "image",
        "file": {
          "resource": "string"
        },
        "thumbnail": {
          "resource": "string"
        },
        "width": 1,
        "height": 1,
        "durationSeconds": 0,
        "waveform": [
          0
        ]
      }
    ],
    "cover": {
      "_id": "000000000000000000000001",
      "folder": "000000000000000000000001",
      "name": "string",
      "kind": "image",
      "file": {
        "resource": "string"
      },
      "thumbnail": {
        "resource": "string"
      },
      "width": 1,
      "height": 1,
      "durationSeconds": 0,
      "waveform": [
        0
      ]
    }
  },
  "shares": [
    {
      "type": "user",
      "id": "string",
      "name": "string",
      "access": "view",
      "hasConnectAccess": true
    }
  ],
  "inheritedShares": [
    {
      "type": "user",
      "id": "string",
      "name": "string",
      "access": "view",
      "hasConnectAccess": true,
      "via": {
        "_id": "000000000000000000000001",
        "name": "string"
      }
    }
  ]
}

Errors

Other errors

StatusErrorWhen
404The folder was not foundReturns 404 NOT_FOUND with routes.misc.drive.noFolder if the folder does not exist in the organization.
404The folder was not foundReturns 404 NOT_FOUND with routes.misc.drive.noFolder if the caller lacks unrestricted drive.read access and the folder is not shared with them.

Errors nearly every request can meet are listed under Errors.