---
title: "Create custom formation"
method: POST
path: "/api/me/custom-formations"
tags: ["Teams"]
---

# Create custom formation

`POST /api/me/custom-formations`

## Request

- Base URL: `https://app.d-sports.org`
- URL: `https://app.d-sports.org/api/me/custom-formations`
- Auth: HTTP bearer

Save a formation template (#847). Body: { sport, name, presetKey, slots }. Names are unique per sport; at most 20 templates per sport (CUSTOM_FORMATION_LIMIT).

## Request body

- object: { sport, name, presetKey, slots }
  - `sport` string, required
  - `name` string, required
  - `presetKey` string, required
  - `slots` object, required: Record<slotKey, slot layout> - opaque to the backend, at most 30 entries.

## Response `201`

{ success, data: formation }

## Other responses

- `400`: VALIDATION_ERROR
- `401`: Authentication required
- `409`: CONFLICT or CUSTOM_FORMATION_LIMIT

## Changes

- **2026-11-18** `6de639c52609`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/changes/api/me/custom-formations/post.md)

---

[API](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api.md) - [All operations](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/llms.txt) - [OpenAPI document](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/revisions/63735cf90a04?raw)
