---
title: Create a new project
slug: mihai-tests/create-a-new-project
createdAt: 2025-01-22T07:25:18.837Z
---

{
  "id": "dWFcYUA1yOzI_bNEyxuHy",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "/v2/projects",
    "servers": [],
    "name": "Create a new project",
    "description": "Create a new project. It is required to provide a workspace id you have access to multiple workspaces.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "required",
          "name": "body",
          "type": "object",
          "description": "Project to create. The workspaceId is required if you have access to more than one workspace.",
          "customType": "PublicCreateProjectDto",
          "schema": [
            {
              "name": "title",
              "kind": "required",
              "type": "string",
              "example": ""
            },
            {
              "name": "workspaceId",
              "kind": "optional",
              "type": "string<uuid>",
              "example": ""
            }
          ],
          "modelRef": "#/components/schemas/PublicCreateProjectDto",
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": []
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Enveloped_PublicProjectDto",
            "schema": [
              {
                "name": "data",
                "kind": "required",
                "type": "object",
                "description": "",
                "modelRef": "#/components/schemas/PublicProjectDto",
                "customType": "PublicProjectDto",
                "schema": [
                  {
                    "name": "createdAt",
                    "kind": "required",
                    "type": "string<date-time>",
                    "example": ""
                  },
                  {
                    "name": "id",
                    "kind": "required",
                    "type": "string<uuid>",
                    "example": ""
                  },
                  {
                    "name": "title",
                    "kind": "required",
                    "type": "string",
                    "example": ""
                  },
                  {
                    "name": "workspaceId",
                    "kind": "required",
                    "type": "string<uuid>",
                    "example": ""
                  }
                ]
              }
            ],
            "modelRef": "#/components/schemas/Enveloped_PublicProjectDto",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "400",
        "description": "Bad request",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "BadRequest",
            "schema": [
              {
                "name": "errorCode",
                "kind": "optional",
                "type": "string",
                "example": ""
              },
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/BadRequest",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Unauthorized",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/Unauthorized",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "403",
        "description": "Forbidden",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "Forbidden",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/Forbidden",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "404",
        "description": "Not found",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "NotFound",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/NotFound",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "413",
        "description": "Payload too large",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "PayloadTooLarge",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/PayloadTooLarge",
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "500",
        "description": "Internal server error",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "InternalServerError",
            "schema": [
              {
                "name": "message",
                "kind": "required",
                "type": "string",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/InternalServerError",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "example-0-curl",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url /v2/projects \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"title\": \"\"\n     }'"
        },
        {
          "id": "example-1-javascript",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar raw = JSON.stringify({\n   \"title\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"/v2/projects\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "example-2-ruby",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"/v2/projects\")\n\nhttp = Net::HTTP.new(url.host, url.port);\nrequest = Net::HTTP::Post.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\nrequest.body = JSON.dump({\n   \"title\": \"\"\n})\n\nresponse = http.request(request)\nputs response.read_body\n"
        },
        {
          "id": "example-3-python",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"/v2/projects\"\n\npayload = json.dumps({\n   \"title\": \"\"\n})\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "example-0-curl"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "{\n  \"data\": {\n    \"createdAt\": \"\",\n    \"id\": \"\",\n    \"title\": \"\",\n    \"workspaceId\": \"\"\n  }\n}"
        },
        {
          "id": "response-1-400",
          "language": "400",
          "code": "// Bad request\n{\n  \"errorCode\": \"\",\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-2-401",
          "language": "401",
          "code": "// Unauthorized\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-3-403",
          "language": "403",
          "code": "// Forbidden\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-4-404",
          "language": "404",
          "code": "// Not found\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-5-413",
          "language": "413",
          "code": "// Payload too large\n{\n  \"message\": \"\"\n}"
        },
        {
          "id": "response-6-500",
          "language": "500",
          "code": "// Internal server error\n{\n  \"message\": \"\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "id": "KW_qNaK0RZaDrQlAc5qqw",
      "type": "paragraph",
      "children": [
        {
          "text": "Create a new project. It is required to provide a workspace id you have access to multiple workspaces."
        }
      ]
    }
  ]
}