---
title: "Edit user details"
method: POST
path: "/users/action/edit"
tags: ["Users"]
---

# Edit user details

`POST /users/action/edit`

## Request

- Base URL: `https://sandbox.preprod.connect.xpansiv.com/app/api/v1`
- URL: `https://sandbox.preprod.connect.xpansiv.com/app/api/v1/users/action/edit`
- Auth: HTTP bearer
- TypeScript: <https://skmtc.dev/xpansiv/apis/xpansiv-connect-api/docs/users/action/edit/post.ts> (a function with typed inputs; its response is checked against the schema)

Updates user details on the caller's active account. Requires EM_ACCOUNT.USER edit permission.
The target user is identified by `login` and must belong to the active account.
Required fields: `login`, `firstName`, `lastName`, and `status`.

## Request body

- User
  - `firstName` string, required: Must not contain digits (0-9). Special characters are allowed. Same validation as legacy EMA UI.
  - `middleName` string: Must not contain digits (0-9). Special characters are allowed. Same validation as legacy EMA UI.
  - `lastName` string, required: Must not contain digits (0-9). Special characters are allowed. Same validation as legacy EMA UI.
  - `email` string, email, required
  - `jobTitle` string, required
  - `telephone` string
  - `authSubject` string
  - `login` string: User login name. Required when editing an existing user.
  - `address` Address, required
    - `postalCode` string, required
    - `city` string, required
    - `country` string, required: Ref.Data.COUNTRY
    - `addressLineOne` string, required
    - `addressLineTwo` string
    - `stateProvince` string: Ref.Data.STATE_PROVINCE
  - `organizationRelationship` string: Ref.Data.USER_ORGANIZATION_RELATIONSHIP
  - `roles` UserRole[]: Account-scoped entitlement roles only.
  - `account` Account
    - `id` integer, required
    - `identifier` string, required
    - `noOfUsers` integer, required
    - `status` string, required: Ref.Data.ACCOUNT_STATUS
    - `maxUsers` number, required
    - `childAccounts` Account[], required
    - `registryLinks` AccountRegistryLink[], required
      - `id` integer, required
      - `program` string, required: Ref.Data.PROGRAM
      - `registryAccountId` string, required
      - `status` string, required: Ref.Data.REGISTRY_LINK_STATUS
      - `lastSyncDate` string, date-time, nullable: Incremental sync watermark (RFC 3339 date-time), equivalent to the server's sync time identifier used for incremental sync. Omitted or null when the registry link has never been synced.
    - `organization` Organization, required
      - `iamOrgId` string
      - `legalName` string, required
      - `structure` string, required: Ref.Data.ORGANIZATION_LEGAL_STRUCTURE
      - `type` string, required: Ref.Data.ORGANIZATION_TYPE
    - `services` AccountService[], required: Service accounts for this EMA account. Each item is an `AccountService`
      - `id` integer, required
      - `status` string, required: Ref.Data.SERVICE_ACCOUNT_STATUS
      - `type` string, required: Ref.Data.SERVICE_TYPE
      - `attributes` union: Shape is determined by the parent service `type` (Ref.ServiceType), using mapping: ACX → AcxAccountServiceAttributes; SUBACCOUNT_SERVICE → SubaccountAccountServiceAttributes; CUSTODIAN_SERVICE → CustodianAccountServiceAttributes. If there are no service attributes (all other service types), do not display this object — omit `attributes`, or return `attributes` as an empty object.
        - AcxAccountServiceAttributes: Attributes for account service with `type` ACX.
          - `acxAccountIdentifier` string, required
        - SubaccountAccountServiceAttributes: Attributes for account service with `type` SUBACCOUNT_SERVICE.
          - `custodianEmaAccountIdentifier` string, required: The EMA account identifier of the custodian account
          - `autoDeposit` boolean, required: If set true - auto deposit mode will be enabled
          - `retirementSubaccountCodes` object: Mapping of a program code to a list of retirement subaccounts. Program codes are taken from ReferenceData.Program
          - `linkedRegistryAccountIds` object: Mapping of a program code to a registry account id. Program codes are taken from ReferenceData.Program
        - CustodianAccountServiceAttributes: Attributes for account service with `type` CUSTODIAN_SERVICE.
          - `custodianProgramCode` string, required: Ref.Data.CUSTODIAN_PROGRAM
          - `manualReplicaMode` boolean, required: if set true - manual replica mode will be enabled
          - `ledgerCode` string
          - `ledgerIdentifier` string
          - `accountHoldingsIdentifier` string: account identifier on custodian program
          - `accountHoldingsName` string: account name on custodian program
          - `replicaTargetSubaccountIdentifier` string: default subaccount identifier to propagate replicas to
          - `externalTransferAutoApproval` boolean, required
          - `retirementOperationsNotificationEmails` string[]: Optional addresses that receive a copy of retirement notifications, merged with user-supplied email.
  - `status` string: Ref.Data.USER_STATUS
  - `lastLogin` string, date-time: Last login timestamp
  - `isAdmin` boolean

