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

# Create a manual backup

> Enqueue a manual backup job for the VM. The VM must have daily backups enabled and remain under the per-VM backup cap. Requires the `backups:write` scope.



## OpenAPI

````yaml https://api.vmarea.com/api/public/v1/openapi.json post /api/public/v1/vms/{vmId}/backups
openapi: 3.1.0
info:
  title: VMArea Public API
  version: 1.0.0
  description: >-
    The VMArea Public API lets you provision and manage VMs, networks,
    firewalls, SSH keys, backups, and webhooks programmatically. Authenticate
    every request with an API token (`x-api-key` header) created in the
    dashboard. Tokens carry coarse scopes (e.g. `vms:write`); endpoints reject
    calls that lack the scope they require.
  contact:
    name: VMArea Support
    url: https://vmarea.com/support
servers:
  - url: https://api.vmarea.com/api/v1
    description: Production
security:
  - ApiKey: []
paths:
  /api/public/v1/vms/{vmId}/backups:
    post:
      tags:
        - Backups
      summary: Create a manual backup
      description: >-
        Enqueue a manual backup job for the VM. The VM must have daily backups
        enabled and remain under the per-VM backup cap. Requires the
        `backups:write` scope.
      operationId: createVmBackup
      parameters:
        - schema:
            type: string
          in: path
          name: vmId
          required: true
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                note:
                  type: string
                  maxLength: 500
                mode:
                  type: string
                  enum:
                    - snapshot
                    - suspend
                    - stop
                  default: snapshot
                compress:
                  type: string
                  enum:
                    - zstd
                    - lzo
                    - gzip
                    - none
                  default: zstd
              additionalProperties: false
      responses:
        '202':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - true
                  data:
                    type: object
                    properties:
                      backup:
                        type: object
                        properties:
                          id:
                            type: string
                          vmId:
                            type: string
                          type:
                            type: string
                          status:
                            type: string
                          size:
                            type: string
                            nullable: true
                          note:
                            type: string
                            nullable: true
                          createdAt:
                            type: string
                            format: date-time
                        required:
                          - id
                          - vmId
                          - type
                          - status
                          - size
                          - note
                          - createdAt
                        additionalProperties: false
                      actionId:
                        type: string
                    required:
                      - backup
                      - actionId
                    additionalProperties: false
                required:
                  - success
                  - data
                additionalProperties: false
        '401':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: string
                required:
                  - success
                  - error
                additionalProperties: false
        '403':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: string
                required:
                  - success
                  - error
                additionalProperties: false
        '404':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: string
                required:
                  - success
                  - error
                additionalProperties: false
        '409':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: string
                required:
                  - success
                  - error
                additionalProperties: false
        '422':
          description: Default Response
          content:
            application/json:
              schema:
                type: object
                properties:
                  success:
                    type: boolean
                    enum:
                      - false
                  error:
                    type: string
                required:
                  - success
                  - error
                additionalProperties: false
      security:
        - ApiKey: []
components:
  securitySchemes:
    ApiKey:
      type: apiKey
      name: x-api-key
      in: header
      description: >-
        Long-lived API token created at
        https://vmarea.com/dashboard/settings/api-keys. Tokens are
        scope-restricted; this spec lists the scope each endpoint requires.

````