API ReferenceAuth Flows
Create Registration Flow
Initiate a new registration flow that returns UI nodes for rendering a custom signup form.
Endpoint
GET /v1/flows/registrationBase URL: https://api-id.avnology.net
Authentication: None required (public endpoint)
Creates a new registration flow and returns the initial UI with form fields for account creation. The UI nodes include email, password, profile fields, social signup buttons, and passkey enrollment.
Request
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
return_to | string | No | URL to redirect after successful registration |
login_challenge | string | No | OAuth2 login challenge (if part of an OAuth flow) |
organization_id | string | No | Restrict registration to a specific organization |
Example Request
curl "https://api-id.avnology.net/v1/flows/registration?return_to=https://app.acme.com/welcome" \
-H "Accept: application/json"Response
Success (200 OK)
{
"id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
"type": "registration",
"state": "show_form",
"expires_at": "2026-04-08T12:30:00Z",
"issued_at": "2026-04-08T12:00:00Z",
"return_to": "https://app.acme.com/welcome",
"ui": {
"action": "https://api-id.avnology.net/v1/flows/registration/a1b2c3d4-e5f6-7890-abcd-ef1234567890:submit",
Errors
| Status | Code | Description |
|---|---|---|
| 400 | AVNOLOGY_AUTH_902 | Invalid query parameters |
| 403 | AVNOLOGY_AUTH_304 | Registration is disabled for this organization |
Code Examples
JavaScript (fetch)
async function createRegistrationFlow(returnTo) {
const url = new URL('https://api-id.avnology.net/v1/flows/registration');
if (returnTo) url.searchParams.set('return_to', returnTo);
const response = await fetch(url, {
headers: { 'Accept'
Python (httpx)
import httpx
def create_registration_flow(return_to: str | None = None) -> dict:
params = {}
if return_to:
params["return_to"]
Go (net/http)
func createRegistrationFlow(ctx context.Context, returnTo string) (*AuthFlow, error) {
u, _ := url.Parse(
Related
- Submit Registration -- submit the signup form
- Create Login Flow -- existing user login
- SDK:
client.auth.createRegistrationFlow()(TypeScript)