Skip to content

List User Assignments

This endpoint returns project and task assignments for one or more users, grouped by user ID.

GET /v1/user-assignments/user-assignments

Include your API key in the x-api-key header. See Authentication.

user-assignments:read
ParameterTypeRequiredDescription
userIdstring | string[]NoOne user ID, a repeated parameter, or a comma-separated list.
userIdsstring | string[]NoSame as userId. You can use either parameter, or both.

You must send at least one user ID through userId or userIds. This endpoint does not support paging or sorting.

This endpoint does not accept a request body.

Terminal window
curl "https://api.crewsum.com/v1/user-assignments/user-assignments?userIds=user-a,user-b" \
-H "x-api-key: $CREWSUM_API_KEY"

On success, the API returns HTTP 200 OK.

{
"message": "Successfully fetched user assignments",
"data": {
"assignmentsByUserId": {
"user-a": [
{
"id": "project-mno123pqr4567890",
"name": "Project Name",
"source": { "type": "direct" },
"groupSources": [],
"tasks": [
{
"id": "task-pqr123stu4567890",
"name": "Task Name",
"source": { "type": "direct" },
"groupSources": []
}
]
}
],
"user-b": []
}
}
}
  • Crewsum combines the values of userId and userIds, splits them on commas, trims spaces, and removes duplicates.
  • Each key in assignmentsByUserId is a user ID exactly as you sent it, after trimming. Keys are not changed to lowercase.
  • Each value has the same shape as assignments on Get User Assignments, including assignments from user groups.
  • An unknown user ID returns an empty array. It is not an error.
StatusMeaning
400"At least one userId must be supplied": no user ID was sent.
500"Error fetching user assignments": the request failed.

Authentication and scope failures are described in Errors.

This endpoint does not trigger a webhook.