GETapi.synup.com/api/v4/users-by-ids
List Users by ID
This API retrieves user details for one or more specified user IDs in a single request.
Behavior:
- Supports fetching multiple users by providing a list of user IDs.
- Returns detailed user information, including role, status, and attributes.
Requires an API key. Send it as
Authorization: API <your-key> — see Getting started.Parameters
Query
| Name | Type | Required | Description |
|---|---|---|---|
userIds | array | required | Array of user IDs to fetch details for |
Request
Request
curl -X GET 'https://api.synup.com/api/v4/users-by-ids?userIds=' \
-H 'Authorization: API YOUR_API_KEY' \
-H 'Content-Type: application/json'const res = await fetch('https://api.synup.com/api/v4/users-by-ids?userIds=', {
method: 'GET',
headers: {
Authorization: 'API YOUR_API_KEY',
'Content-Type': 'application/json',
},
});
const data = await res.json();import requests
res = requests.get(
"https://api.synup.com/api/v4/users-by-ids?userIds=",
headers={
"Authorization": "API YOUR_API_KEY",
"Content-Type": "application/json",
},
)
data = res.json()req, _ := http.NewRequest("GET", "https://api.synup.com/api/v4/users-by-ids?userIds=", nil)
req.Header.Set("Authorization", "API YOUR_API_KEY")
req.Header.Set("Content-Type", "application/json")
res, err := http.DefaultClient.Do(req)Responses
| Status | Description |
|---|---|
200 | Successfully retrieved user details |
400 | Bad Request - Invalid user IDs format |
401 | Unauthorized - Valid API key required |
Example response
{
"data": {
"usersByIds": [
{
"id": "VXNlcjoxNjUyMDY=",
"firstName": "user",
"lastName": "user",
"email": "subasrisridhar879+1@gmail.com",
"customRole": {
"id": "Q3VzdG9tUm9sZTo0NDUyMg==",
"name": "Admin"
},
"directCustomer": true,
"createdAt": "2025-02-02 06:57:41 UTC",
"inviteStatus": "RESEND_INVITE",
"preferences": {
"locale": "en-US",
"dateFormat": null,
"timezone": null
}
}
]
}
}Response body
| Name | Type | Required | Description |
|---|---|---|---|
data | object | optional | |
data.usersByIds | array of object | optional | |
data.usersByIds[].id | string | required | Unique identifier for the user |
data.usersByIds[].firstName | string | required | User's first name |
data.usersByIds[].lastName | string | optional | User's last name |
data.usersByIds[].email | string | required | User's email address |
data.usersByIds[].customRole | object | required | |
data.usersByIds[].customRole.id | string | optional | Role identifier |
data.usersByIds[].customRole.name | string | optional | Role name |
data.usersByIds[].directCustomer | boolean | required | Indicates if the user is a direct customer |
data.usersByIds[].createdAt | string | required | Timestamp when the user was created |
data.usersByIds[].inviteStatus | string | required | Current status of the user's invitationACTIVEINVITE_SENTRESEND_INVITE |
data.usersByIds[].preferences | object | optional | |
data.usersByIds[].preferences.locale | string | optional | User's locale preference |
data.usersByIds[].preferences.dateFormat | string | optional | User's preferred date format |
data.usersByIds[].preferences.timezone | string | optional | User's timezone preference |