# Update a User

```http
POST https://api.synup.com/api/v4/users/update
```

This API updates specific parameters associated with a user.

Behavior:
- Allows modifying user attributes such as name, email, or role.
- It supports updating permissions and access settings.
- Ensures only editable fields can be modified.

Source: https://developer.synup.com/api/user-management/update-a-user

## Request body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `input` | object | optional |  |
| `input.id` | string | required | Base64 encoded user ID |
| `input.roleId` | string | required | Base64 encoded role ID |
| `input.firstName` | string | required | User's first name |
| `input.lastName` | string | optional | User's last name |
| `input.email` | string | optional | User's email address |
| `input.phone` | string | optional | User's phone number |
| `input.archived` | boolean | optional | User's archive status |
| `input.directCustomer` | boolean | optional | Whether the user is a direct customer |

## Example request

```bash
curl -X POST 'https://api.synup.com/api/v4/users/update' \
  -H 'Authorization: API YOUR_API_KEY' \
  -H 'Content-Type: application/json' \
  -d '{
  "input": {
    "id": "VXNlcjo5OTY0",
    "email": "pttqa1+4186@gmail.com",
    "roleId": "Q3VzdG9tUm9sZToxNzc4Mw==",
    "firstName": "pttqa1+4187",
    "lastName": "",
    "phone": "",
    "archived": false,
    "directCustomer": true
  }
}'
```

## Responses

| Status | Description |
| --- | --- |
| `200` | Successfully updated user |
