---
title: "Create backup schedule"
method: POST
path: "/api/v1/backup-schedules"
tags: ["Backup Schedules"]
---

# Create backup schedule

`POST /api/v1/backup-schedules`

Create a recurring backup schedule for a VM.

- **Daily** — set `type` to `daily`. Runs every day at `time`.
- **Weekly** — set `type` to `weekly` and pass `day_of_week` (Monday–Sunday). Runs on that day at `time`.

`keep_count` controls retention — older backups beyond this count are pruned automatically.

## Headers

- `X-Project-ID` string, uuid, required

## Request body

- CreateBackupScheduleRequest
  - `vm_id` string, uuid, required — Target VM UUID
  - `type` 'daily' | 'weekly', required — Schedule frequency
  - `time` string, required — Time of day to run the backup (e.g. `8am`, `13:00`)
  - `day_of_week` 'Monday' | 'Tuesday' | 'Wednesday' | 'Thursday' | 'Friday' | 'Saturday' | 'Sunday' — Day of week. Required when `type` is `weekly`.
  - `keep_count` integer, required — Number of backups to retain before auto-pruning

## Response `201`

Backup schedule created

- object
  - `success` boolean
  - `data` BackupSchedule
    - `id` integer, required — Backup schedule ID. Use this value in `/backup-schedules/{id}` for get, update, and delete.
    - `account_id` string, uuid
    - `project_id` string, uuid
    - `created_by` string
    - `region` 'us-east'
    - `product_vm` string, uuid — Source VM UUID
    - `name` string, required — Schedule display name
    - `type` 'daily' | 'weekly', required — Schedule frequency
    - `runtime` string — Human-readable schedule (e.g. `Daily at 8am`, `Saturday 8am`)
    - `keep_count` integer, required — Number of backups retained before auto-pruning
    - `price_per_hour` string — Hourly cost in USD
    - `size` string — Total size of backups currently retained for this schedule
    - `created_at` string, date-time

## Other responses

- `400` — Invalid request parameters
- `401` — Authentication required

---

[API](https://skmtc.net/rafftechnologies/apis/raff-api.md) · [All operations](https://skmtc.net/rafftechnologies/apis/raff-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/rafftechnologies/raff-api/versions/a3f123570011/schema)
