Skip to main content

inviteCustomerUser

Requires permission customers:customer_user:create.

Invites a person to sign in for a customer company and sends them a single-use link that expires. They sign in with one-time codes only. Needs customers:customer_user:create.

Errors: a failed call returns a GraphQL errors entry, not a field on the result, and data may be null or partial. Read the entry's extensions.code and message; every shape and code is in the Error reference.

Example:

mutation InviteCustomerUser($input: InviteCustomerUserInput!) {
inviteCustomerUser(input: $input) {
email
invited
userId
}
}

Variables:

{
"input": {
"email": "string",
"partnerId": "id"
}
}

Response:

{
"data": {
"inviteCustomerUser": {
"email": "string",
"invited": true,
"userId": "id"
}
}
}
inviteCustomerUser(
input: InviteCustomerUserInput!
): InviteCustomerUserResult!

Arguments​

inviteCustomerUser.input ● InviteCustomerUserInput! non-null input​

The company, the person's email and name, their role, order limit, whether they approve orders, and the addresses assigned to them.

Type​

InviteCustomerUserResult object​

The result of inviting a person.