# Add Team

Add a team (organization) with its name and admin credentials.

In the request body, define the new team admin's `admin_email`, `admin_name` and `password`. 

SeaTable does not automatically create a workspace for a newly added user: the `with_workspace` parameter is `false` by default. If you would like your new user to have a workspace when they are added (so that they can start operating workspaces and bases right away with API requests), make sure you set `true` for this parameter.

Otherwise, their workspace will only be created when they login to the SeaTable web interface for the first time.

# OpenAPI definition

```json
{
  "openapi": "3.0.0",
  "info": {
    "title": "Account Operations: System admin",
    "description": "The official SeaTable API Reference (OpenAPI 3.0).",
    "version": "6.2"
  },
  "servers": [
    {
      "url": "https://{server}",
      "variables": {
        "server": {
          "default": "cloud.seatable.io"
        }
      }
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "metrics-enabled": false,
    "proxy-enabled": false
  },
  "tags": [
    {
      "name": "Teams",
      "description": "Manage teams/organizations"
    }
  ],
  "components": {
    "securitySchemes": {
      "AccountTokenAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "This is the [Account-Token](/reference/authentication)."
      }
    },
    "schemas": {
      "system_admin_password": {
        "type": "string",
        "description": "Login password of the user.",
        "example": "password_test"
      },
      "org_name": {
        "type": "string",
        "description": "Name of the team.",
        "example": "Demo Testing"
      },
      "admin_email": {
        "type": "string",
        "description": "Login email of the team administrator. Required. Has to be unique in the system.",
        "example": "username"
      },
      "admin_name": {
        "type": "string",
        "description": "Full name of the team administrator. Optional.",
        "example": "Max Example"
      },
      "with_workspace": {
        "type": "boolean",
        "description": "If a workspace should be automatically created for the user. Optional. `false` by default.",
        "example": true
      }
    }
  },
  "paths": {
    "/api/v2.1/admin/organizations/": {
      "post": {
        "tags": [
          "Teams"
        ],
        "summary": "Add Team",
        "operationId": "addTeam",
        "description": "Add a team (organization) with its name and admin credentials.\n\nIn the request body, define the new team admin's `admin_email`, `admin_name` and `password`. \n\nSeaTable does not automatically create a workspace for a newly added user: the `with_workspace` parameter is `false` by default. If you would like your new user to have a workspace when they are added (so that they can start operating workspaces and bases right away with API requests), make sure you set `true` for this parameter.\n\nOtherwise, their workspace will only be created when they login to the SeaTable web interface for the first time.",
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "type": "object",
                "properties": {
                  "org_name": {
                    "$ref": "#/components/schemas/org_name"
                  },
                  "admin_email": {
                    "$ref": "#/components/schemas/admin_email"
                  },
                  "password": {
                    "$ref": "#/components/schemas/system_admin_password"
                  },
                  "admin_name": {
                    "$ref": "#/components/schemas/admin_name"
                  },
                  "with_workspace": {
                    "$ref": "#/components/schemas/with_workspace"
                  }
                },
                "required": [
                  "org_name",
                  "admin_email",
                  "password"
                ]
              }
            }
          }
        },
        "security": [
          {
            "AccountTokenAuth": []
          }
        ],
        "responses": {
          "200": {
            "description": "OK",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "org_id": {
                      "type": "integer"
                    },
                    "org_name": {
                      "type": "string"
                    },
                    "ctime": {
                      "type": "string"
                    },
                    "org_url_prefix": {
                      "type": "string"
                    },
                    "role": {
                      "type": "string"
                    },
                    "creator_email": {
                      "type": "string"
                    },
                    "creator_name": {
                      "type": "string"
                    },
                    "creator_contact_email": {
                      "type": "string"
                    },
                    "quota": {
                      "type": "integer"
                    },
                    "storage_usage": {
                      "type": "integer"
                    },
                    "storage_quota": {
                      "type": "integer"
                    },
                    "max_user_number": {
                      "type": "integer"
                    },
                    "rows_count": {
                      "type": "integer"
                    },
                    "row_limit": {
                      "type": "integer"
                    }
                  }
                },
                "example": {
                  "org_id": 2937,
                  "org_name": "SeaTable Testing",
                  "ctime": "2021-03-17T13:32:33+00:00",
                  "org_url_prefix": "org_3yz9yw0h0ze2zawb9cun",
                  "role": "org_default",
                  "creator_email": "123456787839458f973104901fb22456@auth.local",
                  "creator_name": "Max Example",
                  "creator_contact_email": "seatabletesting@example.com",
                  "quota": -2,
                  "storage_usage": 0,
                  "storage_quota": 1000000000,
                  "max_user_number": 25,
                  "rows_count": 0,
                  "row_limit": 2000
                }
              }
            }
          }
        }
      }
    }
  },
  "_id": {
    "buffer": {
      "0": 105,
      "1": 212,
      "2": 220,
      "3": 12,
      "4": 20,
      "5": 34,
      "6": 131,
      "7": 31,
      "8": 141,
      "9": 111,
      "10": 187,
      "11": 146
    }
  }
}
```