---
title: "Update user info"
type: reference
method: POST
path: /rest-api/user/update.do
tag: "Users"
---

# Update user info

`POST https://YOUR-NETWORK-DOMAIN/rest-api/user/update.do`

Updates the profile information of a specified user. Only admin-role users can call this endpoint. The fields to update are provided as form parameters (login, password, firstName, lastName, email, phone, country, state, company, websiteUrl, active, receiveNewsletter, receiveNotificationsByEmail, role, adsHost, referer, uiStyle, comments, aiChatMonthlyLimitUsd). Only non-null fields are applied; null fields are left unchanged, except aiChatMonthlyLimitUsd, which an empty value clears. The login and email must be unique across the system. Role changes are validated against the caller's manageable roles. A country code or role id that does not exist is reported in errors.country / errors.role and nothing is saved.

## Form params

| Name | Type | Required | Example | Description |
|---|---|---|---|---|
| `usernameToUpdate` | string | yes | `john.doe` | Username (login) of the target user whose profile should be updated. The user must exist in the system |
| `active` | boolean | no | `true` | Whether the user account is active |
| `adsHost` | string | no | `ads.example.com` | Ad serving host domain |
| `aiChatMonthlyLimitUsd` | string | no | `50` | The user's monthly AI assistant budget in billed USD, 0 to 1000000. Send it empty to clear it, so the network default applies; leave it out to keep the current value. |
| `comments` | string | no | `VIP client, priority support` | Admin comments about the user |
| `company` | string | no | `Acme Inc.` | Company name |
| `country` | string | no | `US` | Two-letter country code (ISO 3166-1 alpha-2) |
| `email` | string | no | `john@example.com` | User email address |
| `firstName` | string | no | `John` | First name |
| `lastName` | string | no | `Doe` | User's last (family) name |
| `login` | string | no | `john.doe` | User login name (username) |
| `password` | string | no | `s3cur3P@ss` | User password (8-64 characters) |
| `phone` | string | no | `+1 (555) 123-4567` | Phone number |
| `receiveNewsletter` | boolean | no | `true` | Whether the user receives newsletters |
| `receiveNotificationsByEmail` | boolean | no | `true` | Whether the user receives notifications by email |
| `referer` | string | no | `https://partner.com` | Referrer URL or identifier |
| `role` | integer | no | `3` | User role ID |
| `state` | string | no | `California` | State or region name |
| `uiStyle` | string | no | `TREES` | UI style preference |
| `websiteUrl` | string | no | `https://example.com` | Website URL |

## Responses

- `200` — Operation result with success status
- `400` — Bad request — invalid or missing parameters
- `401` — Authentication error
- `403` — Forbidden — insufficient permissions

## Example request

```bash
curl --request POST \
  --url 'https://YOUR-NETWORK-DOMAIN/rest-api/user/update.do' \
  --header 'X-Api-Key: YOUR_API_KEY' \
  --header 'Content-Type: application/x-www-form-urlencoded' \
  --data-urlencode 'usernameToUpdate=john.doe' \
  --data-urlencode 'active=true' \
  --data-urlencode 'adsHost=ads.example.com' \
  --data-urlencode 'aiChatMonthlyLimitUsd=50'
```

Source: https://epom.com/ad-server/docs/api/users/post-user-update