Create B2C invite
On this page
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
mutation (
$user: InviteUserInput!
$connectionType: B2cConnectionType!
) {
createB2cInvite (
user: $user
connectionType: $connectionType
) {
id
status
type
insertedAt
respondedAt
updatedAt
company {
id
}
user {
id
}
invitedUser {
id
username
}
}
}
Variables
{
"connectionType": "CUSTOMER",
"user": {
"email": "test1@email.com",
"firstName": "1john",
"lastName": "2doe",
"metadata": {
"test": "value"
},
"sendInviteEmail": true,
"telephoneNumber": "2"
}
}
Response
{
"data": {
"createB2cInvite": {
"company": {
"id": "00000000-0000-4000-8000-000000000001"
},
"id": "00000000-0000-4000-8000-000000000002",
"insertedAt": "2026-01-15T09:00:00.000000",
"invitedUser": {
"id": "00000000-0000-4000-8000-000000000003",
"username": "1john-2doe-aynq"
},
"respondedAt": null,
"status": "PENDING",
"type": "CUSTOMER",
"updatedAt": "2026-01-15T09:00:00.000000",
"user": null
}
}
}