Use this API to update user metadata based on various filters such as organization ID, document ID, folder ID and user IDs.
You can use these filters in various combinations to get the desired results.
The user metadata such as name, email etc can be updated.
Endpoint
POST https://api.velt.dev/v1/users/update
Body
Params
Folder ID. Either provide documentId
or folderId
.
Example Requests
1. Update users in a specific organization
{
"data" : {
"organizationId" : "yourOrganizationId" ,
"users" : [
{
"userId" : "yourUserId1" ,
"name" : "User Name" ,
"email" : "user@email.com"
}
]
}
}
2. Update users in a specific document within an organization
{
"data" : {
"organizationId" : "yourOrganizationId" ,
"documentId" : "yourDocumentId" ,
"users" : [
{
"userId" : "yourUserId1" ,
"name" : "User Name" ,
"email" : "user@email.com"
}
]
}
}
3. Update users in a specific folder within an organization
{
"data" : {
"organizationId" : "yourOrganizationId" ,
"folderId" : "yourFolderId" ,
"users" : [
{
"userId" : "yourUserId1" ,
"name" : "User Name" ,
"email" : "user@email.com"
}
]
}
}
Response
Success Response
{
"result" : {
"status" : "success" ,
"message" : "User(s) processed successfully." ,
"data" : {
"yourUserId1" : {
"success" : true ,
"id" : "7d87015b055a168b098cf05b870e40ff" ,
"message" : "User updated."
}
}
}
}
Some User(s) Not Found
{
"result" : {
"status" : "success" ,
"message" : "User(s) processed successfully." ,
"data" : {
"yourUserId1" : {
"success" : true ,
"id" : "7d87015b055a168b098cf05b870e40ff" ,
"message" : "User updated."
},
"yourUserId2" : {
"success" : false ,
"id" : "ad22d93b49ad990d2b3d582d08d7768a" ,
"message" : "User does not exist."
}
}
}
}
Failure Response
{
"error" : {
"message" : "ERROR_MESSAGE" ,
"status" : "INVALID_ARGUMENT"
}
}
{
"result" : {
"status" : "success" ,
"message" : "User(s) processed successfully." ,
"data" : {
"yourUserId1" : {
"success" : true ,
"id" : "7d87015b055a168b098cf05b870e40ff" ,
"message" : "User updated."
}
}
}
}