---
title: "Completes the invite by creating user/service and invalidating the invite code"
method: POST
path: "/v1/api/invites/{code}/complete"
tags: ["Invites"]
---

# Completes the invite by creating user/service and invalidating the invite code

`POST /v1/api/invites/{code}/complete`

In the case of a user invite, this resource will assign the new service to the existing user and disables the invite. <br>In the case of a service invite, this resource will create a new service, assign gateway account ids (if provided) and also creates a new user and assign to the service<br>The response contains the user and the service id's affected as part of the invite completion in addition to the invite

## Path parameters

- `code` string, required

## Response `200`

OK

- CompleteInviteResponse
  - `invite` Invite
    - `_links` Link[]
      - `href` string
      - `method` string
      - `rel` string
    - `attempt_counter` integer
    - `disabled` boolean
    - `email` string
    - `expired` boolean
    - `inviteLink` string
    - `is_invite_to_join_service` boolean
    - `otp_key` string
    - `password_set` boolean
    - `role` string
    - `telephone_number` string
    - `user_exist` boolean
  - `service_external_id` string
  - `user_external_id` string

## Other responses

- `404` — Not found

## Changes

- **2026-03-04** `b6b66bb5eaad` — 1 info
  - the request property `second_factor` became nullable
- **2022-12-19** `6a7bd1eb62a7` — 1 warning
  - removed the optional property `invite/type` from the response with the `200` status
- **2022-12-15** `5163f2c9ccc3` — 1 warning, 1 info
  - removed the optional property `invite/invite_to_join_service` from the response with the `200` status
  - added the optional property `invite/is_invite_to_join_service` to the response with the `200` status
- **2022-12-13** `566e66065caa` — 1 info
  - added the optional property `invite/invite_to_join_service` to the response with the `200` status
- **2022-11-21** `229276ff8ff8` — 1 info
  - added the optional property `invite/otp_key` to the response with the `200` status

[Full history](https://skmtc.dev/government-digital-service/apis/adminusers-api/changes/v1/api/invites/:code/complete/post.md)

---

[API](https://skmtc.dev/government-digital-service/apis/adminusers-api.md) · [All operations](https://skmtc.dev/government-digital-service/apis/adminusers-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/government-digital-service/adminusers-api/revisions/8f9d543f352b/schema)
