Skip to content
OpenTrain AIOpenTrain AIOpenTrain AIDocs

Ask OpenTrain

Answers from the documentation, with sources.

What would you like to do with OpenTrain?

AI answers can be mistaken. Check the linked sources. Don’t include private account information.

Open app

DEVELOPER DOCUMENTATION

Invite Team Member

Invite a human to the workspace team by email — sends the same invitation as the in-app flow.

POST/api/public/v1/team/invites

Invites a human to the employer team by email, giving them shared access to the account’s jobs and team inbox once they accept. This sends the same invitation email as the in-app flow.

The outcome depends on the email:

statusWhat happened
invite_createdAn invitation email was sent; the invite appears in GET /team until accepted
member_addedThe email belongs to an existing OpenTrain account — they were added to the team directly, no email round-trip
already_memberAlready on the team; nothing changed

Requirements: team:write scope + the public_api_team feature + a claimed account (unclaimed accounts get 403 with details.reason: "account_claim_required" and a claimUrl).

emailstringbodyrequired

Email address to invite. Must be a valid email.

okboolean

true on success.

statusstring

invite_created, member_added, or already_member (see the table above).

emailstring

The email that was invited.

teamobject

The refreshed team record — same shape as GET /team — so you can confirm the new member or pending invite without a second call.

StatuscodeMeaning
400BAD_REQUESTBody missing/not valid JSON, email invalid (details.issues), or the invite was rejected by validation (details.email)
401UNAUTHORIZEDMissing or invalid token
403FORBIDDENMissing team:write, public_api_team disabled, employer teams not enabled (details.reason: "teams_not_enabled"), or account not claimed (details.reason: "account_claim_required", details.claimUrl)
409CONFLICTThe invitation email could not be sent (details.reason: "invite_email_send_failed") — retry later