Use this API to remove permissions from a user for specific resources like organizations or documents.
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
Body
Params
The ID of the user from whom to remove permissions.
An array of resource objects from which to remove user permissions.
type
'organization' | 'document' | 'folder'
required
The type of resource.
The ID of the organization. Required if type is document.
Example Requests
Remove permissions from an organization and a document
{
"data": {
"userId": "USER_ID",
"permissions": {
"resources": [
{
"type": "organization",
"id": "ORGANIZATION_ID"
},
{
"type": "document",
"id": "DOCUMENT_ID",
"organizationId": "ORGANIZATION_ID"
}
]
}
}
}
Response
Success Response
{
"result": {
"status": "success",
"message": "Permissions removed successfully."
}
}
Failure Response
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
{
"result": {
"status": "success",
"message": "Permissions removed successfully."
}
}