# Update user

> Updates the given user

`PATCH https://api.light.inc/v1/users/{userId}`

## Note

Two kinds of field. firstName , lastName , email and companyEntityId cannot be cleared: null leaves them unchanged. phoneNumber , avatarUrl , country , city , address and zipcode follow the usual rule ( null clears). A credential without the company-admin role may only update its own user and cannot change email . A new email already in use fails with USER_ALREADY_REGISTERED .

## Authorization

- API key
- Bearer token

See https://light.inc/docs/getting-started/authentication.

## Path parameters

- `userId` (string, uuid, required)

## Request body

`application/json;charset=UTF-8`

- `phoneNumber.localNumber` — The number without the country code.

```json
{
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "phoneNumber": {
    "countryCode": "AC",
    "localNumber": "string"
  },
  "avatarUrl": "string",
  "country": "AC",
  "city": "string",
  "address": "string",
  "zipcode": "string"
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders, and fields that exclude each other are all shown. Do not send it unchanged.

## Response

- `phoneNumber` — May be `null`. `PATCH /v1/users/{userId}` clears it with an explicit `null`, and leaves it unchanged when the field is omitted.
- `phoneNumber.localNumber` — The number without the country code.

```json
{
  "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "email": "string",
  "firstName": "string",
  "lastName": "string",
  "phoneNumber": {
    "countryCode": "AC",
    "localNumber": "string"
  },
  "avatarUrl": "string",
  "country": "AC",
  "city": "string",
  "zipcode": "string",
  "address": "string",
  "status": "ACTIVE",
  "createdAt": "2026-01-15T09:30:00Z",
  "updatedAt": "2026-01-15T09:30:00Z",
  "roles": [
    "REIMBURSEMENT"
  ],
  "groups": [
    {
      "id": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "name": "string",
      "description": "string",
      "companyId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
      "memberCount": 100000,
      "createdAt": "2026-01-15T09:30:00Z",
      "updatedAt": "2026-01-15T09:30:00Z"
    }
  ],
  "managerIds": [
    "3c90c3cc-0d44-4b50-8888-8dd25736052a"
  ]
}
```

Values above are generated from the schema: the shapes and types are real, the values are placeholders.

## Code

```bash
curl -X PATCH "https://api.light.inc/v1/users/3c90c3cc-0d44-4b50-8888-8dd25736052a" \
  -H "Authorization: Basic YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
  "firstName": "string",
  "lastName": "string",
  "email": "string",
  "companyEntityId": "3c90c3cc-0d44-4b50-8888-8dd25736052a",
  "phoneNumber": {
    "countryCode": "AC",
    "localNumber": "string"
  },
  "avatarUrl": "string",
  "country": "AC",
  "city": "string",
  "address": "string",
  "zipcode": "string"
}'
```

---

Full page: https://light.inc/docs/api-reference/v1--users/update-user · Index: https://light.inc/docs/llms.txt
