Avnology ID
API ReferenceUsers

Update User

Partially update a user's profile, metadata, or organization assignment using field masks.

Endpoint

PATCH /v1/identities/{id}

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

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

Uses field masks (AIP-134) to update only the specified fields. Unspecified fields are left unchanged.

Request

Path Parameters

ParameterTypeRequiredDescription
idstringYesUser ID

Headers

HeaderRequiredDescription
AuthorizationYesBearer <api_key>
Content-TypeYesapplication/json
If-MatchNoETag for conditional update

Body

FieldTypeRequiredDescription
identityobjectYesFields to update
update_maskstringYesComma-separated field paths to update

Example Request

curl -X PATCH "https://api-id.avnology.net/v1/identities/usr_4f18acec-2712-4be7-a9af-b063b4f6deba" \
  -H "Authorization: Bearer ak_live_..." \
  -H "Content-Type: application/json" \
  -H "If-Match: W/\"a1b2c3d4e5\"" \
  -d '{
    "identity": {
      "first_name": "Jane",
      "last_name": "Doe",
      "phone": "+14155559876",
      "admin_metadata": { "notes": "Updated by migration script" }
    },
    "update_mask": "first_name,last_name,phone,admin_metadata"
  }'

Response

Success (200 OK)

Returns the full updated user object. See Get User for the response schema.

Errors

StatusCodeDescription
400AVNOLOGY_AUTH_902Validation failed
404AVNOLOGY_AUTH_901User not found
409AVNOLOGY_AUTH_903ETag mismatch (concurrent modification)
403AVNOLOGY_AUTH_100Insufficient permissions

Code Examples

JavaScript (fetch)

async function updateUser(apiKey, userId, fields, updateMask) {
  return fetch(`https://api-id.avnology.net/v1/identities/${userId}`, {
    method: 'PATCH',
    headers: { 'Authorization': `Bearer ${apiKey}`, 


Python (httpx)

import httpx

def update_user(api_key: str, user_id: str, fields: dict, update_mask: str) -> dict:
    return httpx.patch(f"https://api-id.avnology.net/v1/identities/{user_id

Go (net/http)

func updateUser(ctx context.Context, apiKey, userID string, fields map[string]interface{}, updateMask string














  • Get User -- fetch current state before updating
  • Create User -- create a new user
  • SDK: client.admin.updateUser(userId, fields) (TypeScript)