Skip to main content

Register a new customer or contact

Register a new contact under an existing company so they can log in and place orders.

Mutation

mutation RegisterContact($input: RegisterContactInput!) {
contactRegister(input: $input) {
... on Contact {
contactId
firstName
lastName
email
company {
companyId
name
}
}
}
}

Variables

{
"input": {
"firstName": "Sophie",
"lastName": "Bakker",
"email": "sophie@acme.nl",
"gender": "F",
"parentId": 141,
"password": "••••••••",
"primaryLanguage": "NL"
}
}

Response

{
"data": {
"contactRegister": {
"contactId": 1098,
"firstName": "Sophie",
"lastName": "Bakker",
"email": "sophie@acme.nl",
"company": {
"companyId": 141,
"name": "ASML Veldhoven"
}
}
}
}

How it works

The parentId field is required — it links the new contact to an existing company. The password field is optional; if omitted, the contact must set a password through the password reset flow. The gender field accepts M, F, or U (unknown). The mutation returns the IBaseUser interface, so use an inline fragment (... on Contact) to access the contactId and company. After registration, the contact can log in with the login mutation using their email and password.

See also