---
title: "Create a new instance template"
method: POST
path: "/instance-templates"
tags: ["Instance Templates"]
---

# Create a new instance template

`POST /instance-templates`

## Request

- Base URL: `https://api.cloudpepper.io`
- URL: `https://api.cloudpepper.io/instance-templates`
- Auth: HTTP bearer

Creates a new instance template for you. Instance templates allow you to save predefined configurations for Odoo instances, making it easier to deploy new instances with consistent settings. Currently, instance templates primarily support backup schedule configurations.

**Key Parameters:**
- `name`: Name for your template (used for identification in the UI)
- `schedules`: It contains containing backup schedule configurations. Each configuration contains:
  - A cron expression defining when the backup should run (e.g., '00 08 * * *' for daily at 8:00 AM UTC)
  - Format: 'minute hour day-of-month month day-of-week'
  - Special values supported:
    - '@monthly' or '00 00 1 * *' (first day of month at midnight)
    - '@weekly' or '00 00 * * 0' (Sunday at midnight)
    - '@daily', '@midnight' or '00 00 * * *' (daily at midnight)
    - '@hourly' or '00 * * * *' (hourly at minute 00)
  - Interval patterns supported:
    - '00 */12 * * *' (every 12 hours)
    - '00 */6 * * *' (every 6 hours)
    - '00 */3 * * *' (every 3 hours)
  - `retention`: Integer number of days to retain backups (e.g., 7 for one week, 30 for one month)

NOTE: All pre-fill values are examples and should be replaced with actual data. Example shows how to setup multiple backups with same frequency, please adjust the configuration as per your needs.

## Request body

- object
  - `name` string, required: Name of the instance template
  - `schedules` object: Backup schedule configurations

## Response `200`

Instance template created successfully

## Other responses

- `400`: Invalid input data
- `403`: Insufficient permissions

---

[API](https://skmtc.dev/cloudpepper/apis/cloudpepper-api-docs.md) · [All operations](https://skmtc.dev/cloudpepper/apis/cloudpepper-api-docs/llms.txt) · [OpenAPI document](https://skmtc.dev/cloudpepper/apis/cloudpepper-api-docs/revisions/b6a59274cedc?raw)
