Skip to content

Invite users by email

POST
/cohorts/{id}/participants/emails
curl --request POST \
--url https://api.retorio.com/be/v2/cohorts/b2d7e4a1_55c3_4f28_9e10_7a3d6c4b8f02/participants/emails \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '{ "emails": [ "maria.schmidt@customer.example", "j.tan@customer.example" ], "language": "en-US" }'

Adds each address to an email-type cohort and sends an invitation email, in one call. An address that already exists in your organization is added to this cohort rather than duplicated, and a previously deleted user is restored into this cohort. Only users who have not signed up yet are emailed, and an existing one only if they are not disabled and their last invitation is more than 24 hours old. Not idempotent: an address that is already in this cohort fails the whole call with 400, so diff against the participant list before re-sending a batch. Invitations expire after 60 days: the coaching app then refuses to start sign-up.

Auth
Access key
Roles
Owner / Admin / Custom
id
required
string

Example

b2d7e4a1_55c3_4f28_9e10_7a3d6c4b8f02
Media typeapplication/json
object
emails
required

List of emails to invite into cohort

Array<string>
>= 1 items <= 200 items

Example

[
"maria.schmidt@customer.example",
"j.tan@customer.example"
]
language
required
string
Allowed values: en-US fr-FR de-DE es-ES it-IT pt-PT cs-CZ ru-RU el-GR nl-NL bg-BG ko-KR tr-TR pl-PL

Invited

The request body is not valid, the cohort is not of type email, or one or more addresses are not allowed in this cohort (already in it, belongs to an admin account, or belongs to another organization). Nothing is changed in those cases. A 400 can also come after changes were made, when restoring a previously deleted user fails part-way. Also answered when the request body is not valid JSON.

Media typeapplication/json
Any of:
object
message
required
string
status
required

Canonical error name, e.g. INVALID_ARGUMENT.

string
details
nullable

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.

Media typeapplication/json
object
message
required
string
status
required

Canonical error name, e.g. INVALID_ARGUMENT.

string
details
nullable

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 coaching-users:manage.

Media typeapplication/json
Any of:
object
message
required
string
status
required

Canonical error name, e.g. INVALID_ARGUMENT.

string
details
nullable

Example generated

{
"message": "example",
"status": "example",
"details": "example"
}

No cohort with this id in your organization.

Media typeapplication/json
object
message
required
string
status
required

Canonical error name, e.g. INVALID_ARGUMENT.

string
details
nullable

Example generated

{
"message": "example",
"status": "example",
"details": "example"
}

The request body is larger than 10 MB.

Media typeapplication/json
object
statusCode
required
integer
message
required
string
error
required

The HTTP reason phrase, e.g. Bad Request.

string

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.

Media typeapplication/json
object
statusCode
required
integer
message
required
string
error
required

The HTTP reason phrase, e.g. Bad Request.

string

Example generated

{
"statusCode": 1,
"message": "example",
"error": "example"
}

Internal Server Error

Media typeapplication/json
object
key
additional properties
nullable

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.