Skip to main content

Get All Enrolled Users

This endpoint allows you to list all users enrolled in a specific group quest. The response is paginated using limit/offset pagination. To see more details about pagination, refer to the Pagination documentation.

To check if a particular user is enrolled, consider using the Get Enrolled User endpoint.

API Endpoint​

GET /group-quests/{questId}/enrolled-users

Headers​

Include your API_KEY in the request header for authentication. The required header format is:

API_KEY: your-api-key-here

Query Parameters​

ParameterDescriptionRequired
offsetThe number of items to skip before starting to collect the result setNo
limitThe maximum number of items to returnNo

Path Parameters​

ParameterDescription
questIdThe unique ID of the quest in YGG's system.

Example Request​

Here’s an example using curl to fetch the users enrolled in a group quest:

curl -X GET "https://api.example.com/group-quests/quest123/enrolled-users" \
-H "API_KEY: your-api-key-here"

This request will fetch the first 100 users enrolled in the quest with questId set to "quest123".

Responses​

Success Response (200)​

If the request is successful, you will receive a 200 response with the following body:

{
"success": true,
"data": [
{
"yggUserId": "unique-user-id-1",
"email": "user-1@example.com"
},
{
"yggUserId": "unique-user-id-2",
"email": "user-2@example.com"
}
],
"pagination": {
"limit": 250,
"offset": 0,
"nextPage": null,
"previousPage": null
}
}

Error Response (400)​

If the request contains an error, such as an invalid questId or missing authentication, you will receive a 400 response with the following body:

{
"success": false,
"message": "Description of the error"
}