---
title: "Create baseline"
method: POST
path: "/baselines"
tags: ["Baselines (Preview)"]
---

# Create baseline

`POST /baselines`

**Preview.** Available to teams with the `baselines_api` feature flag.

Create a baseline in the team. A baseline can target all servers, a custom set (when the
plan is not yet known), or one or more specific platforms. When it targets platforms, the
disk layout is validated by the same rules a deploy applies — against the smallest of the
selected platforms — so a baseline that saves here can be dispatched verbatim.

## Request body

- object
  - `data` object
    - `type` 'baselines'
    - `attributes` object
      - `name` string, required — Name of the baseline
      - `description` string, nullable — Description of the baseline
      - `target_type` 'all_servers' | 'custom' | 'platforms', required — Baseline target: all servers, a custom set (plan unknown), or specific platforms
      - `operating_system` string, required — Slug of the operating system the baseline expects the server to run (required)
      - `platforms` string[] — Slugs of the plans this baseline applies to. Required when target_type is "platforms"
      - `ssh_key_ids` string[] — SSH keys the baseline expects on the server
      - `user_data_id` string, nullable — User data the baseline expects to run on first boot
      - `disk_layout` BaselineDiskLayoutGroup[] — Expected disk layout
        - `role` 'os' | 'storage' | 'raw' — Purpose of the disk group
        - `count` integer — Number of disks in the group
        - `raid_level` 'raid-0' | 'raid-1', nullable — RAID level for the group. Only valid for the 'os' and 'storage' roles
        - `filesystem` 'ext4', nullable — Filesystem to format the group with. Only valid for the 'storage' role
        - `mount_point` string, nullable — Where the group is mounted. Required for the 'storage' role
      - `bios` object — Expected BIOS settings, keyed by setting id

## Response `201`

Created

## Changes

- **2026-08-19** `9545f24e8507` — 6 breaking, 1 info
  - added the new required request property `data/attributes/operating_system` (media type: application/json)
  - added the new required request property `data/attributes/operating_system` (media type: application/vnd.api+json)
  - the request property `data/attributes/name` became required (media type: application/json)
  - the request property `data/attributes/name` became required (media type: application/vnd.api+json)
  - …3 more
- **2026-08-12** `0fe02e1d8c8c` — 3 warning, 6 info
  - removed the request property `data/attributes/plan` (media type: application/json)
  - removed the request property `data/attributes/plan` (media type: application/vnd.api+json)
  - removed the optional property `data/attributes/plan` from the response with the `201` status
  - added the new optional request property `data/attributes/platforms` (media type: application/json)
  - …5 more
- **2026-08-03** `2c8cdfbc01d0` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/latitude/apis/latitude-sh-api/changes/baselines/post.md)

---

[API](https://skmtc.dev/latitude/apis/latitude-sh-api.md) · [All operations](https://skmtc.dev/latitude/apis/latitude-sh-api/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/latitude/latitude-sh-api/revisions/437c7a97e596/schema)
