---
title: /v2/topics
slug: v2topics
docTags: 
createdAt: 2026-05-06T23:35:31.392Z
---

{
  "id": "5-dPjVijKnO7W6trtG3Xz",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.throughlinecare.com/v2/topics",
    "description": "List of topics with availabe helplines. Utilised the slug attribute to retrieve available helplines for that topic",
    "contentType": "application/json",
    "request": {
      "pathParameters": [],
      "headerParameters": [
        {
          "name": "accept",
          "type": "string",
          "kind": "optional",
          "description": "Generated from available response content types",
          "enum": [
            "application/json"
          ],
          "default": "application/json"
        }
      ],
      "queryParameters": [],
      "bodyDataParameters": [],
      "formDataParameters": [],
      "oAuthParameters": [
        {
          "id": "bearerAuth",
          "name": "Authorization",
          "kind": "optional",
          "type": "apiKey",
          "description": "<p>Enter the token with the \"Bearer: \" prefix e.g. \"Bearer ABC...\"</p>",
          "in": "header"
        }
      ]
    },
    "responses": [
      {
        "statusCode": "200",
        "description": "Returns a list of topics",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Returns a list of topics",
            "schema": [
              {
                "name": "topics",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/definitions/Topic",
                "customType": "Topic[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "English language label for the topic.",
                    "example": "Suicidal thoughts"
                  },
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "string",
                    "description": "The unique code to identify the topic.",
                    "example": "suicidal-thoughts"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized, token not provided or invalid</p>",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "jZRRemWt3byCzzKuMesly",
          "language": "javascript",
          "label": "javascript",
          "code": "var myHeaders = new Headers();\nmyHeaders.append(\"accept\", \"application/json\");\nmyHeaders.append(\"content-type\", \"application/json\");\n\nvar requestOptions = {\n   method: 'GET',\n   headers: myHeaders,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.throughlinecare.com/v2/topics\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "Ozxo8aZWdXVFPDyo7D0EE",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.throughlinecare.com/v2/topics\")\n\nhttps = Net::HTTP.new(url.host, url.port)\nhttps.use_ssl = true\n\nrequest = Net::HTTP::Get.new(url)\nrequest[\"accept\"] = \"application/json\"\nrequest[\"content-type\"] = \"application/json\"\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "bKjka0lKuXRyDQ4UYWpCe",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.throughlinecare.com/v2/topics\"\n\npayload = {}\nheaders = {\n   'accept': 'application/json',\n   'content-type': 'application/json'\n}\n\nresponse = requests.request(\"GET\", url, headers=headers, data=payload)\n\nprint(response.text)\n"
        },
        {
          "id": "GnBoZNTgM_Xzrn8FPgy50",
          "language": "java",
          "label": "Java",
          "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n   .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"\");\nRequest request = new Request.Builder()\n   .url(\"https://api.throughlinecare.com/v2/topics\")\n   .method(\"GET\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        },
        {
          "id": "UpJ3dbM0zrSt_w2FhzM2u",
          "language": "swift",
          "label": "Swift",
          "code": "var request = URLRequest(url: URL(string: \"https://api.throughlinecare.com/v2/topics\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"accept\")\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"content-type\")\n\nrequest.httpMethod = \"GET\"\n\nlet task = URLSession.shared.dataTask(with: request) { data, response, error in \n   guard let data = data else {\n      print(String(describing: error))\n      return\n   }\n   print(String(data: data, encoding: .utf8)!)\n}\n\ntask.resume()\n"
        }
      ],
      "selectedLanguageId": "jZRRemWt3byCzzKuMesly"
    },
    "results": {
      "languages": [
        {
          "id": "B_zVeKc7e4zMTNnKkqItt",
          "language": "200",
          "code": "// Returns a list of topics\n{\n  \"topics\": [\n    {\n      \"name\": \"Suicidal thoughts\",\n      \"code\": \"suicidal-thoughts\"\n    }\n  ]\n}"
        },
        {
          "id": "xPOBRrgI7t89ePZ8w5lsa",
          "language": "401",
          "code": "// Unauthorized, token not provided or invalid\n"
        }
      ],
      "selectedLanguageId": "B_zVeKc7e4zMTNnKkqItt"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}