Candidate invitations consume merchant interview credits. Each user is processed independently — one failing user returns an Error: … result for that row while the others still succeed.
POST /invite-users invites people to the merchant and can attach candidates to an interview. It also supports mentor, merchant, and merchant_owner types.
curl -X POST https://cool.jobmojito.com/functions/v1/invite-users \ -H "Authorization: Bearer $SUPABASE_JWT" \ -H "Content-Type: application/json" \ -d '{ "users": [ { "name": "Peter Parker", "email": "peter@parker.com", "type": "candidate", "interview_id": "9c1b…e4f2" } ], "message_from_recruiter": "We'd love you to complete this short interview." }'
For type: "candidate", interview_id is required. Optional: force_invite (resend pending invites), mojito_language_code (defaults en), and message_from_recruiter. Each user comes back with a result such as Invited, Activated, Skipped, or Error: ….