> For the complete documentation index, see [llms.txt](https://docs.tnid.com/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.tnid.com/api-reference/001_user/010_company_management/004__setup_invitation_from_token.md).

# Set Up Invitation From Token

GraphQL endpoint: `/user`

Materializes the requests an authenticated user can act on for an invitation link: a company connection request, a user-to-user connection request when the link carries a connection type, and one subscription request per channel the link asks for. Revisiting the same token returns the existing rows instead of duplicating them.

## Query

```graphql
mutation ($token: String!) {
  setupInvitationFromToken(token: $token) {
    b2cConnectionRequest { id status type }
    c2cConnectionRequest { id status type }
    b2cSubscriptionRequests { id status type }
  }
}

```

## Variables

```json
{
  "token": "token_1"
}
```

## Response

```json
{
  "data": {
    "setupInvitationFromToken": {
      "b2cConnectionRequest": {
        "id": "00000000-0000-4000-8000-000000000001",
        "status": "PENDING",
        "type": "CUSTOMER"
      },
      "b2cSubscriptionRequests": [
        {
          "id": "00000000-0000-4000-8000-000000000002",
          "status": "PENDING",
          "type": "EMAIL"
        },
        {
          "id": "00000000-0000-4000-8000-000000000003",
          "status": "PENDING",
          "type": "SMS"
        },
        {
          "id": "00000000-0000-4000-8000-000000000004",
          "status": "PENDING",
          "type": "VOICE"
        }
      ],
      "c2cConnectionRequest": {
        "id": "00000000-0000-4000-8000-000000000005",
        "status": "PENDING",
        "type": "FRIEND"
      }
    }
  }
}
```
