> ## Documentation Index
> Fetch the complete documentation index at: https://docs.claap.io/llms.txt
> Use this file to discover all available pages before exploring further.

# Revoke folder access

> Remove the direct access of users, the access of user groups and the pending invites of emails to a folder.

Removes the direct access of users (`userIds`), the access of user groups (`userGroupIds`) and the pending invites of emails (`emails`) to a folder, as listed by the [get folder access](https://docs.claap.io/api-reference/endpoint/get_folder_access.md) endpoint. Nobody is notified.

The member and public link permissions are not changed, so a user may keep access through them or through a group. The last user with `FullAccess` cannot be removed while `memberPermission` is not `FullAccess`: the users of the request are removed together, so when this rule blocks them, none of them is removed and each gets the `failed` outcome.

Each entry gets its own `outcome`, so one entry that fails does not stop the others:

* `revoked`: the access or pending invite was removed.
* `failed`: the entry could not be applied, for instance the user has no direct access to the folder, the user group has no access to it, or the email has no pending invite. `error` explains why.

API keys without access to private recordings cannot access folders whose `memberPermission` is `NoAccess`: they are reported as not found.


## OpenAPI

````yaml POST /v1/folders/{folderId}/access/revoke
openapi: 3.1.0
info:
  title: Claap API
  description: Development documentation
  version: 0.0.0
servers:
  - url: https://api.claap.io/
security:
  - ApiKey: []
paths:
  /v1/folders/{folderId}/access/revoke:
    post:
      description: >-
        Remove the direct access of users, the access of user groups and the
        pending invites of emails to a folder.
      operationId: postV1FoldersByFolderIdAccessRevoke
      parameters:
        - in: path
          name: folderId
          schema:
            type: string
            description: Folder identifier
          required: true
      requestBody:
        content:
          application/json:
            schema:
              type: object
              properties:
                userIds:
                  type: array
                  maxItems: 50
                  default: []
                  items:
                    type: string
                  description: >-
                    Users whose direct access to the folder is removed, as the
                    `userId` returned by the get folder access endpoint.
                userGroupIds:
                  type: array
                  maxItems: 50
                  default: []
                  items:
                    type: string
                  description: User groups whose access to the folder is removed.
                emails:
                  type: array
                  maxItems: 50
                  default: []
                  items:
                    type: string
                  description: Emails whose pending invite to the folder is removed.
      responses:
        '200':
          description: Access was processed, see the outcome of each entry
          content:
            application/json:
              schema:
                type: object
                properties:
                  result:
                    type: object
                    properties:
                      results:
                        type: array
                        description: >-
                          One outcome per entry, in the order users, user
                          groups, then emails for a revoke.
                        items:
                          $ref: '#/components/schemas/ApiAccessOutcome'
                    required:
                      - results
                required:
                  - result
        '400':
          description: >-
            The request is not valid. For instance a list has more than 50
            entries.
        '404':
          description: >-
            Folder was not found. Note that API keys without access to private
            recordings cannot access folders whose `memberPermission` is
            `NoAccess`, which are reported as not found.
components:
  schemas:
    ApiAccessOutcome:
      type: object
      properties:
        userId:
          type: string
          description: Set when the entry resolved to a workspace user.
        email:
          type: string
          description: Email of the entry, when it has one.
        userGroupId:
          type: string
          description: Set for a user group entry.
        outcome:
          type: string
          enum:
            - granted
            - updated
            - invited
            - revoked
            - failed
          description: >-
            `granted` when access was added, `updated` when the permission of an
            existing access was set, `invited` when a pending invite was created
            for an email that is not a workspace user yet, `revoked` when access
            was removed, `failed` when this entry could not be applied.
        error:
          type: string
          description: Why the entry failed, set only when the outcome is `failed`.
      required:
        - outcome
  securitySchemes:
    ApiKey:
      type: apiKey
      in: header
      name: X-Claap-Key

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.