Invite email addresses to join an organization
POST/api/orgs/{org}/invites
createOrgInvite
Takes 1 to 50 addresses and one role, and answers per address. Each new invite is single-use and its accept link is mailed to the address; the token is never returned to the inviter (ADR 0164): only a signed-in account holding the address verified can accept, and the membership it grants is bound to the address. Per-address outcomes: `invited`, `mail_failed` (created but not sent — resend it), `already_invited` (an open invite exists; resend rotates it), `already_has_access` (a membership bound to the address already holds the role or more), `invalid`, and `rate_limited` (the inviting account's mail budget is spent). Entries are trimmed and case-folded, never split; duplicates are dropped. 400 for an empty list or more than 50 entries. The deprecated single `email` field is still accepted in place of `emails`; both or neither is a 422.
Requires authentication using a bearer token or a session cookie — see tokens and scopes.
curl
curl -X POST 'https://neosource.dev/api/orgs/ORG/invites' \
-H 'Authorization: Bearer $NEOSOURCE_TOKEN' \
-H 'Content-Type: application/json' \
-d '{}'fetch
fetch("https://neosource.dev/api/orgs/ORG/invites", {
method: "POST",
headers: {
Authorization: "Bearer $NEOSOURCE_TOKEN",
"Content-Type": "application/json",
},
body: JSON.stringify({}),
});Path parameters
orgrequiredOrganization slug.
Request bodyrequired
application/json
Responses
200One result per distinct address
application/json
403Forbidden — one of: forbidden, needs_scope
application/json
Standard errors
Bodies documented once for the whole API — see standard errors.
- 400Bad Request — one of: invalid_input
- 401Authentication required
- 404Not Found — one of: not_found
- 409Conflict — one of: already_exists, conflict
- 429Rate limited — retry after the `Retry-After` header
- 500Internal server error
- 503Service temporarily unavailable / at capacity — retry after the `Retry-After` header
- 504Gateway timeout — the request exceeded the server's handling budget
Schemas
Referenced above. Listed here rather than expanded inline, so the same definition is not repeated at every level.
InviteOutcome
Per-address outcome of an invite batch, on the wire (ADR 0164).
"invited""mail_failed""already_invited""already_has_access""invalid""rate_limited"