POST
/
v2
/
authentication
/
permissions
/
remove
Remove Permissions
curl --request POST \
  --url https://api.velt.dev/v2/authentication/permissions/remove \
  --header 'Content-Type: application/json' \
  --header 'x-velt-api-key: <x-velt-api-key>' \
  --header 'x-velt-auth-token: <x-velt-auth-token>' \
  --data '{
  "data": {
    "userId": "<string>",
    "permissions": {
      "resources": [
        {
          "type": {},
          "id": "<string>",
          "organizationId": "<string>"
        }
      ]
    }
  }
}'
{
  "result": {
    "status": "success",
    "message": "Permissions removed successfully."
  }
}
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/authentication/permissions/remove

Headers

x-velt-api-key
string
required
Your API key.
x-velt-auth-token
string
required

Body

Params

data
object
required

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."
  }
}