Accept a team invitation and create the account

posthttps://api.expiryedge.com/v1/completeInvitation
Public - no API key30/15 minAny method
Request
curl -X POST 'https://api.expiryedge.com/v1/completeInvitation' \
  -H "Content-Type: application/json" \
  -d '{
  "invitationToken": "inv_Z3kq9Tr1",
  "email": "marco.ruiz@northwinddental.com",
  "firstName": "Marco",
  "lastName": "Ruiz",
  "password": "An0ther!Strong1"
}'
Response
{
  "success": true,
  "userId": "u_9Pq2Lm",
  "organizationId": "org_northwind",
  "organizationName": "Northwind Dental"
}

An optional Firebase ID token proves ownership of an existing account. Creates (or adopts) the Auth user for the invited email and joins the inviting organization with the invitation's role. Idempotent: a repeat call for an already-joined user returns alreadyCompleted: true.

Body parameters

application/json
  • invitationTokenstringrequired
    Invitation token from the invite link.
  • emailstringrequired
    Must match the invited email.
    format: email
  • firstNamestring
  • lastNamestring
  • passwordstring
    Required unless userId is sent; must meet the password policy.
  • userIdstring
    Legacy - uid of an Auth account created client-side (requires its ID token as the bearer token).

Returns

200
Invitation accepted.
  • successbooleanrequired
  • userIdstringrequired
  • organizationIdstringrequired
  • organizationNamestring
  • alreadyCompletedboolean
    Present (true) when the user had already joined.

Errors

400
The request is missing required fields or contains invalid values.
401
Missing, expired or invalid bearer token.
403
The invitation was sent to a different email address.
404
Unknown invitation token.
409
Invitation already used, or the email already has an account (sign in first).
410
Invitation expired or cancelled.
429
Too many requests for this endpoint from your IP. Wait Retry-After seconds.