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

# Credential Rotation API

> Get new usernames and passwords for your ISP and datacenter proxies through the API.

Rotating gives your proxies a new random username and password. The IPs stay the same; the old credentials stop working right away. Each proxy can be rotated once every 24 hours.

| Method | Endpoint | Description |
| - | - | - |
| `POST` | `https://api.roundproxies.com/proxies/rotate/isp/credentials` | Rotate ISP proxy credentials |
| `POST` | `https://api.roundproxies.com/proxies/rotate/datacenter/credentials` | Rotate datacenter proxy credentials |

## Authentication

Send your API key in the `x-api-key` header. You can find it in your [dashboard](https://app.roundproxies.com/dashboard/api).

## Rotate Credentials

**subscriptionId** `string` *required*

The ID of your ISP or datacenter subscription. Use the ISP endpoint for ISP plans and the datacenter endpoint for datacenter plans.

**ips** `string[]`

Only rotate these proxies, 1 to 500 per request. Leave it out to rotate every proxy on the plan.

> [tab] Node.js
>
> ```javascript Node.js theme={null}
> const res = await fetch("https://api.roundproxies.com/proxies/rotate/isp/credentials", {
>   method: "POST",
>   headers: {
>     "x-api-key": process.env.RP_API_KEY,
>     "Content-Type": "application/json",
>   },
>   body: JSON.stringify({ subscriptionId: "{SUBSCRIPTION_ID}", ips: ["198.51.100.7"] }),
> });
> console.log(await res.json());
> ```

> [tab] Python
>
> ```python Python theme={null}
> import os
> import requests
>
> res = requests.post(
>     "https://api.roundproxies.com/proxies/rotate/isp/credentials",
>     headers={"x-api-key": os.environ["RP_API_KEY"]},
>     json={"subscriptionId": "{SUBSCRIPTION_ID}", "ips": ["198.51.100.7"]},
> )
> print(res.json())
> ```

> [tab] cURL
>
> ```bash cURL theme={null}
> curl -X POST https://api.roundproxies.com/proxies/rotate/isp/credentials \
>   -H "x-api-key: $RP_API_KEY" \
>   -H "Content-Type: application/json" \
>   -d '{"subscriptionId": "{SUBSCRIPTION_ID}", "ips": ["198.51.100.7"]}'
> ```

## Response

```json 200 OK theme={null}
{
  "rotatedCount": 1,
  "proxies": [
    { "ip": "198.51.100.7", "port": 8000, "username": "3f9a1c2b7d4e", "password": "a81c0f5e92bd" }
  ],
  "skipped": [
    { "ip": "198.51.100.8", "nextAvailableAt": "2026-11-19T10:00:00.000Z" }
  ],
  "notFound": []
}
```

| Field | Type | Description |
| - | - | - |
| `rotatedCount` | number | How many credentials were rotated |
| `proxies` | object\[] | The new credentials: `ip`, `port`, `username` and `password`. Save them: the old ones no longer work. |
| `skipped` | object\[] | Proxies rotated in the last 24 hours, left as they are, with `nextAvailableAt` |
| `notFound` | string\[] | IPs you sent that are not on this subscription |

> [!NOTE]
>
> Your OS fingerprint setting carries over to the new credentials.

## Limits

* Each proxy once every 24 hours. When you rotate a whole plan, proxies rotated in the last 24 hours are skipped and the rest are rotated.
* 10 requests per minute.

## Errors

| Status | Meaning |
| - | - |
| `400` | The body is invalid; the subscription is not found, not yours, not active or the wrong type for this endpoint; none of the IPs are on it; or every proxy was rotated in the last 24 hours (the `message` says when the next one is available). |
| `401` | The API key is missing or invalid. |
| `403` | The account is suspended. |
| `429` | Too many requests. Wait a minute and try again. |

## Related

> [card] [OS Fingerprint API](https://docs.roundproxies.com/os-fingerprint.md)
>
> Set and check the OS your proxies look like.

> [card] [ISP Authentication](https://docs.roundproxies.com/isp/authentication.md)
>
> Username and password or IP whitelisting.


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