---
title: "Create a backup schedule for a database. Daily is the shortest interval accepted."
method: POST
path: "/api/backups"
tags: ["Backups"]
---

# Create a backup schedule for a database. Daily is the shortest interval accepted.

`POST /api/backups`

## Request

- Base URL: `https://dbmigratepro.com`
- URL: `https://dbmigratepro.com/api/backups`
- Auth: HTTP bearer

## Request body

- object
  - `name` string, nullable
  - `frequency` integer, required
  - `db_url` string, required
  - `source_db_type` 'mysql' | 'postgresql', nullable
  - `retention_count` integer, nullable
  - `notify` boolean
  - `enabled` boolean
  - `storage_bucket_id` integer, nullable
  - `storage_provider` 's3' | 'gcs' | 'custom', nullable

## Response `200`

Success.

## Other responses

- `201`: Created, for the endpoints that create a resource.
- `401`: Missing or invalid API token.
- `403`: The resource belongs to another team, or the endpoint is admin-only.
- `404`: No such resource.
- `422`: Validation failed. The body carries `message` and `errors`.
- `429`: Rate limit exceeded for this tier. Retry after the `Retry-After` header.

---

[API](https://skmtc.dev/dbmigratepro/apis/dbmigratepro-rest-api.md) · [All operations](https://skmtc.dev/dbmigratepro/apis/dbmigratepro-rest-api/llms.txt) · [OpenAPI document](https://skmtc.dev/dbmigratepro/apis/dbmigratepro-rest-api/revisions/2ad329c3c189?raw)
