Skip to content

Users API

User-scoped writes that must be validated server-side. A logged-in user has no direct GraphQL write access to showrooms or business profiles; every create/update goes through this API, which authenticates the user's access token and validates ownership before mutating (using the Hasura admin secret). Powers the first-login onboarding flow: creating a project (showroom), setting its locale/timezone, and managing business profiles.

Server

URLDescription
https://api.neogt.com.au/usersProduction

projectCodeAvailability

http
GET /projects/code-availability

Check whether a project code is valid and not already taken. The code is a URL-safe slug and is a UNIQUE column on showrooms.

Parameters

NameInTypeRequiredDescription
codequerystringyesThe desired project code, e.g. "acme-motors"

Responses

StatusDescription
200Availability result
401Authentication is missing or invalid

listProjects

http
GET /projects

List the projects (showrooms) the caller belongs to.

Responses

StatusDescription
200The caller's projects
401Authentication is missing or invalid

createProject

http
POST /projects

Create a project (showroom) and make the caller its owner. Validates the code format and uniqueness.

Request body

FieldTypeRequiredDescription
namestringyesHuman-friendly project name Example: "Acme Motors".
codestringyesURL-safe unique slug Example: "acme-motors".
default_languagestringnoDefault language. Example: "en-GB".

Responses

StatusDescription
201Project created
400The request is invalid
401Authentication is missing or invalid
409The code is already taken

updateProject

http
PATCH /projects/{code}

Update locale/region/timezone for a project the caller owns.

Parameters

NameInTypeRequiredDescription
codepathstringyes

Request body

FieldTypeRequiredDescription
default_languagestringnoExample: "en".
default_regionstringnoExample: "AU_SYD".
timezonestringnoExample: "Australia/Sydney".

Responses

StatusDescription
200Project updated
400The request is invalid
401Authentication is missing or invalid
403The caller may not manage this project
404The record was not found

listBusinessProfiles

http
GET /business-profiles

List the caller's business profiles.

Responses

StatusDescription
200The caller's business profiles
401Authentication is missing or invalid

createBusinessProfile

http
POST /business-profiles

Create a business profile owned by the caller.

Request body

FieldTypeRequiredDescription
namestringyesExample: "Acme Motors Ltd".
relationshipstringno
registration_numberstringno
addressAddressnoFree-form structured address (stored as JSONB).
phonestringno
emailstringno

Responses

StatusDescription
201Business profile created
400The request is invalid
401Authentication is missing or invalid

requestContactChange

http
POST /contact-change

Start changing the caller's email address or phone number. The value is validated and normalized (emails lowercased; phones to +<country><number>), rejected if another account holds it, and a short-lived confirmation code is sent to the NEW address or number. Nothing changes on the user until /contact-change/confirm succeeds.

Request body

FieldTypeRequiredDescription
typestringyes
valuestringyesExample: "new@example.com".

Responses

StatusDescription
201Confirmation code sent
400The request is invalid
401Authentication is missing or invalid
409The value is held by another account. code is err_contact_taken, or err_contact_taken_recoverable when the holder is a soft-deleted account (the UI should point the user at account recovery).

confirmContactChange

http
POST /contact-change/confirm

Confirm a pending email/phone change with the code that was sent to the new address or number. Applies the change to the caller's user on success. Requests are single-use, expire after a few minutes and lock after too many wrong tries.

Request body

FieldTypeRequiredDescription
request_idstringyes
codestringyesExample: "123456".

Responses

StatusDescription
200Contact detail updated
400The request is invalid
401Authentication is missing or invalid
404The record was not found
409The value was claimed by another account in the meantime
410The code has expired

listTeam

http
GET /team

The team: one membership row per (showroom × user) across every showroom the caller owns, plus the list of owned showrooms for the invite form's picker.

Responses

StatusDescription
200Team members and owned showrooms
401Authentication is missing or invalid

getAccessCatalog

http
GET /access-catalog

The grant + access catalogs used to build a role's permissions.

Responses

StatusDescription
200Grant and access catalogs
401Authentication is missing or invalid

archiveShowroomSite

http
POST /showrooms/{code}/archive

Archive a showroom site. Owners only.

Parameters

NameInTypeRequiredDescription
codepathstringyes

Responses

StatusDescription
200Showroom archived
401Authentication is missing or invalid
403The caller may not manage this project
404The record was not found

unarchiveShowroomSite

http
POST /showrooms/{code}/unarchive

Restore an archived showroom site. Owners only.

Parameters

NameInTypeRequiredDescription
codepathstringyes

Responses

StatusDescription
200Showroom restored
401Authentication is missing or invalid
403The caller may not manage this project
404The record was not found

requestShowroomSiteDelete

http
POST /showrooms/{code}/delete-requests

Queue a later hard delete for an archived showroom. Owners only.

Parameters

NameInTypeRequiredDescription
codepathstringyes

Responses

StatusDescription
202Delete request queued
400The request is invalid
401Authentication is missing or invalid
403The caller may not manage this project
404The record was not found

listShowroomRoles

http
GET /showrooms/{code}/roles

List the roles defined for a showroom the caller owns.

Parameters

NameInTypeRequiredDescription
codepathstringyes

Responses

StatusDescription
200The showroom's roles
401Authentication is missing or invalid
403The caller may not manage this project

createShowroomRole

http
POST /showrooms/{code}/roles

Create a role for a showroom the caller owns.

Parameters

NameInTypeRequiredDescription
codepathstringyes

Request body

