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

# FlashRDP Server API

> Manage your FlashRDP Windows VPS & RDP and Linux VPS servers from scripts: list servers, read live usage, start, stop and restart, reinstall, set reverse DNS and run backups with an API token.

The FlashRDP Server API lets your own scripts and tools manage your servers. It is a REST API that takes and returns JSON, authenticated with an API token you create in the [Billing Portal](https://new.flashrdp.com/settings/developer). It is meant for scripts and servers, not for web pages: browsers calling it from another site are refused.

> [!NOTE]
>
> The API covers servers only. Payments, invoices, orders, support tickets and account settings are never reachable with a token; the one account item it can read is your list of saved SSH keys. Server answers include each server's billing cycle, price and next due date, read only.

## Create a token

**1. Open Settings → Developer**

Sign in at [new.flashrdp.com](https://new.flashrdp.com/settings/developer) and open **Settings → Developer**.

**2. Click New token**

Give it a name, pick its permissions and how long it lasts, and confirm with your password.

**3. Copy the token**

The token starts with `frdp_pat_` and is shown **once**. Store it like a password. If you lose it, revoke it and create a new one. You can have up to 10 active tokens.

### Permissions

| Permission | Scope | What it allows |
| - | - | - |
| Read | `servers:read` | List servers, server details, power state, live usage, usage history, traffic, action progress, reverse DNS, backups, operating systems, saved SSH keys |
| Power | `servers:power` | Start, stop, restart and force off |
| Manage | `servers:manage` | Reinstall, reset the password, rename, set reverse DNS, back up now and restore |

Permissions don't include each other: a token with only **Power** can restart a server but can't read its state or follow the action. Give each token what it needs, for example **Read** for monitoring, **Read** and **Power** for a restart script.

### When tokens stop working

* When you revoke the token, or it reaches its expiry date.
* When, in the Billing Portal, you change your password or login email, reset your password, turn two-factor authentication on or off, or click **Log out all other devices**. Every token of your login is revoked. Create new ones afterwards.
* When your account is closed or the login is removed (within 5 minutes).

## Base URL and authentication

```text theme={null}
https://new.flashrdp.com
```

Send the token with every request:

```text theme={null}
Authorization: Bearer frdp_pat_YOUR_TOKEN
Accept: application/json
```

## Quick start

List your servers:

```bash theme={null}
curl https://new.flashrdp.com/v1/services \
  -H "Authorization: Bearer frdp_pat_YOUR_TOKEN"
```

Each server has an `id`, the same number as in its Billing Portal address (`new.flashrdp.com/servers/1234`). Use it in the other endpoints.

Restart a server and follow the action (needs **Power** and **Read**):

```bash theme={null}
curl -X POST https://new.flashrdp.com/v1/services/1234/actions/restart \
  -H "Authorization: Bearer frdp_pat_YOUR_TOKEN" \
  -H "Idempotency-Key: $(uuidgen)"
# → 202 {"data":{"status":"requested","task":"8b0c5e8e-…"}}

curl https://new.flashrdp.com/v1/services/1234/tasks/8b0c5e8e-… \
  -H "Authorization: Bearer frdp_pat_YOUR_TOKEN"
# → {"data":{"state":"running","progress":40}}   (queued, running, done or failed)
```

## Changes need an Idempotency-Key

Every request that changes something (`POST` and `PUT`) needs an `Idempotency-Key` header: a unique value per action, 16–128 letters, digits, `-` or `_`, for example a UUID. Once an action was handed to the server's host, retrying with the same key returns the first answer and the action runs only once. A request refused before that (for example `409` because the server is already running) is checked again when retried. Use a new key for a new action.

## Limits

* **120 requests a minute** per token, and 300 a minute per client address. Over the limit you get `429`.
* Actions have their own limits: per server 30 power actions an hour, 5 password resets an hour, 10 reinstalls a day, 2 manual backups a day and 10 renames an hour; per account 20 reverse DNS changes an hour.
* Actions run in the background. `202` with `requested` means the action was handed to the server's host; `unconfirmed` means it left but the host didn't confirm in time, so check the server's state before trying again with a new key. Power actions return a `task` to follow; reinstall, backup and restore don't (watch `…/live` or `…/backups`).

## Errors

Errors return a JSON body with a code and a message you can show to a person:

```json theme={null}
{ "error": { "code": "ACTION_NOT_ALLOWED", "message": "This API token needs the servers:power scope." } }
```

| Status | Meaning |
| - | - |
| `400` | The request is invalid, for example a missing `Idempotency-Key` |
| `401` | The token is missing, invalid, expired or revoked |
| `403` | The token lacks the permission, the endpoint is not available with a token (checked before the token itself), or backups are not switched on for the server |
| `404` | No such server on your account |
| `409` | The server isn't in a state for this: not active, not set up yet, suspended, or another action running |
| `422` | The `Idempotency-Key` was already used for a different request |
| `429` | Too many requests |
| `503` | A backend is temporarily unavailable. Retry later |

## Good to know

* A password reset through the API needs the **Manage** permission and a running server. The new password is never in the response: see it in the Billing Portal under the server's **Password → Show**.
* Traffic is counted in decimal GB: divide the byte counts by the `bytesPerGb` value in the response (1,000,000,000) to compare them with the allowance.
* Usage history has 10-minute points for the last 24 hours and hourly points for 7 days. It is recorded for servers looked at in the last 30 days, in the Billing Portal or through `…/live`.
* The operating system list is a catalogue; a reinstall answers `400` if the chosen image isn't available on that server's plan.
* The console, ISO media, rescue mode, upgrades, cancellations and SSH key changes are not available through the API. Use the [Billing Portal](https://new.flashrdp.com) or [open a ticket](https://new.flashrdp.com/support/new).


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