---
title: /v1/topics
slug: v1topics
docTags: 
createdAt: 2026-05-06T23:35:31.392Z
---

{
  "id": "W_Dds5ABee0IAP9unZlb4",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.throughlinecare.com/v1/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": "6mwKcOPTCXdz3Lot-Srjl",
          "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/v1/topics\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "ez5ggyfRd4uBBYl-Xuhs5",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.throughlinecare.com/v1/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": "XxyXucLeuSTUhSExVFzgK",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.throughlinecare.com/v1/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": "YanlmO1R37LLl3zkp32r7",
          "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/v1/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": "0xdSgYk0Ja5ctBD65qXjK",
          "language": "swift",
          "label": "Swift",
          "code": "var request = URLRequest(url: URL(string: \"https://api.throughlinecare.com/v1/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": "6mwKcOPTCXdz3Lot-Srjl"
    },
    "results": {
      "languages": [
        {
          "id": "roCDWwXU33F3wSqroQr04",
          "language": "200",
          "code": "// Returns a list of topics\n{\n  \"topics\": [\n    {\n      \"name\": \"Suicidal thoughts\",\n      \"code\": \"suicidal-thoughts\"\n    }\n  ]\n}"
        },
        {
          "id": "x_3mU2p0K5HzPJio59L3d",
          "language": "401",
          "code": "// Unauthorized, token not provided or invalid\n"
        }
      ],
      "selectedLanguageId": "roCDWwXU33F3wSqroQr04"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}