Avnology ID
API ReferenceAuth Flows

Submit Registration

Submit a registration form to create a new user account with email/password, social login, or passkey.

Endpoint

POST /v1/flows/registration/{flow_id}:submit

Base URL: https://api-id.avnology.net

Authentication: None required (public endpoint, CSRF token in body)

Submits user-provided data to an active registration flow. On success, creates a new user account and returns a session.

Request

Path Parameters

ParameterTypeRequiredDescription
flow_idstringYesThe registration flow ID

Body (Password Registration)

{
  "method": "password",
  "body": {
    "traits": {
      "email": "[email protected]",
      "name": { "first": "Jane", "last": "Smith" }
    },
    "password": "SecureP@ssw0rd!",
    "csrf_token": "dG9rZW4..."
  }
}

Body (Social Registration)

{
  "method": "oidc",
  "body": {
    "provider": "google",
    "csrf_token": "dG9rZW4..."
  }
}

Example Request

curl -X POST "https://api-id.avnology.net/v1/flows/registration/a1b2c3d4-e5f6-7890-abcd-ef1234567890:submit" \
  -H "Content-Type: application/json" \
  -d '{
    "method": "password",
    "body": {
      "traits": {
        "email": "[email protected]",
        "name": { "first": "Jane", "last": "Smith" }
      },
      "password": "SecureP@ssw0rd!",
      "csrf_token": "dG9rZW4..."
    }
  }'

Response

Success -- Account Created

{
  "session": {
    "id": "ses_1a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
    "token": "avnl_ses_a1b2c3d4e5f6g7h8i9j0...",
    "expires_at": "2026-04-09T12:00:00Z",
    "identity": {
      "id": "usr_4f18acec-2712-4be7-a9af-b063b4f6deba",
      "email": "[email protected]",
      "first_name": "Jane",
      "last_name": "Smith"



Continue Flow -- Validation Errors

{
  "continue_flow": {
    "id": "a1b2c3d4-e5f6-7890-abcd-ef1234567890",
    "type": "registration",
    "ui": {
      "nodes": ["..."],
      "messages": [
        { "id": "4000005", "text": "An account with this email already exists", "type": "error" }
      ]


Errors

StatusCodeDescription
400AVNOLOGY_AUTH_009Flow expired
400AVNOLOGY_AUTH_011Password too weak
400AVNOLOGY_AUTH_010Password found in breach database
409AVNOLOGY_AUTH_014Email already exists
403AVNOLOGY_AUTH_304Registration disabled for this organization
429AVNOLOGY_AUTH_021Rate limit exceeded

Code Examples

JavaScript (fetch)

async function submitRegistration(flowId, email, password, firstName, lastName, csrfToken) {
  const response = await fetch(
    `https://api-id.avnology.net/v1/flows/registration/${flowId}:submit`,
    {
      method: 'POST'












Python (httpx)

import httpx

def submit_registration(flow_id: str, email: str, password: str, first_name: str, last_name: str, csrf_token: str):
    return httpx.post(
        f"https://api-id.avnology.net/v1/flows/registration/








Go (net/http)

func submitRegistration(ctx context.Context, flowID, email, password, csrfToken string) (*AuthFlowResult, error