> 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/002_company/006_b2c_connections/011__create_b2c_invite.md).

# Create B2C Invite

GraphQL endpoint: `/company`

Invites a new or existing user to connect with the company. If the user already exists (matched by email or telephone number), a connection request is sent to them. If they don't exist, a new user is created and invited in the same operation.

## Query

```graphql
mutation (
  $user: InviteUserInput!
  $connectionType: B2cConnectionType!
) {
  createB2cInvite (
    user: $user
    connectionType: $connectionType
  ) {
    id
    status
    type
    insertedAt
    respondedAt
    updatedAt
    company {
      id
    }
    user {
      id
    }
    invitedUser {
      id
      username
    }
  }
}

```

## Variables

```json
{
  "connectionType": "CUSTOMER",
  "user": {
    "email": "test1@email.com",
    "firstName": "1john",
    "lastName": "2doe",
    "metadata": {
      "test": "value"
    },
    "sendInviteEmail": true,
    "telephoneNumber": "2"
  }
}
```

## Response

```json
{
  "data": {
    "createB2cInvite": {
      "company": {
        "id": "00000000-0000-4000-8000-000000000001"
      },
      "id": "00000000-0000-4000-8000-000000000002",
      "insertedAt": "2026-01-15T09:00:00",
      "invitedUser": {
        "id": "00000000-0000-4000-8000-000000000003",
        "username": "1john-2doe-c9o"
      },
      "respondedAt": null,
      "status": "PENDING",
      "type": "CUSTOMER",
      "updatedAt": "2026-01-15T09:00:00",
      "user": null
    }
  }
}
```
