---
title: "Update User"
method: PATCH
path: "/User/{id}"
tags: ["User"]
---

# Update User

`PATCH /User/{id}`

Update an existing 'User' record.

## Request body

- User
  - `id` string — An ID.
  - `userName` string — A one-line string.
  - `type` 'regular' | 'admin' | 'portal' | 'system' | 'super-admin' | 'api'
  - `authMethod` 'ApiKey' | 'Hmac', nullable
  - `apiKey` string, nullable — A one-line string.
  - `secretKey` string, nullable — A one-line string.
  - `salutationName` 'Mr.' | 'Ms.' | 'Mrs.' | 'Dr.', nullable
  - `firstName` string, nullable — A one-line string.
  - `lastName` string — A one-line string.
  - `isActive` boolean
  - `title` string, nullable — A one-line string.
  - `position` string, nullable — A one-line string.
  - `emailAddress` string, nullable — A primary email address.
  - `emailAddressData` object[], nullable — Multiple email addresses
    - `emailAddress` string, required
    - `primary` boolean, required
    - `optOut` boolean
    - `invalid` boolean
    - `lower` string
  - `phoneNumber` string, nullable — A primary phone number.
  - `phoneNumberData` object[], nullable — Multiple phone numbers.
    - `phoneNumber` string, required
    - `primary` boolean, required
    - `optOut` boolean
    - `invalid` boolean
    - `type` 'Mobile' | 'Office' | 'Home' | 'Fax' | 'Other'
  - `defaultTeamId` string, nullable — An ID of the record of the Team type.
  - `defaultTeamName` string, nullable — A foreign record name.
  - `acceptanceStatusMeetings` string
  - `acceptanceStatusCalls` string
  - `teamsIds` string[], nullable — IDs of records of the Team type.
  - `teamsNames` object, nullable — An {ID => record name} map.
  - `teamsColumns` object, nullable — An {ID => object} map. Relationship column values.
  - `rolesIds` string[], nullable — IDs of records of the Role type.
  - `rolesNames` object, nullable — An {ID => record name} map.
  - `portalsIds` string[], nullable — IDs of records of the Portal type.
  - `portalsNames` object, nullable — An {ID => record name} map.
  - `portalRolesIds` string[], nullable — IDs of records of the PortalRole type.
  - `portalRolesNames` object, nullable — An {ID => record name} map.
  - `contactId` string, nullable — An ID of the record of the Contact type.
  - `contactName` string, nullable — A foreign record name.
  - `accountsIds` string[], nullable — IDs of records of the Account type.
  - `accountsNames` object, nullable — An {ID => record name} map.
  - `accountId` string, nullable
  - `accountName` string, nullable — A foreign record name.
  - `avatarId` string, nullable — An ID of the record of the Attachment type.
  - `avatarName` string, nullable — A foreign record name.
  - `gender` 'Male' | 'Female' | 'Neutral', nullable
  - `createdAt` string, nullable — A timestamp in UTC.
  - `modifiedAt` string, nullable — A timestamp in UTC.
  - `createdById` string, nullable — An ID of the record of the User type.
  - `createdByName` string, nullable — A foreign record name.
  - `dashboardTemplateId` string, nullable — An ID of the record of the DashboardTemplate type.
  - `dashboardTemplateName` string, nullable — A foreign record name.
  - `workingTimeCalendarId` string, nullable — An ID of the record of the WorkingTimeCalendar type.
  - `workingTimeCalendarName` string, nullable — A foreign record name.
  - `layoutSetId` string, nullable — An ID of the record of the LayoutSet type.
  - `layoutSetName` string, nullable — A foreign record name.
  - `lastAccess` string, nullable — A timestamp in UTC.
  - `middleName` string, nullable — A one-line string.
  - `emailAddressIsOptedOut` boolean
  - `emailAddressIsInvalid` boolean
  - `phoneNumberIsOptedOut` boolean
  - `phoneNumberIsInvalid` boolean

## Response `200`

Success.

