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) {
contact {
... on Contact {
contactId
firstName
lastName
email
}
}
session {
accessToken
refreshToken
expirationTime
}
}
}

Variables

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

Response

{
"data": {
"contactRegister": {
"contact": {
"contactId": 1098,
"firstName": "Sophie",
"lastName": "Bakker",
"email": "sophie@acme.nl"
},
"session": {
"accessToken": "eyJhbGciOiJSUzI1NiIsInR5cCI6IkpXVCJ9...",
"refreshToken": "AOEOulYnMD7FqivLPCPy2w3bXn...",
"expirationTime": "2026-02-25T15:00:00.000Z"
}
}
}
}

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 a RegisterContactResponse with a contact field (the IBaseUser interface) and a session field with access tokens. Use an inline fragment (... on Contact) inside contact to access the contactId. After registration, the contact can log in with the login mutation using their email and password.

See also