FieldTypeRequiredDescription
namestringyesExample: "Sales manager".
descriptionstringno
grantsarray&lt;GrantAccess&gt;no

Responses

StatusDescription
201Role created
400The request is invalid
401Authentication is missing or invalid
403The caller may not manage this project

updateShowroomRole

http
PATCH /showrooms/{code}/roles/{roleId}

Rename a role and replace its grants.

Parameters

NameInTypeRequiredDescription
codepathstringyes
roleIdpathstringyes

Request body

FieldTypeRequiredDescription
namestringyes
descriptionstringno
grantsarray&lt;GrantAccess&gt;no

Responses

StatusDescription
200Role updated
400The request is invalid
401Authentication is missing or invalid
403The caller may not manage this project
404The record was not found

deleteShowroomRole

http
DELETE /showrooms/{code}/roles/{roleId}

Delete a role (its grants cascade).

Parameters

NameInTypeRequiredDescription
codepathstringyes
roleIdpathstringyes

Responses

StatusDescription
200Role deleted
401Authentication is missing or invalid
403The caller may not manage this project
404The record was not found

getShowroomAssignable

http
GET /showrooms/{code}/assignable

Locations and locales the owner can attach to a data-aware limited grant when assigning a role in a showroom they own.

Parameters

NameInTypeRequiredDescription
codepathstringyes

Responses

StatusDescription
200Assignable locations and locales
401Authentication is missing or invalid
403The caller may not manage this project

updateMemberRoles

http
PATCH /showrooms/{code}/members/{userId}/roles

Replace a member's roles in a showroom the caller owns and re-materialise their grants, capturing the location/locale chosen for any data-aware limited grant.

Parameters

NameInTypeRequiredDescription
codepathstringyes
userIdpathstringyes

Request body

FieldTypeRequiredDescription
role_idsarray&lt;string&gt;yes
grant_assignmentsarray&lt;GrantAssignment&gt;no

Responses

StatusDescription
200Roles updated
400The request is invalid
401Authentication is missing or invalid
403The caller may not manage this project
404The record was not found

getMemberPermissions

http
GET /showrooms/{code}/members/{userId}/permissions

A member's effective permissions in a showroom the caller owns.

Parameters

NameInTypeRequiredDescription
codepathstringyes
userIdpathstringyes

Responses

StatusDescription
200The member's permissions
401Authentication is missing or invalid
403The caller may not manage this project

removeShowroomMember

http
DELETE /showrooms/{code}/members/{userId}

Remove a member from a showroom the caller owns.

Parameters

NameInTypeRequiredDescription
codepathstringyes
userIdpathstringyes

Responses

StatusDescription
200Member removed
400The request is invalid
401Authentication is missing or invalid
403The caller may not manage this project
404The record was not found

createInvitation

http
POST /invitations

Invite someone to a showroom the caller owns by email or phone, pre-assigning showroom + roles. Creates/reuses a user, attaches a pending membership, and sends an accept/deny link.

Request body

FieldTypeRequiredDescription
showroom_codestringyes
contact_typestringyes
valuestringyesExample: "new@example.com".
role_idsarray&lt;string&gt;no
grant_assignmentsarray&lt;GrantAssignment&gt;no
is_ownerbooleanno

Responses

StatusDescription
201Invitation created and link sent
400The request is invalid
401Authentication is missing or invalid
403The caller may not manage this project

getInvitation

http
GET /invitations/{token}

Public summary of an invitation for the accept/deny page.

Parameters

NameInTypeRequiredDescription
tokenpathstringyes

Responses

StatusDescription
200Invitation summary
404The record was not found

acceptInvitation

http
POST /invitations/accept

Public — accept an invitation with its token.

Request body

FieldTypeRequiredDescription
tokenstringyes
first_namestringyes
last_namestringyes

Responses

StatusDescription
200Invitation accepted
404The record was not found
410The invitation has expired or is no longer valid

denyInvitation

http
POST /invitations/deny

Public — decline an invitation with its token.

Request body

FieldTypeRequiredDescription
tokenstringyes

Responses

StatusDescription
200Invitation declined
404The record was not found
410The invitation is no longer valid

listSystemUsers

http
GET /system-users

The system users the caller owns (machine accounts for collectors), each with its showroom membership, roles and whether an API client has been issued.

Responses

StatusDescription
200The caller's system users
401Authentication is missing or invalid

createSystemUser

http
POST /system-users

Create a system user owned by the caller and give it an active membership (with roles + materialised grants) in a showroom the caller owns. Credentials are minted separately via the authentication-api.

Request body

FieldTypeRequiredDescription
namestringyes
showroom_codestringyes
role_idsarray&lt;string&gt;no
grant_assignmentsarray&lt;GrantAssignment&gt;no

Responses

StatusDescription
201System user created
400The request is invalid
401Authentication is missing or invalid
403The caller may not manage this project

connectCollector

http
POST /system-users/connect-collector

One-click collector provisioning: in a showroom the caller owns, reuse or create a role granting only WRITE on devices, then create a system user with that role. Credentials are minted separately via the authentication-api.

Request body

FieldTypeRequiredDescription
showroom_codestringyes

Responses

StatusDescription
201Collector provisioned
401Authentication is missing or invalid
403The caller may not manage this project

deleteSystemUser

http
DELETE /system-users/{userId}

Soft-delete a system user the caller owns.

Parameters

NameInTypeRequiredDescription
userIdpathstringyes

Responses

StatusDescription
200System user deleted
401Authentication is missing or invalid
404The record was not found

Neotech Geotechnical Engineering documentation.