Avnology ID
API ReferenceUsers

Create User

Create a new user identity with email, password, and profile data via the admin API.

Endpoint

POST /v1/identities

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

Authentication: API Key or OAuth token with admin:users:write scope

Request

Headers

HeaderRequiredDescription
AuthorizationYesBearer <api_key> or Bearer <access_token>
Content-TypeYesapplication/json
Idempotency-KeyNoPrevents duplicate creation on retries

Body

FieldTypeRequiredDescription
identity.emailstringYesUser's email address
identity.usernamestringNoUnique username (3--64 chars, alphanumeric + -_)
identity.first_namestringNoFirst name
identity.last_namestringNoLast name
identity.display_namestringNoDisplay name
identity.phonestringNoPhone in E.164 format (e.g., +14155551234)
identity.organization_idstringNoAssign to an organization
identity.localestringNoBCP 47 locale (e.g., en-US)
identity.timezonestringNoIANA timezone (e.g., America/New_York)
identity.traitsobjectNoCustom profile attributes
identity.admin_metadataobjectNoAdmin-only metadata (not visible to user)
initial_passwordstringNoInitial password (min 8 chars, hashed with Argon2id)
validate_onlybooleanNoIf true, validate without creating

Example Request

curl -X POST https://api-id.avnology.net/v1/identities \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -H "Idempotency-Key: 550e8400-e29b-41d4-a716-446655440000" \
  -d '{
    "identity": {
      "email": "[email protected]",
      "first_name": "Jane",
      "last_name": "Smith",
      "phone": "+14155551234",
      "organization_id": "org_7a2b3c4d-5e6f-7a8b-9c0d-1e2f3a4b5c6d",
      "traits": { "department": "Engineering" }
    },
    "initial_password": "SecureP@ssw0rd!"
  }'

Response

Success (201 Created)

{
  "id": "usr_4f18acec-2712-4be7-a9af-b063b4f6deba",
  "email": "[email protected]",
  "first_name": "Jane",
  "last_name": "Smith",
  "phone": "+14155551234",
  "email_verified": false,
  "phone_verified": false,
  "state": "active",






Errors

StatusCodeDescription
400AVNOLOGY_AUTH_902Validation failed (invalid email, phone format, etc.)
400AVNOLOGY_AUTH_011Password does not meet policy requirements
400AVNOLOGY_AUTH_010Password found in breach database
409AVNOLOGY_AUTH_014Email already exists
403AVNOLOGY_AUTH_100Insufficient permissions
429AVNOLOGY_AUTH_021Rate limit exceeded

Error Example

{
  "error": {
    "code": "AVNOLOGY_AUTH_014",
    "message": "A user with this email already exists",
    "status": 409,
    "details": { "field": "email", "value": "[email protected]" }
  }
}

Code Examples

JavaScript (fetch)

async function createUser(apiKey, userData) {
  const response = await fetch('https://api-id.avnology.net/v1/identities', {
    method: 'POST',
    headers: {
      'Authorization': `Bearer ${apiKey}`,
      'Content-Type': 












Python (httpx)

import httpx

def create_user(api_key: str, email: str, first_name: str, last_name: str, password: str, org_id: str = "") -> dict:
    return




Go (net/http)

func createUser(ctx context.Context, apiKey string, user *CreateUserRequest) (*Identity, error) {
	jsonBody, _ 











  • Get User -- retrieve the created user
  • Update User -- modify user fields
  • List Users -- paginated user listing
  • SDK: client.admin.createUser({ email, password, name }) (TypeScript)