> For AI agents: the complete documentation index is available at https://proxykite.com/docs/llms.txt, the full documentation bundle is available at https://proxykite.com/docs/llms-full.txt.

# Credentials

Each proxy has one or more proxy users (`users[]` on the [proxy object](https://proxykite.com/docs/api/proxies.md)). This endpoint gives them new,
random 16-character passwords. The old password stops working with the node's next config pull (seconds).

## New password


`POST /proxies/{id}/password`

**Ability:** `manage` · **Who:** anyone on the account except team viewers; sub-users for their assigned proxies.

| Body field | Type   |                                                                           |
| ---------- | ------ | ------------------------------------------------------------------------- |
| `username` | string | optional, only this proxy user; omit to change **all** users of the proxy |



**curl**

```bash
curl -X POST 'https://proxykite.com/api/v1/proxies/7/password' \
  -H "Authorization: Bearer $HYP_TOKEN" \
  -H 'Accept: application/json' \
  -H 'Content-Type: application/json' \
  -d '{"username":"u7abc"}'
```


**Python**

```python
import os
import requests

r = requests.post(
    "https://proxykite.com/api/v1/proxies/7/password",
    headers={"Authorization": f"Bearer {os.environ['HYP_TOKEN']}", "Accept": "application/json"},
    json={"username": "u7abc"},
    timeout=30,
)
print(r.status_code, r.json())
```


**Node.js**

```js
const res = await fetch('https://proxykite.com/api/v1/proxies/7/password', {
  method: 'POST',
  headers: {
    Authorization: `Bearer ${process.env.HYP_TOKEN}`,
    Accept: 'application/json',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"username":"u7abc"}),
  signal: AbortSignal.timeout(30000),
});
console.log(res.status, await res.json());
```


**PHP**

```php
<?php
$ch = curl_init('https://proxykite.com/api/v1/proxies/7/password');
curl_setopt_array($ch, [
    CURLOPT_RETURNTRANSFER => true,
    CURLOPT_CUSTOMREQUEST => 'POST',
    CURLOPT_TIMEOUT => 30,
    CURLOPT_HTTPHEADER => [
        'Authorization: Bearer ' . getenv('HYP_TOKEN'),
        'Accept: application/json',
        'Content-Type: application/json',
    ],
    CURLOPT_POSTFIELDS => '{"username":"u7abc"}',
]);
$body = curl_exec($ch);
$status = curl_getinfo($ch, CURLINFO_HTTP_CODE);
var_dump($status, json_decode($body, true));
```



**Response `200`**

```json
{"data": [{"username": "u7abc", "password": "Xk3v9QmP2rT8wLzA"}]}
```

`422 validation_failed` (`fields.username`) if the proxy has no user with that name.

:::warning Not idempotent
Every call creates a new password. Update your tools with the returned value straight away.
:::
