This API returns the list of all users in a project.
GET https://app.satismeter.com/api/users?project=PROJECT_ID
-
Replace
PROJECT_IDwith your project ID. You can find it in Integration settings > API.
Request headers:
Authorization: Bearer API_KEY
- Replace
API_KEYwith your real API key. You can find it in Integration settings > API.
Example response:
{
"users": [
{
"project": "5808e7031a943c7e564cdb16",
"userId": "007",
"lastSeen": "2016-12-01T00:00:00.000Z",
"traits": {
"email": "john@doe.com",
"name": "John Doe",
"createdAt": "2016-01-01T00:00:00.000Z"
},
"email": "john@doe.com",
"name": "John Doe",
"unsubscribed": false,
"created": "2016-01-01T00:00:00.000Z",
"id": "5808e7031a943c7e564cdb17"
}
]
}
Filtering results by userId
To find a specific user by userId (the ID you pass to the widget), add the userId query parameter to the URL.
GET https://app.satismeter.com/api/users?project=PROJECT_ID&userId=USER_ID
The API returns an array that contains only the user matching that userId.