Employees
List the employees of the agency
/v1/employeesLists the active members of the agency. Employees are agency-level: the creator scope of the key does not apply. Use this endpoint to resolve the employee ids returned by assignments and attributions.
read:employeescurl 'https://api.fansquare.so/v1/employees' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste"{
"data": [
{
"id": "ki9DZXxpgGz7KiDqHj88eCxHg56W",
"username": "sam_chat",
"role": "chatter",
"role_name": "string"
}
]
}Parameters
Headers
Fansquare-VersionstringrequiredAPI version to pin. Accepts the mineral name or the release date of a version.
Response
OK, application/json
dataarray of objectsrequiredidstringrequiredFansquare user id, referenced by
assigned_user_idandattribution.user_id.usernamestring | nullrequiredDisplay name.
rolestring | nullrequiredBase role of the member:
owner,admin(also the Associate and the custom roles built on Admin), orchatter(the custom roles built on Chatter).Valueschatteradminownerrole_namestring | nullrequiredName of the agency role assigned to the member, as shown in the Fansquare settings (the built-in roles carry their French name, such as
Administrateur). Tells apart two employees with the same username. Null when the member has no agency role, like the owner.
curl 'https://api.fansquare.so/v1/employees' \
-H "Authorization: Bearer $API_KEY" \
-H "Fansquare-Version: Amethyste"{
"data": [
{
"id": "ki9DZXxpgGz7KiDqHj88eCxHg56W",
"username": "sam_chat",
"role": "chatter",
"role_name": "string"
}
]
}