API ReferenceAuth Flows
Create Settings Flow
Initiate a settings flow to update profile, password, MFA methods, or linked social accounts.
Endpoint
GET /v1/flows/settingsBase URL: https://api-id.avnology.net
Authentication: Required -- session token or cookie
Creates a settings flow for the authenticated user. The returned UI contains fields for all available settings sections: profile, password, TOTP, WebAuthn/passkeys, recovery codes, and social account linking.
Request
Headers
| Header | Required | Description |
|---|---|---|
Authorization | Yes | Bearer <session_token> |
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
return_to | string | No | URL to redirect after settings are saved |
Example Request
curl "https://api-id.avnology.net/v1/flows/settings" \
-H "Authorization: Bearer avnl_ses_a1b2c3d4..."Response
Success (200 OK)
The response includes UI nodes grouped by settings section:
{
"id": "d4e5f6a7-b8c9-0123-def0-123456789abc",
"type": "settings",
"state": "show_form",
"expires_at": "2026-04-08T13:00:00Z",
"ui": {
"action": "https://api-id.avnology.net/v1/flows/settings/d4e5f6a7-b8c9-0123-def0-123456789abc:submit",
"method": "POST",
"nodes": [
{
"type"
Errors
| Status | Code | Description |
|---|---|---|
| 401 | AVNOLOGY_AUTH_005 | Invalid or expired session |
| 403 | AVNOLOGY_AUTH_102 | Step-up authentication required |
Code Examples
JavaScript (fetch)
async function createSettingsFlow(sessionToken) {
const response = await fetch('https://api-id.avnology.net/v1/flows/settings', {
headers: { 'Authorization': `Bearer ${sessionToken}` },
});
return response.json();
}Python (httpx)
import httpx
def create_settings_flow(session_token: str) -> dict:
return httpx.get(
"https://api-id.avnology.net/v1/flows/settings",
headers={"Authorization": f"Bearer
Go (net/http)
func createSettingsFlow(ctx context.Context, sessionToken string) (*AuthFlow, error) {
req, _ := http.NewRequestWithContext(ctx,
Related
- Submit Settings -- submit profile or password changes
- SDK:
client.auth.updateProfile(traits)(TypeScript)