---
title: "Save team official lineup"
method: PUT
path: "/api/teams/{id}/lineup"
tags: ["Teams"]
---

# Save team official lineup

`PUT /api/teams/{id}/lineup`

## Request

- Base URL: `https://app.d-sports.org`
- URL: `https://app.d-sports.org/api/teams/{id}/lineup`
- Auth: HTTP bearer

Team-admin write path for the official lineup (#847). Body: { presetKey, assignments: [{ slotKey, playerId }] } - every playerId must be an active roster row on this team. Owner, editor, legacy admin, or platform admin. Upserts the single per-team row.

## Path parameters

- `id` string, required

## Request body

- object: { presetKey, assignments: [{ slotKey, playerId }] }
  - `presetKey` string, required
  - `assignments` object[], required
    - `slotKey` string, required
    - `playerId` string, required

## Response `200`

{ success, data: lineup }

## Other responses

- `400`: ROSTER_INVALID for an unknown or inactive player, with details: { reason: PLAYER_NOT_ON_ACTIVE_ROSTER, playerId }; otherwise VALIDATION_ERROR
- `401`: Authentication required
- `403`: FORBIDDEN
- `404`: Team not found

## Changes

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

[Operation history](https://skmtc.dev/d-sports-ecosystem/apis/d-sports-api/changes/api/teams/:id/lineup/put.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)
