Users
Delete Users
Remove Users from an Organization or a Document.
POST
/
Use this API to remove Users from:
- Organization: This will remove their access from all the documents and data in the organization. It will also remove these users from the contact list of the organization.
- Document: This will remove their access from the specified document. It will also remove these users from the contact list of the document. If you pass the
documentId
, then the users will be removed from the document.
Endpoint
https://deleteusers.api.velt.dev
Headers
x-velt-api-key
string
requiredYour API key.
x-velt-auth-token
string
requiredYour Auth Token.
Body Example
Params
data
object
requiredExample Requests
1. Delete users in a specific organization
{
"data": {
"organizationId": "yourOrganizationId",
"userIds": [
"yourUserId1"
]
}
}
2. Delete users in a specific document within an organization
{
"data": {
"organizationId": "yourOrganizationId",
"documentId": "yourDocumentId",
"userIds": [
"yourUserId1"
]
}
}
Response
Success Response
{
"result": {
"status": "success",
"message": "User(s) deleted successfully.",
"data": {
"yourUserId1": {
"success": true,
"message": "User removed."
}
}
}
}
User(s) Not Found
{
"result": {
"status": "success",
"message": "User(s) deleted successfully.",
"data": {
"yourUserId1": {
"success": true,
"message": "User removed."
},
{
"yourUserId2": {
"success": false,
"message": "User does not exist."
}
}
}
}
Failure Response
{
"error": {
"message": "ERROR_MESSAGE",
"status": "INVALID_ARGUMENT"
}
}
Was this page helpful?