---
title: Create a new team in your account
slug: create-a-new-team-in-your-account
docTags: 
createdAt: 2025-01-28T10:28:11.769Z
---

{
  "id": "UYUHur2AycK8EJmoyuL8t",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.waydev.co/v2/teams",
    "name": "Create a new team in your account",
    "description": "",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "kind": "required",
          "name": "Authorization",
          "type": "string",
          "description": "Your PAT generated in Waydev"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "The name is the only field required, the rest are optional. \nThe members to be included in the team need to pre exist in the database in order to include them in the team.",
          "schema": [
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "example": "Your new team's name"
            },
            {
              "name": "description",
              "kind": "optional",
              "type": "string",
              "example": "Your new team's description"
            },
            {
              "name": "include_merges",
              "kind": "optional",
              "type": "boolean",
              "example": true
            },
            {
              "name": "ignore_loc",
              "kind": "optional",
              "type": "number",
              "example": 2100
            },
            {
              "name": "ignore_message",
              "kind": "optional",
              "type": "string",
              "example": "Some message to ignore"
            },
            {
              "name": "stats_timezone",
              "kind": "optional",
              "type": "string",
              "example": "+02:00"
            },
            {
              "name": "parent_id",
              "kind": "optional",
              "type": "number",
              "example": 1232
            },
            {
              "name": "members",
              "kind": "optional",
              "type": "array",
              "example": "[1010,1011]",
              "itemType": "integer",
              "customType": "integer[]",
              "itemExample": "",
              "itemDefault": ""
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "201",
        "description": "Successfully created",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Successfully created",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "number",
                "example": 1233
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "example": "Your new team's name"
              },
              {
                "name": "slug",
                "kind": "optional",
                "type": "string",
                "example": "your-new-team-s-name"
              },
              {
                "name": "created_at",
                "kind": "optional",
                "type": "string",
                "example": "2024-03-20T07:41:22.000000Z"
              },
              {
                "name": "updated_at",
                "kind": "optional",
                "type": "string",
                "example": "2024-03-20T07:41:22.000000Z"
              },
              {
                "name": "members_count",
                "kind": "optional",
                "type": "number",
                "example": 2
              },
              {
                "name": "members",
                "kind": "optional",
                "type": "array",
                "example": "[{\"id\":1010,\"email\":\"dev10@example.co\"},{\"id\":1011,\"email\":\"dev11@example.co\"}]",
                "itemType": "object",
                "customType": "object[]",
                "schema": [
                  {
                    "name": "id",
                    "kind": "optional",
                    "type": "integer",
                    "example": 1010
                  },
                  {
                    "name": "email",
                    "kind": "optional",
                    "type": "string",
                    "example": "dev1@example.co"
                  }
                ]
              },
              {
                "name": "lineage",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "parent_id",
                    "kind": "optional",
                    "type": "number",
                    "example": 1232
                  },
                  {
                    "name": "children_count",
                    "kind": "optional",
                    "type": "number",
                    "example": 0
                  },
                  {
                    "name": "ancestors_ids",
                    "kind": "optional",
                    "type": "array",
                    "example": "[1232]",
                    "itemType": "integer",
                    "customType": "integer[]",
                    "itemExample": "",
                    "itemDefault": ""
                  },
                  {
                    "name": "descendants_ids",
                    "kind": "optional",
                    "type": "array",
                    "example": "",
                    "itemType": "integer",
                    "customType": "integer[]",
                    "itemExample": "",
                    "itemDefault": ""
                  }
                ]
              },
              {
                "name": "settings",
                "kind": "optional",
                "type": "object",
                "example": "",
                "schema": [
                  {
                    "name": "ignore_message",
                    "kind": "optional",
                    "type": "string",
                    "example": "Some message to ignore"
                  },
                  {
                    "name": "ignore_loc",
                    "kind": "optional",
                    "type": "number",
                    "example": 2100
                  },
                  {
                    "name": "include_merges",
                    "kind": "optional",
                    "type": "boolean",
                    "example": "true"
                  },
                  {
                    "name": "stats_timezone",
                    "kind": "optional",
                    "type": "string",
                    "example": "+02:00"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Unauthorized",
            "schema": [
              {
                "name": "message",
                "kind": "optional",
                "type": "string",
                "example": "Unauthorized"
              }
            ],
            "isExpanded": true
          }
        ]
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "LVUx4O8MoZ3U4r1pexi76",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.waydev.co/v2/teams \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --header 'authorization: string' \\\n     --data '{\n     \"name\": \"Your new team'\\''s name\"\n     }'"
        },
        {
          "id": "Huwm-SltE0bYLyQ3Lo0Dm",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\nmyHeaders.append(\"authorization\", \"string\");\n\nvar raw = JSON.stringify({\n   \"name\": \"Your new team's name\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.waydev.co/v2/teams\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "LTjLvf0ODgbt9k_4EKH42",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.waydev.co/v2/teams\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest[\"authorization\"] = \"string\"\nrequest.body = JSON.dump({\n   \"name\": \"Your new team's name\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "4vnaqDhwoZN_ciTxrjV3U",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.waydev.co/v2/teams\"\n\npayload = json.dumps({\n   \"name\": \"Your new team's name\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json',\n   'authorization': 'string'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "LVUx4O8MoZ3U4r1pexi76"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-201",
          "language": "201",
          "code": "// Successfully created\n{\n  \"id\": 1233,\n  \"name\": \"Your new team's name\",\n  \"slug\": \"your-new-team-s-name\",\n  \"created_at\": \"2024-03-20T07:41:22.000000Z\",\n  \"updated_at\": \"2024-03-20T07:41:22.000000Z\",\n  \"members_count\": 2,\n  \"members\": [\n    {\n      \"id\": 1010,\n      \"email\": \"dev1@example.co\"\n    }\n  ],\n  \"lineage\": {\n    \"parent_id\": 1232,\n    \"children_count\": 0,\n    \"ancestors_ids\": [\n      0\n    ],\n    \"descendants_ids\": [\n      0\n    ]\n  },\n  \"settings\": {\n    \"ignore_message\": \"Some message to ignore\",\n    \"ignore_loc\": 2100,\n    \"include_merges\": \"true\",\n    \"stats_timezone\": \"+02:00\"\n  }\n}"
        },
        {
          "id": "response-1-401",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"message\": \"Unauthorized\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-201"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}