---
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

---

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