> For the complete documentation index, see [llms.txt](https://docs.meeco.me/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.meeco.me/svx-v3/guides/api-guides/users/inviting-end-users.md).

# Inviting End-Users

The sequence diagram below shows the process of how a user controlling a DID is invited and then added to our system by a tenant administrator.

```mermaid
sequenceDiagram
  title Invite End-User using Wallet to Tenancy

  autonumber

  actor H as Holder
  actor TA as Tenant Admin

  participant P as Portal
  participant W as Wallet
  participant API as SVX API

  W->>W: did:key generated locally
  TA->>P: Navigate to Add User > End Users > Manage Tenancy.
  P->>+API: POST /end-users/invitations
  API-->>-P: 201 invitation object containing request_uri
  Note over H,P: There are different ways a holder can receive this link<br>- QR code that can be scanned<br>-Deeplink to click on
  P->>P: Render QR for request <br> openid://request_uri=https://svx-api-sandbox.meeco.me/oidc/presentations/requests/{id}/jwt

  TA-->>H: Email QR code / deeplink

  H->>W: Scan QR Code
  W->>+API: GET https://svx-api-sandbox.meeco.me/oidc/presentations/requests/{id}/jwt
  API-->>-W: return request_jwt
  W->>+W: Extract state and reciret_uri attributes from the request request_jwt
  W->>+API: POST /end_users/invitations/short_lived_access_token (token: state)
  API-->>-W: return short lived access_token
  W->>+API: POST /oidc/presentations/requests/verify (request_jwt, short lived access_token)
  API-->>-W: 201 OK
  W->>+API: POST /oidc/presentations/token<br>(request_id, state, short lived access_token)
  API-->>-W: 201 OK and unsigned id_token
  W->>W: Sign id_token

  W->>+API: POST /end_users/invitations/{token}/accept <br> (id_token, state: token, short lived access_token) <br> (endpoint is defined under redirect_uri inside the request_jwt)

  API-->>-W: 201 OK (access_token: {access_token})
```


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.meeco.me/svx-v3/guides/api-guides/users/inviting-end-users.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
