---
title: /v1/events/helpline_click
slug: v1eventshelplineclick
docTags: 
createdAt: 2026-05-06T23:35:31.392Z
---

{
  "id": "kJt3sQ7piY3f8QRR66LAQ",
  "type": "api-oas-v2",
  "data": {
    "method": "POST",
    "url": "https://api.throughlinecare.com/v1/events/helpline_click",
    "description": "Record a helpline click event.",
    "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": [
        {
          "kind": "required",
          "name": "HelplineClickV1",
          "type": "object",
          "description": "Record a helpline click event.",
          "customType": "HelplineClickV1",
          "schema": [
            {
              "name": "helpline_id",
              "kind": "required",
              "type": "string",
              "description": "ID of the helpline"
            },
            {
              "name": "session_id",
              "kind": "required",
              "type": "string",
              "description": "<p>Client-generated session identifier</p>"
            },
            {
              "name": "timestamp",
              "kind": "required",
              "type": "string",
              "description": "ISO 8601 timestamp"
            },
            {
              "name": "contact_method",
              "kind": "required",
              "type": "string<phone | sms | online_chat | website | tty | whatsapp | reporting_form>",
              "description": "Contact method used",
              "enum": [
                "phone",
                "sms",
                "online_chat",
                "website",
                "tty",
                "whatsapp",
                "reporting_form"
              ]
            }
          ],
          "modelRef": "#/definitions/HelplineClickV1",
          "isExpanded": true
        }
      ],
      "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": "201",
        "description": "Event recorded successfully.",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "400",
        "description": "Missing or invalid required fields",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "401",
        "description": "Unauthorized",
        "jsonExample": "",
        "isExpanded": true
      },
      {
        "statusCode": "422",
        "description": "Invalid helpline",
        "jsonExample": "",
        "isExpanded": true
      }
    ],
    "examples": {
      "languages": [
        {
          "id": "qPTFrJcazZiKGWEOOa2w8",
          "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   \"helpline_id\": \"\",\n   \"session_id\": \"\",\n   \"timestamp\": \"\",\n   \"contact_method\": \"\"\n});\n\nvar requestOptions = {\n   method: 'POST',\n   headers: myHeaders,\n   body: raw,\n   redirect: 'follow'\n};\n\nfetch(\"https://api.throughlinecare.com/v1/events/helpline_click\", requestOptions)\n   .then(response => response.text())\n   .then(result => console.log(result))\n   .catch(error => console.log('error', error));"
        },
        {
          "id": "yZhyeEQMX9zk380ceVfcL",
          "language": "ruby",
          "label": "Ruby",
          "code": "require \"uri\"\nrequire \"json\"\nrequire \"net/http\"\n\nurl = URI(\"https://api.throughlinecare.com/v1/events/helpline_click\")\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   \"helpline_id\": \"\",\n   \"session_id\": \"\",\n   \"timestamp\": \"\",\n   \"contact_method\": \"\"\n})\n\nresponse = https.request(request)\nputs response.read_body\n"
        },
        {
          "id": "4j8lZw2m11crC0oQrTyGe",
          "language": "python",
          "label": "Python",
          "code": "import requests\nimport json\n\nurl = \"https://api.throughlinecare.com/v1/events/helpline_click\"\n\npayload = json.dumps({\n   \"helpline_id\": \"\",\n   \"session_id\": \"\",\n   \"timestamp\": \"\",\n   \"contact_method\": \"\"\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"
        },
        {
          "id": "aVOEMn3Kc71wbIQ71KHci",
          "language": "java",
          "label": "Java",
          "code": "OkHttpClient client = new OkHttpClient().newBuilder()\n   .build();\nMediaType mediaType = MediaType.parse(\"application/json\");\nRequestBody body = RequestBody.create(mediaType, \"{\\n  \\\"helpline_id\\\": \\\"\\\",\\n  \\\"session_id\\\": \\\"\\\",\\n  \\\"timestamp\\\": \\\"\\\",\\n  \\\"contact_method\\\": \\\"\\\"\\n}\");\nRequest request = new Request.Builder()\n   .url(\"https://api.throughlinecare.com/v1/events/helpline_click\")\n   .method(\"POST\", body)\n   .addHeader(\"accept\", \"application/json\")\n   .addHeader(\"content-type\", \"application/json\")\n   .build();\nResponse response = client.newCall(request).execute();"
        },
        {
          "id": "wnOVyz0PD_Ya70LtP7wWt",
          "language": "swift",
          "label": "Swift",
          "code": "let parameters = \"{\\n  \\\"helpline_id\\\": \\\"\\\",\\n  \\\"session_id\\\": \\\"\\\",\\n  \\\"timestamp\\\": \\\"\\\",\\n  \\\"contact_method\\\": \\\"\\\"\\n}\"\nlet postData = parameters.data(using: .utf8)\n\nvar request = URLRequest(url: URL(string: \"https://api.throughlinecare.com/v1/events/helpline_click\")!,timeoutInterval: Double.infinity)\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"accept\")\nrequest.addValue(\"application/json\", forHTTPHeaderField: \"content-type\")\n\nrequest.httpMethod = \"POST\"\nrequest.httpBody = postData\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": "qPTFrJcazZiKGWEOOa2w8"
    },
    "results": {
      "languages": [
        {
          "id": "l3sYAg2MudpjnhHim1r3o",
          "language": "201",
          "code": "// Event recorded successfully.\n"
        },
        {
          "id": "dh0RDSI9JEG6fnyPqigqd",
          "language": "400",
          "code": "// Missing or invalid required fields\n"
        },
        {
          "id": "7Fqmpo-m488XmzM_n4nu8",
          "language": "401",
          "code": "// Unauthorized\n"
        },
        {
          "id": "lqK8vlX7uYQhBDZHUvhvm",
          "language": "422",
          "code": "// Invalid helpline\n"
        }
      ],
      "selectedLanguageId": "l3sYAg2MudpjnhHim1r3o"
    }
  },
  "children": [
    {
      "text": ""
    }
  ]
}