---
title: "Complete invitation if user authenticated"
method: POST
path: "/api-regulated/v1/invitations/{invitationId}/complete"
tags: ["Invitation"]
---

# Complete invitation if user authenticated

`POST /api-regulated/v1/invitations/{invitationId}/complete`

## Request

- Base URL: `https://api.currencyguard.com`
- URL: `https://api.currencyguard.com/api-regulated/v1/invitations/{invitationId}/complete`
- Auth: HTTP bearer

Checks if the invited user has authenticated with the identity provider and completes the invitation if so. This endpoint is typically called by external systems or webhooks when a user completes authentication.

## Path parameters

- `invitationId` string, uuid, required

## Response `200`

Invitation checked and potentially completed

- InvitationDTO: Schema for representing a Invitation
  - `id` string, uuid: The ID for this invitation.
  - `inviterUserId` string, uuid: The ID of the user who sent this invitation.
  - `inviterUserPiiData` InvitationDTOInviterUserPiiData: **Extensible JSONB field** - The PII data for this user as encrypted JSON. This field accepts any valid JSON structure and can be extended with additional properties as needed. Note: While the structure is extensible, known fields shown in the example are subject to application validation.
  - `inviteeUserId` string, uuid: The ID of the user created for this invitation (email stored in PII). Null for new invitations until acceptance.
  - `inviteeUserPiiData` InvitationDTOInviteeUserPiiData: **Extensible JSONB field** - The PII data for this user as encrypted JSON. This field accepts any valid JSON structure and can be extended with additional properties as needed. Note: While the structure is extensible, known fields shown in the example are subject to application validation.
  - `userType` 'INTERNAL' | 'REGULATED' | 'CUSTOMER': The type of user being invited.
  - `entitlementsTemplateId` string, uuid: The entitlements template ID to assign to the invited user.
  - `entitlementsTemplateTemplateName` string: The unique name of the entitlements template.
  - `regulatedEntityId` string, uuid: The regulated entity ID (for sales users and customers).
  - `companyId` string, uuid: The company ID (for customer users only).
  - `invitationToken` string: The unique invitation token for validation.
  - `status` 'PENDING' | 'COMPLETED' | 'EXPIRED' | 'REVOKED': The current status of the invitation.
  - `expiresAt` string: When the invitation expires in UTC.
  - `completedAt` string: When the invitation was completed in UTC.
  - `piiData` InvitationDTOPiiData: **Extensible JSONB field** - Encrypted PII data for the invitee (email, first_name, last_name). Stored on invitation so user creation is deferred to acceptance. This field accepts any valid JSON structure and can be extended with additional properties as needed. Note: While the structure is extensible, known fields shown in the example are subject to application validation.
  - `perimeterId` string, uuid: The tenant perimeter whose KMS key encrypts this record's PII.
  - `introducingBrokerId` string, uuid: The introducing broker ID (for sales user invitations).
  - `createdUserId` string, uuid: DEPRECATED: Use invitee_user_id instead. The ID of the user created after successful onboarding.
  - `versionNumber` integer: The strictly monotonically increasing version number for this record.
  - `updatedBy` string: The username of the person or entity that updated this record.
  - `updatedAt` string: The timestamp of the last update in UTC.
  - `createdAt` string: The timestamp of creation in UTC.

## Other responses

- `400`: Invalid ID — [`http/malformed-request`](/problems/http/malformed-request/)
- `401`: Not authenticated — [`security/authentication-failed`](/problems/security/authentication-failed/)
- `403`: Not authorized — [`security/insufficient-permissions`](/problems/security/insufficient-permissions/)
- `404`: Invitation not found — [`http/resource-not-found`](/problems/http/resource-not-found/)
- `500`: Server error — [`server/internal-error`](/problems/server/internal-error/)

---

[API](https://skmtc.dev/currencyguard/apis/currencyguard-trading-system-api-external.md) · [All operations](https://skmtc.dev/currencyguard/apis/currencyguard-trading-system-api-external/llms.txt) · [OpenAPI document](https://skmtc.dev/currencyguard/apis/currencyguard-trading-system-api-external/revisions/a1f3f854190d?raw)
