Skip to content
Logo

POST /users/me/invitations/{id}/accept

Accept a pending org invitation. Creates a OrgMembership row with the role from the invitation and marks the invitation accepted.

The invitation must be pending AND addressed to the calling user's email (case-insensitive). The id alone isn't sufficient. Without the email gate, any logged-in user could claim any pending invitation by guessing the id.

Idempotent: if you're already an active member of the target org (race with another tab, or someone added you directly), the membership insert is skipped and the invitation is still marked accepted.

Path params

ParamTypeNotes
idstring (UUID)The invitation's id.

Request body: none.

Response 200

{
  "org_id": "0a2a…",
  "org_name": "Acme Inc.",
  "role": "admin"
}

The shape mirrors the membership entries returned by GET /auth/me, so the dashboard can splice the new row directly into its membership list without a refetch.

Errors

  • 401: no credential.
  • 403 MfaRequired: the session hasn't cleared MFA. Complete MFA, then retry.
  • 403 EmailNotVerified: verify your email before accepting an org invitation.
  • 404 NotFound: invitation not found, expired, already accepted/declined/revoked, or addressed to a different email.

Example

curl -X POST \
  "$SEISMIC_ORCHESTRATION_URL/v0/users/me/invitations/5f5d…/accept" \
  -H "Authorization: Bearer $ACCESS_TOKEN"