---
title: /v1/countries
slug: v1countries
docTags: 
createdAt: 2026-05-06T23:35:31.392Z
---

{
  "id": "yo8uqYGxz9fEOH27PFHTk",
  "type": "api-oas-v2",
  "data": {
    "method": "GET",
    "url": "https://api.throughlinecare.com/v1/countries",
    "description": "List of countries with availabe helplines. Utilised the code attribute to retrieve available helplines for that country.",
    "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 countries.",
        "jsonExample": "",
        "isExpanded": true,
        "schema": [
          {
            "kind": "optional",
            "type": "object",
            "description": "Returns a list of countries.",
            "schema": [
              {
                "name": "countries",
                "kind": "optional",
                "type": "array",
                "description": "",
                "modelRef": "#/definitions/Country",
                "customType": "Country[]",
                "schema": [
                  {
                    "name": "name",
                    "kind": "required",
                    "type": "string",
                    "description": "English language name for the country.",
                    "example": "New Zealand"
                  },
                  {
                    "name": "code",
                    "kind": "required",
                    "type": "string",
                    "description": "<p>ISO 3166 Alpha-2 code for the country.</p>",
                    "example": "nz"
                  },
                  {
                    "name": "emergencyNumber",
                    "kind": "optional",
                    "type": "string",
                    "description": "Emergency services phone number. Only available for countries where suicide is not a illegal.",
                    "example": "111"
                  }
                ]
              }
            ],
            "isExpanded": true
          }
        ]
      },
      {
        "statusCode": "401",
        "description": "<p>Unauthorized, token not provided or invalid</p>",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "FEtWhG6LYKGRVSfPCiCaK",
          "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/countries\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "aZtJp9oMOG8Nr_uP5m2Xx",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.throughlinecare.com/v1/countries\")\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": "jif2WULjYq9vkueVyH2VN",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.throughlinecare.com/v1/countries\"\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": "iuoaFl-6LNCwVIkR2eMwg",
          "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/countries\")\n   .method(\"GET\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        },
        {
          "id": "AX5jPuyUea6RJ0o1c_Uov",
          "language": "swift",
          "label": "Swift",
          "code": "var request = URLRequest(url: URL(string: \"https://api.throughlinecare.com/v1/countries\")!,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": "FEtWhG6LYKGRVSfPCiCaK"
    },
    "results": {
      "languages": [
        {
          "id": "N1fp28bkO8FjBx8IpAnaG",
          "language": "200",
          "code": "// Returns a list of countries.\n{\n  \"countries\": [\n    {\n      \"name\": \"New Zealand\",\n      \"code\": \"nz\",\n      \"emergencyNumber\": \"111\"\n    }\n  ]\n}"
        },
        {
          "id": "sK4QjQV6i8RqQKN-_ADpN",
          "language": "401",
          "code": "// Unauthorized, token not provided or invalid\n"
        }
      ],
      "selectedLanguageId": "N1fp28bkO8FjBx8IpAnaG"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}