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

# Create Backup

> Create an on-demand backup of a VM. The backup is created asynchronously — the response returns immediately with a `pending` status.

Use [List Backups](#tag/Backups/operation/listBackups) or [Get Backup](#tag/Backups/operation/getBackup) to track completion.


<sub>Updated May 8, 2026</sub>


## OpenAPI

````yaml POST /api/v1/backups
openapi: 3.0.3
info:
  title: Raff API
  description: >
    REST API for managing cloud infrastructure on Raff.


    ## Authentication

    Most endpoints require authentication via API key. Catalog endpoints under
    `/api/v1/public/` are open and require no authentication.


    ### API Key Authentication

    Include your API key in the `X-API-Key` header:
      ```
      curl -H "X-API-Key: YOUR_API_KEY" https://api.rafftechnologies.com/api/v1/vms
      ```

    ## Catalog

    Use the public catalog endpoints to discover available regions, OS
    templates, and pricing plans before creating resources:

    - `GET /api/v1/public/regions` — list available regions

    - `GET /api/v1/public/templates` — list OS templates (use the `id` as
    `template_id` when creating a VM)

    - `GET /api/v1/public/pricing/vm` — list VM pricing plans (use the `id` as
    `pricing_id` when creating a VM)

    - `GET /api/v1/public/pricing/volume` — volume storage pricing

    - `GET /api/v1/public/pricing/snapshot` — snapshot storage pricing

    - `GET /api/v1/public/pricing/backup` — backup storage pricing

    - `GET /api/v1/public/pricing/ip` — IP address pricing
  version: 1.0.0
  contact:
    name: Raff Technologies
    url: https://rafftechnologies.com
servers:
  - url: https://api.rafftechnologies.com
    description: Production
security:
  - ApiKeyAuth: []
tags:
  - name: Catalog
    description: >-
      Discover available regions, OS templates, and pricing plans. No
      authentication required.
  - name: Health
    description: Health check endpoints
  - name: Projects
    description: Organize resources into projects for billing and access control
  - name: Virtual Machines
    description: Create, manage, and control virtual machines
  - name: Networking
    description: >-
      Attach and detach VPCs, floating IPs, and security groups to VM network
      interfaces
  - name: Snapshots
    description: Point-in-time copies of VMs and volumes for quick rollback or cloning
  - name: Backups
    description: Scheduled and on-demand VM backups with restore capability
  - name: Backup Schedules
    description: Recurring daily or weekly backup schedules attached to a VM
  - name: SSH Keys
    description: Manage account-level SSH keys for VM provisioning
  - name: Members
    description: Account-level members — invite, list, update role, remove
  - name: Project Members
    description: Members of a specific project — same model as Members but project-scoped
  - name: Roles
    description: Custom roles bundling account or project permissions
  - name: Permissions
    description: List the catalog of permission strings used by roles
  - name: API Keys
    description: Create and manage API keys for programmatic access
  - name: Invitations
    description: Create and cancel email-based invitations to join the account or a project
paths:
  /api/v1/backups:
    post:
      tags:
        - Backups
      summary: Create backup
      description: >
        Create an on-demand backup of a VM. The backup is created asynchronously
        — the response returns immediately with a `pending` status.


        Use [List Backups](#tag/Backups/operation/listBackups) or [Get
        Backup](#tag/Backups/operation/getBackup) to track completion.
      operationId: createBackup
      parameters:
        - $ref: '#/components/parameters/ProjectIDHeader'
      requestBody:
        required: true
        content:
          application/json:
            schema:
              $ref: '#/components/schemas/CreateBackupRequest'
      responses:
        '202':
          description: Backup creation accepted
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                  data:
                    $ref: '#/components/schemas/Backup'
        '400':
          $ref: '#/components/responses/BadRequest'
        '401':
          $ref: '#/components/responses/Unauthorized'
        '402':
          $ref: '#/components/responses/InsufficientBalance'
        '403':
          $ref: '#/components/responses/BillingValidationFailed'
components:
  parameters:
    ProjectIDHeader:
      name: X-Project-ID
      in: header
      required: true
      description: >-
        Project ID. Required for all mutating operations (create, delete, power
        actions, resize).
      schema:
        type: string
        format: uuid
  schemas:
    CreateBackupRequest:
      type: object
      required:
        - vm_id
      properties:
        vm_id:
          type: string
          format: uuid
          description: Source VM UUID
        name:
          type: string
          maxLength: 128
          description: Optional backup display name. Defaults to a timestamped name.
    Backup:
      type: object
      required:
        - id
        - name
        - storage_size
        - status
      properties:
        id:
          type: string
          format: uuid
          description: Backup ID
        account_id:
          type: string
          format: uuid
          description: Account that owns the backup
        project_id:
          type: string
          format: uuid
          description: Project the backup belongs to
        created_by:
          type: string
          description: User ID that created the backup
        region:
          type: string
          enum:
            - us-east
          description: Region the backup is stored in
        product_vm:
          type: string
          format: uuid
          description: Source VM UUID
        name:
          type: string
          description: Backup display name
        storage_size:
          type: integer
          description: >
            Backup size in **MB**. For incremental restore points this is the
            per-increment delta;

            for legacy standalone backups it is the full image size. Display in
            MB up to 1024,

            else convert to GB (`storage_size / 1024`). Pricing math:
            `(storage_size / 1024) * price_per_gb`.
        status:
          type: string
          description: |
            Backup lifecycle status. Common values:
            - `pending` — creation queued
            - `creating` — backup being captured
            - `ready` — available for restore
            - `restoring` — currently restoring to a VM
            - `failed` — creation or restore failed
        price_per_hour:
          type: string
          description: Hourly storage cost in USD
        expire_date:
          type: string
          format: date-time
          description: >-
            When the backup will be auto-pruned (only set when retention
            applies)
        increment_id:
          type: integer
          nullable: true
          description: >
            Restore-point position within an incremental backup series.


            - `null` — legacy standalone backup (no series).

            - `0` — first restore point of a series.

            - `1`, `2`, … — subsequent restore points in the same series.


            Backups that share the same series are deleted together. Deleting a
            single

            restore point that has older points in its series triggers a
            series-wide delete.

            Use [Delete backup
            series](/api-reference/virtual-machines/delete-backup-series)

            to remove a whole series explicitly, or

            [Reset backup
            series](/api-reference/virtual-machines/reset-backup-series)

            to start a fresh baseline on the next backup.
        created_at:
          type: string
          format: date-time
    Error:
      type: object
      properties:
        error:
          type: string
        message:
          type: string
    BillingError:
      type: object
      description: >-
        Billing validation error response. Returned when the account is not in
        good standing for paid operations.
      required:
        - error
        - reason
      properties:
        error:
          type: string
          example: Billing validation failed
        message:
          type: string
          example: Payment failed. Please update your payment method.
        reason:
          type: string
          description: >
            Machine-readable reason code:

            - `banned` — account has been suspended

            - `failed` — last payment failed; balance top-up needed

            - `no_billing_customer` — billing has not been set up for this
            account
          enum:
            - banned
            - failed
            - no_billing_customer
  responses:
    BadRequest:
      description: Invalid request parameters
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    Unauthorized:
      description: Authentication required
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
    InsufficientBalance:
      description: >
        Account balance is insufficient for this operation. Top up the balance
        and retry.
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/Error'
          example:
            error: Payment Required
            message: Insufficient balance for subscription
    BillingValidationFailed:
      description: |
        Billing validation failed. The account is not in good standing.
        Check the `reason` field:
        - `banned` — account suspended
        - `failed` — last payment failed; top up the account balance
        - `no_billing_customer` — billing not set up
      content:
        application/json:
          schema:
            $ref: '#/components/schemas/BillingError'
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: X-API-Key
      description: API key for authentication. Each key is bound to a specific account.

````