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

# Remove Permissions

Use this API to remove permissions from a user for specific resources like organizations or documents.

> [!NOTE]
>
> This endpoint allows you to revoke access for a user from one or more resources.

# Endpoint

`POST https://api.velt.dev/v2/auth/permissions/remove`

# Headers

**x-velt-api-key** `string` *required*

Your API key.

**x-velt-auth-token** `string` *required*

Your [Auth Token](https://velt.dev/docs/security/auth-tokens.md).

# Body

#### Params

**data** `object` *required*

**properties**

**userId** `string` *required*

The ID of the user from whom to remove permissions.

**permissions** `object` *required*

**properties**

**resources** `object[]` *required*

An array of resource objects from which to remove user permissions.

**Resource object**

**type** `string` *required*

The type of resource. Must be one of: `organization`, `document`, or `folder`.

**id** `string` *required*

The ID of the resource.

**organizationId** `string`

The ID of the organization. Required if `type` is `document`.

## **Example Requests**

#### Remove permissions from an organization and a document

```JSON theme={null}
{
  "data": {
    "userId": "USER_ID",
    "permissions": {
      "resources": [
        {
          "type": "organization",
          "id": "ORGANIZATION_ID"
        },
        {
          "type": "document",
          "id": "DOCUMENT_ID",
          "organizationId": "ORGANIZATION_ID"
        }
      ]
    }
  }
}
```

# Response

#### Success Response

```JSON theme={null}
{
  "result": {
    "status": "success",
    "message": "Permissions removed successfully."
  }
}
```

#### Failure Response

```JSON theme={null}
{
  "error": {
    "message": "ERROR_MESSAGE",
    "status": "INVALID_ARGUMENT"
  }
}
```

```js theme={null}
{
  "result": {
    "status": "success",
    "message": "Permissions removed successfully."
  }
}
```


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