Skip to main content
Registration keys are how new staff accounts enter Avalex. Instead of allowing open self-registration, Avalex requires each new staff member to present a unique, single-use key when calling POST /staff/register. This keeps account creation under strict administrative control — only the Master Admin can generate keys, and each key is consumed the moment it is used. If a key is compromised before use, it can simply be discarded and a fresh one generated.
Both endpoints under /admin/registration-keys are restricted to the Master Admin account. No other role or permission level grants access to these routes.

Generate a Registration Key

Creates a new single-use registration key and returns it in plaintext. Share this key out-of-band (for example, via a secure message) with the person who will be registering.
Response — 201 Created
The key value is shown only once, at the moment of creation. It is not stored in a retrievable form and will not appear in any subsequent API response. Copy it immediately and deliver it securely to the intended staff member. If the key is lost before use, generate a new one.

List Registration Keys

Returns metadata for all registration keys ever generated in your Avalex account. This gives you an audit trail of key creation without exposing the key values themselves.
Response — 200 OK
The actual key string is never returned by this endpoint — only the key’s metadata. If you need to send a key to a staff member, you must generate a new one via POST /admin/registration-keys.

Response Fields


Using a Registration Key

Once you have generated a key and delivered it to a new team member, they submit it as part of the POST /staff/register request body alongside their chosen username, email, password, and desired roles. The key is validated and marked as used atomically with account creation.
For the full registration endpoint reference — including all request fields, success response, and error codes — see the Staff Management page.
Generate a fresh key for each new staff member rather than reusing or pre-generating batches. Single-use keys ensure that even if a key is intercepted in transit, it cannot be used a second time, and you can trace exactly which registration consumed which key.