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

# Buy Backup Slots

> Buys the paid slots, so the server can keep up to five backups. They are paid
from your account balance at once: the monthly surcharge prorated over the
days left until the server expires, VAT of your country included (see
`paid_slots_price`). Every renewal afterwards includes the surcharge.

Enables backups in the same step if they were off.




## OpenAPI

````yaml post /servers/{server}/backups/slots
openapi: 3.1.0
info:
  title: APIFiddle Sample Definition
  version: 0.0.0
  description: Example workspace
servers:
  - url: https://rdp.sh/api/v1
    description: Default production endpoint.
security: []
paths:
  /servers/{server}/backups/slots:
    post:
      summary: Buy the paid backup slots
      description: >
        Buys the paid slots, so the server can keep up to five backups. They are
        paid

        from your account balance at once: the monthly surcharge prorated over
        the

        days left until the server expires, VAT of your country included (see

        `paid_slots_price`). Every renewal afterwards includes the surcharge.


        Enables backups in the same step if they were off.
      operationId: buyServerBackupSlots
      parameters:
        - $ref: '#/components/parameters/server'
      responses:
        '201':
          content:
            application/json:
              schema:
                title: BuyBackupSlotsOk
                allOf:
                  - type: object
                    properties:
                      status:
                        type: boolean
                        examples:
                          - true
                      message:
                        type: string
                        examples:
                          - This server can now keep up to 5 backups.
                      invoice_id:
                        type: integer
                        examples:
                          - 5014
                      amount_charged:
                        type: number
                        examples:
                          - 1.19
                  - $ref: '#/components/schemas/backupSettings'
          description: The paid slots were charged to your balance.
        '400':
          content:
            application/json:
              schema:
                type: object
                title: BuyBackupSlotsBadRequest
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - Insufficient balance
                  required:
                    type: number
                    examples:
                      - 1.19
                  available:
                    type: number
                    examples:
                      - 1
          description: Insufficient balance.
        '403':
          description: User does not own the server.
        '404':
          description: Server not found.
        '409':
          content:
            application/json:
              schema:
                type: object
                title: BuyBackupSlotsConflict
                properties:
                  status:
                    type: boolean
                    examples:
                      - false
                  error:
                    type: string
                    examples:
                      - This server already has all 5 backup slots.
          description: >
            The server already has the paid slots, has expired, has no backup
            storage

            on its node yet, or is suspended or busy. Nothing is charged.
      security:
        - Authorization: []
components:
  parameters:
    server:
      in: path
      name: server
      schema:
        type: string
      required: true
  schemas:
    backupSettings:
      type: object
      required:
        - enabled
        - slots
      properties:
        enabled:
          type: boolean
          description: Whether backups are enabled for the server.
          examples:
            - true
        slots:
          type: object
          properties:
            total:
              type: integer
              description: How many backups the server can keep.
              examples:
                - 1
            free:
              type: integer
              description: How many of them are free of charge.
              examples:
                - 1
            paid:
              type: boolean
              description: Whether the paid slots are bought.
              examples:
                - false
            paid_total:
              type: integer
              description: How many backups the server can keep with the paid slots.
              examples:
                - 5
        schedule:
          description: When the server is backed up, or `null` while backups are disabled.
          oneOf:
            - type: object
              properties:
                frequency:
                  type: string
                  enum:
                    - daily
                    - weekly
                hour:
                  type: integer
                  description: The hour the backup starts, in UTC.
                  examples:
                    - 3
                weekday:
                  type:
                    - integer
                    - 'null'
                  description: 0 = Sunday to 6 = Saturday, for a weekly schedule.
                retention:
                  type: integer
                  description: How many backups are kept.
                  examples:
                    - 1
            - type: 'null'
      description: Whether a server's backups are enabled, its slots and its schedule.
  securitySchemes:
    Authorization:
      in: header
      name: Authorization
      type: apiKey
      description: |
        Your API key as it is, without `Bearer`. API access is off for new
        accounts: until it is turned on under Settings > API, every request
        answers `403` with `API access is turned off for this account. Turn it
        on under Settings > API.` If the account lists allowed IPs, a request
        from any other address answers `403` with `This API key is not allowed
        from <address>`.

````

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