API
...
API Reference
helplines
/helplines
1min
code examples curl location 'https //api throughlinecare com/v1/helplines?country code=string\&limit=20' \\ \ header 'accept application/json' \\ \ header 'content type application/json'var myheaders = new headers(); myheaders append("accept", "application/json"); myheaders append("content type", "application/json"); var requestoptions = { method 'get', headers myheaders, redirect 'follow' }; fetch("https //api throughlinecare com/v1/helplines?country code=string\&limit=20", requestoptions) then(response => response text()) then(result => console log(result)) catch(error => console log('error', error));require "uri" require "json" require "net/http" url = uri("https //api throughlinecare com/v1/helplines?country code=string\&limit=20") https = net http new(url host, url port) https use ssl = true request = net http get new(url) request\["accept"] = "application/json" request\["content type"] = "application/json" response = https request(request) puts response read body var request = require('request'); var options = { 'method' 'get', 'url' 'https //api throughlinecare com/v1/helplines?country code=string\&limit=20', 'headers' { 'accept' 'application/json', 'content type' 'application/json' } }; request(options, function (error, response) { if (error) throw new error(error); console log(response body); }); responses // lists the available verified helplines in a given country helplines will be listed in an optimal order using our intelligent ranking algorithm { "id" "123e4567 e89b 12d3 a456 426655440000", "name" "crisis text line", "description" "crisis text line is here to help you, whatever you're going through we provide 24/7, free and confidential support and information by text message (text home to 741 741), online chat and whatsapp (+1 443 787 7678) we are available to talk with you about any kind of experience relating to mental health, including anxiety, depression, self harm, stress, and thoughts of suicide ", "website" "https //www crisistextline org/", "country" { "name" "new zealand", "code" "nz", "emergencynumber" "111" }, "timezone" "america/los angeles", "topics" \[ {} ], "specialties" \[ {} ], "supporttypes" \[ {} ], "hours" { "alwaysopen" false, "periods" { "day" "1", "open" "09 00", "close" "17 00" } }, "phonenumber" "1 800 555 1212", "smsnumber" "741741", "webchaturl" "https //connect crisistextline org/chat?utm source=findahelpline", "whatsappurl" "https //wa me/1 800 555 1212" }// parameters have not been provided or are invalid e g country code has not been provided // unauthorized, token not provided or invalid // access to the requested country or topics is not permitted for the application