> ## Documentation Index
> Fetch the complete documentation index at: https://docs.zeplo.ai/llms.txt
> Use this file to discover all available pages before exploring further.

# PUT Update User

> Update user details and status.

## Update user

`PUT /api/users/:id`

### Headers

**Cookie** `string` *required*

Session cookie (login via POST /api/auth/login)

**id** `integer` *required*

User ID.

### Body parameters

**name** `string`

Updated display name.

**email** `string`

Updated email address.

**phone** `string`

Updated phone number.

```json theme={null}
{
  "name": "Updated Name",
  "email": "newemail@example.com",
  "phone": "919876543211"
}
```

```bash cURL theme={null}
curl -X PUT https://zeplo.ai/api/users/1 \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Updated Name",
    "email": "newemail@example.com",
    "phone": "919876543211"
  }'
```

***

## Update user status

`PUT /api/user/status/:id`

**id** `integer` *required*

User ID.

### Body parameters

**status** `string` *required*

New status value.

```json theme={null}
{
  "status": "suspended"
}
```

```bash cURL theme={null}
curl -X PUT https://zeplo.ai/api/user/status/1 \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{ "status": "suspended" }'
```

### Status values

| Status | Description |
| - | - |
| `active` | User can log in |
| `suspended` | User is suspended |
| `inactive` | User is deactivated |

***

## Bulk update status

`PUT /api/admin/users/bulk-status`

### Body parameters

**userIds** `integer[]` *required*

Array of user IDs to update.

**status** `string` *required*

New status to apply to all users.

```json theme={null}
{
  "userIds": [5, 6, 7],
  "status": "suspended"
}
```

```bash cURL theme={null}
curl -X PUT https://zeplo.ai/api/admin/users/bulk-status \
  -H "Cookie: connect.sid=s%3A7HImZ-T2BxWSbUsf9dtWdOlBW4rVuORO.5J0Do0NyvBu%2BkTvu1aHvtNs00BKhkpUKTwiokLS0cpw" \
  -H "Content-Type: application/json" \
  -d '{ "userIds": [5, 6, 7], "status": "suspended" }'
```


This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.