---
updatedAt: 2026-05-28T08:16:45.000Z
agentTools:
  projectIndex: https://docs.scalr.io/llms.txt
---

# Create a Team

The endpoint creates an [IAM](https://docs.scalr.io/docs/identity-and-access-management) team.
If an external IdP used, the team name must exist in that IdP.


# OpenAPI definition

```json
{
  "components": {
    "schemas": {
      "Team": {
        "description": "A [IAM](https://docs.scalr.io/docs/identity-and-access-management) team is used to organize users into logical units.\n\nA team can not be used to group service accounts, only standard users.",
        "properties": {
          "attributes": {
            "properties": {
              "description": {
                "description": "The verbose description of the team.",
                "maxLength": 255,
                "nullable": true,
                "type": "string"
              },
              "name": {
                "description": "The name of the team.",
                "maxLength": 255,
                "type": "string"
              }
            },
            "required": [
              "name"
            ],
            "type": "object"
          },
          "id": {
            "readOnly": true,
            "type": "string"
          },
          "links": {
            "properties": {
              "self": {
                "readOnly": true,
                "type": "string"
              }
            },
            "readOnly": true,
            "type": "object"
          },
          "relationships": {
            "properties": {
              "account": {
                "description": "The account this team belongs to.",
                "properties": {
                  "data": {
                    "nullable": true,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "accounts",
                          ""
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ],
                    "type": "object"
                  }
                },
                "readOnly": true,
                "required": [
                  "data"
                ],
                "type": "object"
              },
              "identity-provider": {
                "description": "Identity provider of the team. Can be internal (Scalr) or external (LDAP/SAML)",
                "properties": {
                  "data": {
                    "nullable": true,
                    "properties": {
                      "id": {
                        "type": "string"
                      },
                      "type": {
                        "enum": [
                          "identity-providers",
                          ""
                        ],
                        "type": "string"
                      }
                    },
                    "required": [
                      "type",
                      "id"
                    ],
                    "type": "object"
                  }
                },
                "readOnly": true,
                "required": [
                  "data"
                ],
                "type": "object"
              },
              "users": {
                "description": "The list of users in the team.",
                "properties": {
                  "data": {
                    "items": {
                      "properties": {
                        "id": {
                          "type": "string"
                        },
                        "type": {
                          "enum": [
                            "users",
                            ""
                          ],
                          "type": "string"
                        }
                      },
                      "required": [
                        "type",
                        "id"
                      ],
                      "type": "object"
                    },
                    "nullable": true,
                    "type": "array"
                  }
                },
                "required": [
                  "data"
                ],
                "type": "object"
              }
            },
            "type": "object"
          },
          "type": {
            "enum": [
              "teams"
            ],
            "type": "string"
          }
        },
        "required": [
          "type",
          "attributes"
        ],
        "type": "object"
      },
      "TeamDocument": {
        "description": "JSON:API Document.\n\nsee: https://jsonapi.org/format/#document-structure",
        "properties": {
          "data": {
            "$ref": "#/components/schemas/Team"
          },
          "included": {
            "items": {
              "type": "object"
            },
            "readOnly": true,
            "type": "array"
          },
          "meta": {
            "readOnly": true,
            "type": "object"
          }
        },
        "type": "object"
      }
    },
    "securitySchemes": {
      "API-Key": {
        "scheme": "bearer",
        "type": "http"
      }
    }
  },
  "info": {
    "description": "Scalr IACP API",
    "license": {
      "name": "Apache 2.0",
      "url": "https://www.apache.org/licenses/LICENSE-2.0"
    },
    "title": "Scalr IACP API",
    "version": "unversioned"
  },
  "openapi": "3.0.0",
  "paths": {
    "/teams": {
      "post": {
        "description": "The endpoint creates an [IAM](https://docs.scalr.io/docs/identity-and-access-management) team.\nIf an external IdP used, the team name must exist in that IdP.\n",
        "operationId": "create_team",
        "parameters": [
          {
            "description": "The comma-separated list of relationship paths.",
            "explode": false,
            "in": "query",
            "name": "include",
            "required": false,
            "schema": {
              "items": {
                "enum": [
                  "account",
                  "identity-provider",
                  "users"
                ],
                "type": "string"
              },
              "type": "array"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/vnd.api+json": {
              "examples": {
                "default": {
                  "value": "{\n  \"data\": {\n    \"attributes\": {\n      \"description\": null,\n      \"name\": \"team4\"\n    },\n    \"relationships\": {\n      \"identity-provider\": {\n        \"data\": {\n          \"id\": \"idp-sohkb0o1phrdmr8\",\n          \"type\": \"identity-providers\"\n        }\n      },\n      \"users\": {\n        \"data\": [\n          {\n            \"id\": \"user-suh84u70pjo994o\",\n            \"type\": \"users\"\n          }\n        ]\n      }\n    },\n    \"type\": \"teams\"\n    }\n}"
                }
              },
              "schema": {
                "$ref": "#/components/schemas/TeamDocument"
              }
            }
          }
        },
        "responses": {
          "201": {
            "content": {
              "application/vnd.api+json": {
                "examples": {
                  "default": {
                    "value": "{\n  \"data\":{\n    \"attributes\":{\n      \"description\":\"\",\n      \"name\":\"team4\"\n    },\n    \"id\":\"team-tjumhdrhf3gk2io\",\n    \"links\":{\n      \"self\":\"https://my.scalr.io/api/iacp/v3/teams/team-tjumhdrhf3gk2io\"\n    },\n    \"relationships\":{\n      \"account\": {\n        \"data\": {\n          \"id\": \"acc-svrcncgh453bi8g\",\n          \"type\": \"accounts\"\n        },\n      },\n      \"identity-provider\":{\n        \"data\":{\n          \"id\":\"idp-sohkb0o1phrdmr8\",\n          \"type\":\"identity-providers\"\n        }\n      },\n      \"users\":{\n        \"data\":[\n          {\n            \"id\":\"user-suh84u70pjo994o\",\n            \"type\":\"users\"\n          }\n        ]\n      }\n    },\n    \"type\":\"teams\"\n  },\n  \"included\": null,\n  \"meta\":null\n}"
                  }
                },
                "schema": {
                  "$ref": "#/components/schemas/TeamDocument"
                }
              }
            },
            "description": "Successfully created."
          },
          "403": {
            "description": "User unauthorized to perform this action."
          },
          "404": {
            "description": "Relationship not found or user is not authorized to read it."
          },
          "409": {
            "description": "Quota exceeded error."
          },
          "422": {
            "description": "Malformed request body (missing attributes, wrong types, etc.)"
          },
          "4XX": {
            "description": "Client error."
          },
          "5XX": {
            "description": "Server error."
          }
        },
        "summary": "Create a Team",
        "tags": [
          "teams"
        ],
        "x-resource": "Team",
        "x-service": "tf-api"
      }
    }
  },
  "security": [
    {
      "API-Key": []
    }
  ],
  "servers": [
    {
      "url": "https://{Domain}/api/iacp/v3",
      "variables": {
        "Domain": {
          "default": "example.scalr.io",
          "description": "Domain where Scalr is hosted"
        }
      }
    }
  ]
}
```

# Sibling pages

* [List Teams](https://docs.scalr.io/scalr/reference/get_teams.md)
* [Delete a Team](https://docs.scalr.io/scalr/reference/delete_team.md)
* [Get a Team](https://docs.scalr.io/scalr/reference/get_team.md)
* [Update a Team](https://docs.scalr.io/scalr/reference/update_team.md)