Create a cohort
const url = 'https://api.retorio.com/be/v2/cohorts';const options = { method: 'POST', headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'}, body: '{"name":"Sales onboarding 2026","type":"email","isForBenchmarking":true}'};
try { const response = await fetch(url, options); const data = await response.json(); console.log(data);} catch (error) { console.error(error);}curl --request POST \ --url https://api.retorio.com/be/v2/cohorts \ --header 'Authorization: Bearer <token>' \ --header 'Content-Type: application/json' \ --data '{ "name": "Sales onboarding 2026", "type": "email", "isForBenchmarking": true }'Creates an empty cohort. type is fixed for the lifetime of the cohort: create an email cohort to invite users by address, or a token cohort to generate anonymous access tokens.
Authentication
Section titled “Authentication”- Auth
- Access key
- Roles
- Owner / Admin / Custom
Request Bodyrequired
Section titled “Request Bodyrequired”object
The name of the cohort.
Example
Sales onboarding 2026Whether this cohort is used for benchmark profiling. Programs are assigned to it like any other cohort, and its coaching users’ attempts in them feed the benchmark profiles.
Responses
Section titled “Responses”Created
object
Example generated
{ "extId": "example", "name": "example", "createdAt": "2026-04-15T12:00:00Z"}The request body is not valid. Also answered when the request body is not valid JSON.
object
Canonical error name, e.g. INVALID_ARGUMENT.
object
The HTTP reason phrase, e.g. Bad Request.
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:manage.
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"}The request body is larger than 10 MB.
object
The HTTP reason phrase, e.g. Bad Request.
Example generated
{ "statusCode": 1, "message": "example", "error": "example"}The Content-Type charset or the Content-Encoding is one the API cannot decode. Send UTF-8 JSON without a content encoding.
object
The HTTP reason phrase, e.g. Bad Request.
Example generated
{ "statusCode": 1, "message": "example", "error": "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.