- User
  - `id` string — An ID.
  - `userName` string — A one-line string.
  - `type` 'regular' | 'admin' | 'portal' | 'system' | 'super-admin' | 'api'
  - `authMethod` 'ApiKey' | 'Hmac', nullable
  - `apiKey` string, nullable — A one-line string.
  - `secretKey` string, nullable — A one-line string.
  - `salutationName` 'Mr.' | 'Ms.' | 'Mrs.' | 'Dr.', nullable
  - `firstName` string, nullable — A one-line string.
  - `lastName` string — A one-line string.
  - `isActive` boolean
  - `title` string, nullable — A one-line string.
  - `position` string, nullable — A one-line string.
  - `emailAddress` string, nullable — A primary email address.
  - `emailAddressData` object[], nullable — Multiple email addresses
    - `emailAddress` string, required
    - `primary` boolean, required
    - `optOut` boolean
    - `invalid` boolean
    - `lower` string
  - `phoneNumber` string, nullable — A primary phone number.
  - `phoneNumberData` object[], nullable — Multiple phone numbers.
    - `phoneNumber` string, required
    - `primary` boolean, required
    - `optOut` boolean
    - `invalid` boolean
    - `type` 'Mobile' | 'Office' | 'Home' | 'Fax' | 'Other'
  - `defaultTeamId` string, nullable — An ID of the record of the Team type.
  - `defaultTeamName` string, nullable — A foreign record name.
  - `acceptanceStatusMeetings` string
  - `acceptanceStatusCalls` string
  - `teamsIds` string[], nullable — IDs of records of the Team type.
  - `teamsNames` object, nullable — An {ID => record name} map.
  - `teamsColumns` object, nullable — An {ID => object} map. Relationship column values.
  - `rolesIds` string[], nullable — IDs of records of the Role type.
  - `rolesNames` object, nullable — An {ID => record name} map.
  - `portalsIds` string[], nullable — IDs of records of the Portal type.
  - `portalsNames` object, nullable — An {ID => record name} map.
  - `portalRolesIds` string[], nullable — IDs of records of the PortalRole type.
  - `portalRolesNames` object, nullable — An {ID => record name} map.
  - `contactId` string, nullable — An ID of the record of the Contact type.
  - `contactName` string, nullable — A foreign record name.
  - `accountsIds` string[], nullable — IDs of records of the Account type.
  - `accountsNames` object, nullable — An {ID => record name} map.
  - `accountId` string, nullable
  - `accountName` string, nullable — A foreign record name.
  - `avatarId` string, nullable — An ID of the record of the Attachment type.
  - `avatarName` string, nullable — A foreign record name.
  - `gender` 'Male' | 'Female' | 'Neutral', nullable
  - `createdAt` string, nullable — A timestamp in UTC.
  - `modifiedAt` string, nullable — A timestamp in UTC.
  - `createdById` string, nullable — An ID of the record of the User type.
  - `createdByName` string, nullable — A foreign record name.
  - `dashboardTemplateId` string, nullable — An ID of the record of the DashboardTemplate type.
  - `dashboardTemplateName` string, nullable — A foreign record name.
  - `workingTimeCalendarId` string, nullable — An ID of the record of the WorkingTimeCalendar type.
  - `workingTimeCalendarName` string, nullable — A foreign record name.
  - `layoutSetId` string, nullable — An ID of the record of the LayoutSet type.
  - `layoutSetName` string, nullable — A foreign record name.
  - `lastAccess` string, nullable — A timestamp in UTC.
  - `middleName` string, nullable — A one-line string.
  - `emailAddressIsOptedOut` boolean
  - `emailAddressIsInvalid` boolean
  - `phoneNumberIsOptedOut` boolean
  - `phoneNumberIsInvalid` boolean

## Other responses

- `400` — Bad request. Might be a validation error. Check logs for details.
- `403` — Forbidden. Might be an access control error. Check logs for details.
- `409` — Conflict.

---

[API](https://skmtc.net/espocrm/apis/espocrm-api.md) · [All operations](https://skmtc.net/espocrm/apis/espocrm-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/espocrm/espocrm-api/versions/6622dabfccd3/schema)
