Skip to main content

Signup API Overview

The Signup API registers a new company and its first user on GNet core. It has two modes:
  • Dry mode ("mode": "dry"): core validates the request and proposes a GNET ID. Core saves nothing.
  • Live mode (any other mode value, or no mode): core registers the company, or sends the registration to GRiDD for review.
Before you register, use the User Check API to look for existing users with the same email address or phone number.

Endpoint

POST https://core.grdd.net/api/company/register

Authentication

A token is optional. Core changes its behavior when the token has the ADMIN or GATEWAY role: All other registrations go to GRiDD for review. See What happens in live mode. If you send a token, use Authorization: Bearer <token>. See the Core Operations overview.

Request body

Core removes spaces at the start and end of every string field before it validates the request.

Required fields

Optional fields


Dry mode

Send "mode": "dry" to validate the body and get a proposed GNET ID.

Dry mode response (200)

  • griddid is a proposal, made from name. If the proposed value is taken, core adds a short random suffix.
  • The proposal is not reserved. Live mode can assign a different GNET ID.
  • data is the validated request body.
  • Dry mode does not check for duplicate email addresses or phone numbers. Use the User Check API for that.

What happens in live mode

In live mode, core decides between direct registration and review. Core uses direct registration only when selfSignup is true and one of these conditions is true:
  • coType is "CO" and the caller has an ADMIN token.
  • coType is "IO" and the caller has an ADMIN or GATEWAY token.
  • coType is "IO" and invitationId is a pending GNet invitation.
In all other cases, core sends the registration to GRiDD for review. An invalid invitation also leads to review.

Direct registration

  1. Core looks for an existing company with the same mainEmail or mainPhone. If it finds one, it returns 409.
  2. Core runs an automated check of the name, address, email, and phone. An IO registration from an ADMIN or GATEWAY caller skips this check.
  3. If the average score is above 50, core creates the company and the first user. If the score is 50 or lower, or the check fails, core sends the registration to review.
  4. After it creates an IO company, core sends a welcome email to mainEmail.

Example live request


Responses

Check both the HTTP status and success. Some non-error statuses (201, and 202 after a failed automated check) return "success": false, because core did not create the company.

200: company created

For a CO company, message is "Company created successfully". username is the username of the first user. Core uses mainEmail in lowercase. The first user is enabled and has the MANAGER role. The user can sign in with this username and password through POST /api/token.

202: submitted for review

GRiDD reviews the registration. Core does not return a GNET ID.

201 and 202: sent to review after the automated check

In these cases success is false and the body contains legacyStatus.

Error responses

If the review submission fails, core returns the status of the review service with "success": false and an error value.