acceptCustomerInvite
Public: no authentication required.
Accepts a customer-user invitation from its link and signs the invited person in. The link works once and expires. The person then signs in with one-time codes, never a password.
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:
- GraphQL
- cURL
mutation AcceptCustomerInvite($input: AcceptCustomerInviteInput!) {
acceptCustomerInvite(input: $input) {
accessToken
expiresIn
refreshToken
sessionToken
tokenType
user {
id
firstName
lastName
partnerName
avatar
email
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation AcceptCustomerInvite($input: AcceptCustomerInviteInput!) {\n acceptCustomerInvite(input: $input) {\n accessToken\n expiresIn\n refreshToken\n sessionToken\n tokenType\n user {\n id\n firstName\n lastName\n partnerName\n avatar\n email\n }\n }\n}",
"variables": {
"input": {
"token": "string"
}
}
}
EOF
Variables:
{
"input": {
"token": "string"
}
}
Response:
{
"data": {
"acceptCustomerInvite": {
"accessToken": "string",
"expiresIn": 0,
"refreshToken": "string",
"sessionToken": "string",
"tokenType": "string",
"user": {
"id": "id",
"firstName": "string",
"lastName": "string",
"partnerName": "string",
"avatar": "string",
"email": "string"
}
}
}
}
acceptCustomerInvite(
input: AcceptCustomerInviteInput!
): CustomerAuthResponse!
Arguments
acceptCustomerInvite.input ● AcceptCustomerInviteInput! non-null input
The invitation token from the link.
Type
CustomerAuthResponse object
The result of a customer sign in.