---
title: Create type
slug: topic-api/create-type
docTags: 
createdAt: 2024-06-10T16:49:07.009Z
---

{
  "id": "9d2P2ZsTQTCKWlxiCMK-s",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/extensions/types",
    "servers": [
      {
        "url": "https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/extensions/types"
      }
    ],
    "name": "Create type",
    "description": "Add a new topic board type.",
    "contentType": "application/json",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "topic-board-id",
          "type": "string",
          "example": "e18a2d10-1595-4e52-a941-22d43bf8d7ad",
          "description": "Id of the topic board"
        }
      ],
      "headerParameters": [],
      "queryParameters": [],
      "bodyDataParameters": [
        {
          "kind": "optional",
          "name": "body",
          "type": "object",
          "description": "",
          "schema": [
            {
              "name": "name",
              "kind": "required",
              "type": "string",
              "description": "The name of the type",
              "example": "Repair"
            },
            {
              "name": "color",
              "kind": "optional",
              "type": "string",
              "description": "Valid RGB hexadecimal color of the type",
              "example": "#CCCCCC"
            }
          ],
          "isExpanded": true
        }
      ],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "Bearer",
          "name": "Bearer",
          "kind": "optional",
          "type": "http",
          "scheme": "bearer"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "OK",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "",
            "customType": "topic-board-type",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "Id of the type",
                "example": "18b2a2e7509a4b528dbbd9d312fd45e6"
              },
              {
                "name": "name",
                "kind": "optional",
                "type": "string",
                "description": "Name of the type",
                "example": "Info"
              },
              {
                "name": "color",
                "kind": "optional",
                "type": "string",
                "description": "Color associated with the type",
                "example": "#3D85C6"
              },
              {
                "name": "unlinked",
                "kind": "optional",
                "type": "boolean",
                "description": "Set when the type is not known to the topic board",
                "example": ""
              }
            ],
            "modelRef": "#/components/schemas/topic-board-type",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "9csRx9UCrGFBSjPrmr77R",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/extensions/types \\\n     --header 'accept: application/json' \\\n     --header 'content-type: application/json' \\\n     --data '{\n     \"name\": \"Repair\"\n     }'"
        },
        {
          "id": "NmrB9zvJEotv9y0sooyGr",
          "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   \"name\": \"Repair\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/extensions/types\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "_HK-MKnVQZuupAppMpbGq",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/extensions/types\")\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.body = JSON.dump({\n   \"name\": \"Repair\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "C8avBkgOwvutXRdFMuDUQ",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/extensions/types\"\n\npayload = json.dumps({\n   \"name\": \"Repair\"\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": "9csRx9UCrGFBSjPrmr77R"
    },
    "results": {
      "languages": [
        {
          "id": "85HEEc89d3wwxCKb2OCYl",
          "language": "200",
          "code": "// OK\n{\n  \"id\": \"18b2a2e7509a4b528dbbd9d312fd45e6\",\n  \"name\": \"Info\",\n  \"color\": \"#3D85C6\",\n  \"unlinked\": false\n}"
        }
      ],
      "selectedLanguageId": "85HEEc89d3wwxCKb2OCYl"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}