Accept a team invitation and create the account

posthttps://api.expiryedge.com/v1/completeInvitation
Öffentlich - kein API-Schlüssel30/15 minJede Methode
Anfrage
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"
}'
Antwort
{
  "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-Parameter

application/json
  • invitationTokenstringerforderlich
    Invitation token from the invite link.
  • emailstringerforderlich
    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).

Rückgabe

200
Invitation accepted.
  • successbooleanerforderlich
  • userIdstringerforderlich
  • organizationIdstringerforderlich
  • organizationNamestring
  • alreadyCompletedboolean
    Present (true) when the user had already joined.

Fehler

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.