List a cohort’s participants
const url = 'https://api.retorio.com/be/v2/cohorts/b2d7e4a1_55c3_4f28_9e10_7a3d6c4b8f02/participants';const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request GET \ --url https://api.retorio.com/be/v2/cohorts/b2d7e4a1_55c3_4f28_9e10_7a3d6c4b8f02/participants \ --header 'Authorization: Bearer <token>'Lists the participants of one cohort. For a token cohort, each row carries the generated token and its status. For an email cohort, token and status are both null (use emailParticipants below for the full email-invite status instead). Add onlyTokens and onlyAvailableTokens (presence of the query param is enough, any value) to keep only tokens with status AVAILABLE, so not redeemed and not reserved (onlyAvailableTokens has no effect without onlyTokens), and format=xlsx with both of those to download that list as a spreadsheet instead of JSON.
Authentication
Section titled “Authentication”- Auth
- Access key
- Roles
- Owner / Admin / Custom
Parameters
Section titled “Parameters”Path Parameters
Section titled “Path Parameters”Example
b2d7e4a1_55c3_4f28_9e10_7a3d6c4b8f02Query Parameters
Section titled “Query Parameters”Presence flag: the filter is on whenever the key is present, whatever its value (false included).
Presence flag: the filter is on whenever the key is present, whatever its value (false included).
Presence flag: the filter is on whenever the key is present, whatever its value (false included).
Presence flag: the filter is on whenever the key is present, whatever its value (false included).
xlsx, sent together with onlyTokens and onlyAvailableTokens, returns the list as a spreadsheet instead of JSON. Ignored otherwise.
xlsx, sent together with onlyTokens and onlyAvailableTokens, returns the list as a spreadsheet instead of JSON. Ignored otherwise.
Responses
Section titled “Responses”The participants as JSON. With format=xlsx and both token filters, an xlsx file instead (Content-Type: application/vnd.openxmlformats-officedocument.spreadsheetml.sheet, downloaded as tokens.xlsx, one Tokens column).
object
The participant’s user ext id.
The user’s access token in a token cohort, null in an email cohort.
USED once the token is redeemed, AVAILABLE while it is not, and RESERVED for an unredeemed token held by a reservation that has not expired. null in an email cohort.
Example
[ { "status": "USED" }]A query parameter is not valid, for example one sent more than once.
object
Canonical error name, e.g. INVALID_ARGUMENT.
Example generated
{ "message": "example", "status": "example", "details": "example"}Not authenticated: the bearer token is missing, malformed, expired or revoked, its sign-in method does not match your organization’s configuration, the user it belongs to was removed, or your organization is deactivated.
object
Canonical error name, e.g. INVALID_ARGUMENT.
Example generated
{ "message": "example", "status": "example", "details": "example"}Refused: the token does not belong to an admin, or your organization does not have the coaching product, or the admin’s roles do not grant cohorts:view.
object
Canonical error name, e.g. INVALID_ARGUMENT.
object
object
The HTTP reason phrase, e.g. Bad Request.
Example generated
{ "message": "example", "status": "example", "details": "example"}No cohort with this id in your organization.
object
Canonical error name, e.g. INVALID_ARGUMENT.
Example generated
{ "message": "example", "status": "example", "details": "example"}Internal Server Error
object
Example generated
{ "additionalProperty": "example"}Retorio is GDPR and DSGVO compliant, EU AI Act aligned, ISO 27001 certified, and hosted on Google Cloud with EU data residency. For anything specific to your rollout, ask your Retorio contact.