Skip to main content
POST
/
invite-users
Invite admin / merchant-team or coaching users
curl --request POST \
  --url https://cool.jobmojito.com/functions/v1/invite-users \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "users": [
    {
      "email": "hello@google.com",
      "name": "mr. Brown",
      "type": "merchant",
      "interview_id": "d1c00b60-7e75-4292-9190-7037b95b349a"
    }
  ],
  "force_invite": false,
  "merchant_id": "28106cba-1c27-4e53-b149-32113e5e8e31",
  "mojito_language_code": "en",
  "message_from_recruiter": "<string>"
}
'
[
  {
    "email": "<string>",
    "name": "<string>",
    "type": "<string>",
    "interview_id": "<string>",
    "result": "<string>",
    "profile_id": "<string>",
    "profile_interview_id": "<string>"
  }
]

Authorizations

Authorization
string
header
required

Supabase JWT access token, passed as Authorization: Bearer <token>.

Body

application/json
users
object[]
required

List of users to invite.

force_invite
boolean | null

When true, re-sends the invite email for still-pending (invited) profiles that did not otherwise produce a result.

Example:

false

merchant_id
string<uuid> | null

Target merchant id. Required when calling with a service-role key. For admins / sub-merchant users it overrides the JWT merchant.

Example:

"28106cba-1c27-4e53-b149-32113e5e8e31"

mojito_language_code
enum<string> | null

Language code applied to created profiles (one of the platform-languages.json codes). Defaults to 'en' when omitted.

Available options:
ar,
bg,
zh,
hr,
cs,
da,
nl,
en,
fil,
fi,
fr,
de,
el,
hi,
hu,
id,
it,
ja,
ko,
ms,
no,
pl,
pt,
br,
ro,
ru,
sk,
es,
sv,
ta,
th,
tr,
uk,
vi
Example:

"en"

message_from_recruiter
string | null

Optional custom message included in the invitation email.

Response

The users array with per-item invitation results.

email
string
required
name
string | null
type
string | null
interview_id
string | null
result
string

Outcome, e.g. 'Invited', 'Activated', 'SubMerchantAdded', 'Skipped', or 'Error: '.

profile_id
string | null
profile_interview_id
string | null
{key}
unknown