---
title: "POST /api/teams/workspace/{workspace_id}/"
method: POST
path: "/api/teams/workspace/{workspace_id}/"
tags: ["Teams"]
---

# POST /api/teams/workspace/{workspace_id}/

`POST /api/teams/workspace/{workspace_id}/`

Creates a new team.

## Path parameters

- `workspace_id` string, required

## Headers

- `ClientSessionId` string, uuid

## Request body

- Team — Mixin to a DRF serializer class to raise an exception if data with unknown fields is provided to the serializer.
  - `name` string, required — A human friendly name for this team.
  - `default_role` string, nullable — The uid of the role you want to assign to the team in the given workspace. You can omit this property if you want to remove the role.
  - `subjects` TeamSubject[] — An array of subject ID/type objects to be used during team create and update.
    - `id` integer, required
    - `subject_id` integer — The subject's unique identifier.
    - `subject_user_email` string, email — The user subject's email address.
    - `subject_type` 'auth.User', required — * `auth.User` - auth.User

## Response `200`

- TeamResponse
  - `id` integer, required
  - `name` string, required — A human friendly name for this team.
  - `workspace` integer, required — The workspace that this team belongs to.
  - `created_on` string, date-time, required
  - `updated_on` string, date-time, required
  - `default_role` string — The uid of the role this team has in its workspace.
  - `subject_count` integer, required — The amount of subjects (e.g. users) that are currently assigned to this team.
  - `subject_sample` TeamSampleSubject[] — A sample, by default 10, of the most recent subjects to join this team.
    - `subject_id` integer, required — The subject's unique identifier.
    - `subject_type` 'auth.User', required — * `auth.User` - auth.User
    - `subject_label` string, required — The subject's label. Defaults to a user's first name.
    - `team_subject_id` integer, required — The team subject unique identifier.

## Other responses

- `400`
- `404`

---

[API](https://skmtc.net/baserow/apis/baserow-api-spec.md) · [All operations](https://skmtc.net/baserow/apis/baserow-api-spec/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/baserow/baserow-api-spec/versions/0c490e5b0c7f/schema)