## Response `200`

Updated user

- User
  - `firstName` string, required: Must not contain digits (0-9). Special characters are allowed. Same validation as legacy EMA UI.
  - `middleName` string: Must not contain digits (0-9). Special characters are allowed. Same validation as legacy EMA UI.
  - `lastName` string, required: Must not contain digits (0-9). Special characters are allowed. Same validation as legacy EMA UI.
  - `email` string, email, required
  - `jobTitle` string, required
  - `telephone` string
  - `authSubject` string
  - `login` string: User login name. Required when editing an existing user.
  - `address` Address, required
    - `postalCode` string, required
    - `city` string, required
    - `country` string, required: Ref.Data.COUNTRY
    - `addressLineOne` string, required
    - `addressLineTwo` string
    - `stateProvince` string: Ref.Data.STATE_PROVINCE
  - `organizationRelationship` string: Ref.Data.USER_ORGANIZATION_RELATIONSHIP
  - `roles` UserRole[]: Account-scoped entitlement roles only.
  - `account` Account
    - `id` integer, required
    - `identifier` string, required
    - `noOfUsers` integer, required
    - `status` string, required: Ref.Data.ACCOUNT_STATUS
    - `maxUsers` number, required
    - `childAccounts` Account[], required
    - `registryLinks` AccountRegistryLink[], required
      - `id` integer, required
      - `program` string, required: Ref.Data.PROGRAM
      - `registryAccountId` string, required
      - `status` string, required: Ref.Data.REGISTRY_LINK_STATUS
      - `lastSyncDate` string, date-time, nullable: Incremental sync watermark (RFC 3339 date-time), equivalent to the server's sync time identifier used for incremental sync. Omitted or null when the registry link has never been synced.
    - `organization` Organization, required
      - `iamOrgId` string
      - `legalName` string, required
      - `structure` string, required: Ref.Data.ORGANIZATION_LEGAL_STRUCTURE
      - `type` string, required: Ref.Data.ORGANIZATION_TYPE
    - `services` AccountService[], required: Service accounts for this EMA account. Each item is an `AccountService`
      - `id` integer, required
      - `status` string, required: Ref.Data.SERVICE_ACCOUNT_STATUS
      - `type` string, required: Ref.Data.SERVICE_TYPE
      - `attributes` union: Shape is determined by the parent service `type` (Ref.ServiceType), using mapping: ACX → AcxAccountServiceAttributes; SUBACCOUNT_SERVICE → SubaccountAccountServiceAttributes; CUSTODIAN_SERVICE → CustodianAccountServiceAttributes. If there are no service attributes (all other service types), do not display this object — omit `attributes`, or return `attributes` as an empty object.
        - AcxAccountServiceAttributes: Attributes for account service with `type` ACX.
          - `acxAccountIdentifier` string, required
        - SubaccountAccountServiceAttributes: Attributes for account service with `type` SUBACCOUNT_SERVICE.
          - `custodianEmaAccountIdentifier` string, required: The EMA account identifier of the custodian account
          - `autoDeposit` boolean, required: If set true - auto deposit mode will be enabled
          - `retirementSubaccountCodes` object: Mapping of a program code to a list of retirement subaccounts. Program codes are taken from ReferenceData.Program
          - `linkedRegistryAccountIds` object: Mapping of a program code to a registry account id. Program codes are taken from ReferenceData.Program
        - CustodianAccountServiceAttributes: Attributes for account service with `type` CUSTODIAN_SERVICE.
          - `custodianProgramCode` string, required: Ref.Data.CUSTODIAN_PROGRAM
          - `manualReplicaMode` boolean, required: if set true - manual replica mode will be enabled
          - `ledgerCode` string
          - `ledgerIdentifier` string
          - `accountHoldingsIdentifier` string: account identifier on custodian program
          - `accountHoldingsName` string: account name on custodian program
          - `replicaTargetSubaccountIdentifier` string: default subaccount identifier to propagate replicas to
          - `externalTransferAutoApproval` boolean, required
          - `retirementOperationsNotificationEmails` string[]: Optional addresses that receive a copy of retirement notifications, merged with user-supplied email.
  - `status` string: Ref.Data.USER_STATUS
  - `lastLogin` string, date-time: Last login timestamp
  - `isAdmin` boolean

## Other responses

- `400`: Bad request
- `401`: Not authorized error
- `404`: Not found
- `500`: Internal server error

---

[API](https://skmtc.dev/xpansiv/apis/xpansiv-connect-api.md) - [All operations](https://skmtc.dev/xpansiv/apis/xpansiv-connect-api/llms.txt) - [OpenAPI document](https://skmtc.dev/xpansiv/apis/xpansiv-connect-api/revisions/01c1f2c4ec1e?raw)
