Accept an invite — join the organization
POST/api/invites/{token}/accept
acceptOrgInvite
Session-authenticated caller only. Atomically: marks the invite accepted, creates the workspace_memberships row, auto-joins the default team. Returns the org details with the new viewer_role. 409 `already_exists` if the invite is no longer pending.
Requires authentication using a session cookie — see tokens and scopes.
curl
curl -X POST 'https://neosource.dev/api/invites/TOKEN/accept' \
-b 'ns_session=$NEOSOURCE_SESSION'fetch
fetch("https://neosource.dev/api/invites/TOKEN/accept", {
method: "POST",
credentials: "include",
});Path parameters
tokenrequired
Responses
200Accepted
application/json
403Forbidden — one of: forbidden, needs_scope
application/json
one of
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