Team
Invite Team Member
Invite a human to the workspace team by email — sends the same invitation as the in-app flow.
POST
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:
Requirements:
status | What happened |
|---|---|
invite_created | An invitation email was sent; the invite appears in GET /team until accepted |
member_added | The email belongs to an existing OpenTrain account — they were added to the team directly, no email round-trip |
already_member | Already on the team; nothing changed |
team:write scope + the public_api_team feature + a claimed account (unclaimed accounts get 403 with details.reason: "account_claim_required" and a claimUrl).
Request
Email address to invite. Must be a valid email.
Response
true on success.invite_created, member_added, or already_member (see the table above).The email that was invited.
The refreshed team record — same shape as
GET /team — so you can confirm the new member or pending invite without a second call.Errors
| Status | code | Meaning |
|---|---|---|
400 | BAD_REQUEST | Body missing/not valid JSON, email invalid (details.issues), or the invite was rejected by validation (details.email) |
401 | UNAUTHORIZED | Missing or invalid token |
403 | FORBIDDEN | Missing 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) |
409 | CONFLICT | The invitation email could not be sent (details.reason: "invite_email_send_failed") — retry later |