---
title: Import topics
slug: topic-api/import-topics
docTags: 
createdAt: 2024-06-10T16:49:07.009Z
---

{
  "id": "lIBAeiUZXIvztGD99R81S",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/imports",
    "servers": [
      {
        "url": "https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/imports"
      }
    ],
    "name": "Import topics",
    "description": "<p>Upload and import a BCF file.</p>\n<p>File must be a BCF 3.0 file with the extension <code>.bcf</code>.</p>\n<p>Include <strong>Content-Type: multipart/form-data</strong> in request headers.</p>",
    "contentType": "multipart/form-data",
    "request": {
      "pathParameters": [
        {
          "kind": "required",
          "name": "topic-board-id",
          "type": "string",
          "example": "e18a2d10-1595-4e52-a941-22d43bf8d7ad",
          "description": "Id of the topic board"
        }
      ],
      "headerParameters": [
        {
          "kind": "required",
          "name": "Content-Disposition",
          "type": "string",
          "example": "attachment; filename=\"topics.bcf\"",
          "description": "<p>Value must be 'attachment; filename=\"YOUR_FILENAME\"’</p>"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [
        {
          "name": "file",
          "kind": "optional",
          "type": "string<binary>",
          "description": "The BCF file to import.",
          "example": "topics.bcf"
        }
      ],
      "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": "import-status",
            "schema": [
              {
                "name": "id",
                "kind": "optional",
                "type": "string",
                "description": "Id of the import process",
                "example": "c9549c4c4e214538a2b327815cfe99f3"
              },
              {
                "name": "createdAt",
                "kind": "optional",
                "type": "string",
                "description": "Timestamp of when import process was initiated",
                "example": "2024-05-30T15:08:00Z"
              },
              {
                "name": "status",
                "kind": "optional",
                "type": "string<processing | success | failed>",
                "description": "Current import processing status, valid values are \"processing\", \"success\" or \"failed\"",
                "example": "processing"
              }
            ],
            "modelRef": "#/components/schemas/import-status",
            "isExpanded": true
          }
        ]
      }
    ],
    "hasXCodeSamples": false,
    "examples": {
      "languages": [
        {
          "id": "W9BfqK4HhCaM-K6NOXy-h",
          "language": "curl",
          "label": "cURL",
          "code": "curl --request POST \\\n     --url https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/imports \\\n     --header 'accept: application/json' \\\n     --header 'content-disposition: attachment; filename=\"topics.bcf\"'"
        },
        {
          "id": "e8wcQOSeEr_uhXxt9ORLX",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"multipart/form-data\");\nmyHeaders.append(\"content-disposition\", \"attachment; filename=\\\"topics.bcf\\\"\");\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/imports\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "BZB7hLrmaHiMN9TV4NW1z",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/imports\")\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\"] = \"multipart/form-data\"\nrequest[\"content-disposition\"] = \"attachment; filename=\\\"topics.bcf\\\"\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "AY2wSNTgsJn8GkZVifFf1",
          "language": "python",
          "label": "Python",
          "code": "import requests\n\nurl = \"https://api.catenda.com/opencde/bcf/3.0/projects/{topic-board-id}/imports\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'multipart/form-data',\n   'content-disposition': 'attachment; filename=\"topics.bcf\"'\n}\n\nresponse = requests.request(\"POST\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        }
      ],
      "selectedLanguageId": "W9BfqK4HhCaM-K6NOXy-h"
    },
    "results": {
      "languages": [
        {
          "id": "response-0-200",
          "language": "200",
          "code": "// OK\n{\n  \"id\": \"c9549c4c4e214538a2b327815cfe99f3\",\n  \"createdAt\": \"2024-05-30T15:08:00Z\",\n  \"status\": \"processing\"\n}"
        }
      ],
      "selectedLanguageId": "response-0-200"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}