Use this API to retrieve users based on various filters such as organization ID, document ID, organization user group IDs or user IDs. You can use these filters in various combinations to get the desired users. Some examples are shown below.
Use this for SDK v3 or prior versions.
Endpoint
POST https://api.velt.dev/v1/users/get
Body
Params
Array of User IDs. Limit: Only 30 items can be passed at a time.
Array of Organization User Group IDs. Only 30 items can be passed at a time.
Example Requests
1. Get users by organizationId
{
"data" : {
"organizationId" : "yourOrganizationId"
}
}
2. Get users by documentId within an organization
{
"data" : {
"organizationId" : "yourOrganizationId" ,
"documentId" : "yourDocumentId"
}
}
3. Get users by specific user IDs in an organization
{
"data" : {
"organizationId" : "yourOrganizationId" ,
"userIds" : [
"yourUserId1" ,
"yourUserId2"
]
}
}
4. Get users by specific user IDs in the given organization and document
{
"data" : {
"organizationId" : "yourOrganizationId" ,
"documentId" : "yourDocumentId" ,
"userIds" : [
"yourUserId1" ,
"yourUserId2"
]
}
}
5. Get users by organization and organization user group IDs
{
"data" : {
"organizationId" : "yourOrganizationId" ,
"organizationUserGroupIds" : [
"yourOrganizationUserGroupId"
]
}
}
6. Get users by organization, organization user group IDs and user IDs
{
"data" : {
"organizationId" : "yourOrganizationId" ,
"userIds" : [
"yourUserId1" ,
"yourUserId2"
],
"organizationUserGroupIds" : [
"yourOrganizationUserGroupId"
]
}
}
Response
Success Response
{
"result" : {
"status" : "success" ,
"message" : "User(s) retrieved successfully." ,
"data" : [
{
"email" : "userEmail@domain.com" ,
"name" : "userName" ,
"userId" : "yourUserId"
}
]
}
}
Failure Response
{
"error" : {
"message" : "Error retrieving user(s)." ,
"status" : "ERROR_CODE"
}
}
{
"result" : {
"status" : "success" ,
"message" : "User(s) retrieved successfully." ,
"data" : [
{
"email" : "userEmail@domain.com" ,
"name" : "userName" ,
"userId" : "yourUserId"
}
]
}
}