---
title: "Upsert Team"
method: POST
path: "/api/v1/teams"
tags: ["Teams"]
---

# Upsert Team

`POST /api/v1/teams`

Upsert a team record.

Inserts a new team or updates an existing one based on team_id.

## Headers

- `x-api-key` string, nullable
- `League` string, nullable

## Request body

- TeamUpsertRequest — Request schema for upserting a team record.
  - `team_id` string, uuid, required — Team ID (must be a valid UUID)
  - `name` string, required — Team name (used for alias, market, and name)
  - `color` string, nullable — Team color (hex code), defaults to #424242 if not provided

## Response `200`

Successful Response

- TeamUpsertResponse — Response schema for team upsert operation.
  - `success` boolean, required — Whether the operation was successful
  - `message` string, required — Status message
  - `team_id` string, required — The team_id of the upserted team

## Other responses

- `422` — Validation Error

---

[API](https://skmtc.net/preciser/apis/preciser-data-management-api.md) · [All operations](https://skmtc.net/preciser/apis/preciser-data-management-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/preciser/preciser-data-management-api/versions/c5f6b8674011/schema)
