registerWithGoogle
Public: no authentication required.
Creates a new organization and its first admin user from a Google account. Rate-limited per IP address. No sign-in needed.
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 RegisterWithGoogle($input: GoogleRegisterInput!) {
registerWithGoogle(input: $input) {
accessToken
message
onboardingId
refreshToken
success
useAsyncOnboarding
organization {
id
code
postalCode
registrationNumber
name
status
}
}
}
curl -X POST "https://<api-host>/graphql" \
-H "Content-Type: application/json" \
-H "Authorization: Bearer $ACCESS_TOKEN" \
--data @- <<'EOF'
{
"query": "mutation RegisterWithGoogle($input: GoogleRegisterInput!) {\n registerWithGoogle(input: $input) {\n accessToken\n message\n onboardingId\n refreshToken\n success\n useAsyncOnboarding\n organization {\n id\n code\n postalCode\n registrationNumber\n name\n status\n }\n }\n}",
"variables": {
"input": {
"companyName": "string",
"country": "string",
"googleToken": "string",
"subdomain": "string"
}
}
}
EOF
Variables:
{
"input": {
"companyName": "string",
"country": "string",
"googleToken": "string",
"subdomain": "string"
}
}
Response:
{
"data": {
"registerWithGoogle": {
"accessToken": "string",
"message": "string",
"onboardingId": "string",
"refreshToken": "string",
"success": true,
"useAsyncOnboarding": true,
"organization": {
"id": "string",
"code": "string",
"postalCode": "string",
"registrationNumber": "string",
"name": "string",
"status": "string"
}
}
}
}
registerWithGoogle(
input: GoogleRegisterInput!
): GoogleRegisterResponse!
Arguments
registerWithGoogle.input ● GoogleRegisterInput! non-null input
The Google token and the details of the organization to create.
Type
GoogleRegisterResponse object
The result of creating an organization from a Google sign in.