> ## 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.

# Power action or password reset

> Starts `start`, `stop` (clean shutdown), `restart`, `force-off` (cuts power) or `reset-password`. Runs in the background: follow it with the returned `task` (reading it needs `servers:read`).

Limits per server: 30 power actions an hour, 5 password resets an hour. `reset-password` needs the server running and the `servers:manage` scope; the new password is not in the response (see `passwordSaved`).

Scope: `servers:power (servers:manage for reset-password)`.



## OpenAPI

````yaml /api/portal/openapi.json post /v1/services/{id}/actions/{action}
openapi: 3.0.1
info:
  title: FlashRDP Server API
  version: 1.0.0
  description: >-
    Manage your FlashRDP servers with an API token created in the Billing Portal
    (Settings → Developer).
servers:
  - url: https://new.flashrdp.com
security:
  - bearerAuth: []
tags:
  - name: Servers
  - name: Power
  - name: Monitoring
  - name: Reinstall
  - name: Reverse DNS
  - name: Backups
  - name: SSH keys
paths:
  /v1/services/{id}/actions/{action}:
    post:
      tags:
        - Power
      summary: Power action or password reset
      description: >-
        Starts `start`, `stop` (clean shutdown), `restart`, `force-off` (cuts
        power) or `reset-password`. Runs in the background: follow it with the
        returned `task` (reading it needs `servers:read`).


        Limits per server: 30 power actions an hour, 5 password resets an hour.
        `reset-password` needs the server running and the `servers:manage`
        scope; the new password is not in the response (see `passwordSaved`).


        Scope: `servers:power (servers:manage for reset-password)`.
      parameters:
        - name: id
          in: path
          required: true
          schema:
            type: string
          description: >-
            The server's number, as in its Billing Portal URL
            (`new.flashrdp.com/servers/1234` → `1234`).
          example: '1234'
        - name: action
          in: path
          required: true
          schema:
            type: string
            enum:
              - start
              - stop
              - restart
              - force-off
              - reset-password
        - name: Idempotency-Key
          in: header
          required: true
          schema:
            type: string
            pattern: ^[A-Za-z0-9_-]{16,128}$
          description: >-
            A unique value per action (16–128 letters, digits, `-` or `_`), e.g.
            a UUID. Once the action was sent to the server's host, repeating the
            request with the same key returns the first answer instead of acting
            twice. A request refused before that (e.g. 409) is checked again on
            retry.
          example: 3f6c2b1e-9a51-4c8e-b0d4-6a2f1e7c9d10
      responses:
        '202':
          description: Accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  data:
                    $ref: '#/components/schemas/TaskAccepted'
                required:
                  - data
              example:
                data:
                  status: requested
                  task: 8b0c5e8e-5b5f-4b6f-9a7e-2f0f4c1d9a33
        '400':
          $ref: '#/components/responses/E400'
        '401':
          $ref: '#/components/responses/E401'
        '403':
          $ref: '#/components/responses/E403'
        '404':
          $ref: '#/components/responses/E404'
        '409':
          $ref: '#/components/responses/E409'
        '422':
          $ref: '#/components/responses/E422'
        '429':
          $ref: '#/components/responses/E429'
        '503':
          $ref: '#/components/responses/E503'
      security:
        - bearerAuth: []
components:
  schemas:
    TaskAccepted:
      type: object
      properties:
        status:
          type: string
          enum:
            - requested
            - unconfirmed
          description: >-
            `unconfirmed`: the request left but the host didn't confirm in time;
            check the server's state before retrying with a new key.
        task:
          type: string
          description: >-
            Token for `GET /v1/services/{id}/tasks/{token}`, valid for an hour.
            Absent when the action can't be followed.
        passwordSaved:
          type: boolean
          description: >-
            Reset password only: the new password was stored and can be shown in
            the Billing Portal (Server → Password → Show). It is never returned
            by the API.
    Error:
      type: object
      properties:
        error:
          type: object
          properties:
            code:
              type: string
            message:
              type: string
              description: Safe to show to a person.
          required:
            - code
            - message
      required:
        - error
  responses:
    E400:
      description: >-
        The request was refused, e.g. a missing Idempotency-Key or an invalid
        value.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: BAD_REQUEST
              message: A valid Idempotency-Key header is required.
    E401:
      description: Missing, invalid, expired or revoked token.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: AUTHENTICATION_FAILED
              message: Invalid or expired API token.
    E403:
      description: >-
        The token lacks the scope, or the endpoint is not open to tokens (on a
        closed endpoint this comes before the token is checked). Backup
        endpoints also answer 403 when backups are not switched on for the
        server.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: ACTION_NOT_ALLOWED
              message: This API token needs the servers:power scope.
    E404:
      description: No such server on your account (`NOT_FOUND` or `SERVICE_NOT_FOUND`).
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: SERVICE_NOT_FOUND
              message: Service not found.
    E409:
      description: >-
        The server isn't in a state for this: not active, not set up yet
        (`SERVICE_NOT_PROVISIONED`), suspended, another action running or
        already in that state; or the same Idempotency-Key is still being
        processed.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: ACTION_IN_PROGRESS
              message: Another action is still running on this server.
    E422:
      description: The Idempotency-Key was already used for a different request.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: IDEMPOTENCY_CONFLICT
              message: This Idempotency-Key was already used for a different request.
    E429:
      description: 'Too many requests: the token''s rate limit or this action''s own limit.'
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: RATE_LIMITED
              message: Too many requests with this API token (120 a minute).
    E503:
      description: A backend is temporarily unavailable. Retry later.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error:
              code: UPSTREAM_UNAVAILABLE
              message: This service is temporarily unavailable. Please try again.
  securitySchemes:
    bearerAuth:
      type: http
      scheme: bearer
      description: '`Authorization: Bearer frdp_pat_…`'

````

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