/v1/helplines
1 min
GET
https://api.throughlinecare.com/v1/helplines
country_codestring<p>The ISO 3166 Alpha-2 code for the country to retrieve helplines for e.g 'us'.</p>
topicstring<p>Optional parameter that filters the helplines based on topic e.g. 'Suicidal thoughts'. All helplines which indicate they support this topic (in addition to others) will be included in the results.</p>
specialtystringOptional parameter that filters the helplines based on specialty e.g. 'Youth'. All helplines which indicate they support this specialty will be included in the results.
contact_methodstring<p>Optional parameter that filters the helplines based on the supported contact methods e.g. "phone". Only helplines which indicate they support this contact method will be included in the results. Supported values are "phone", "chat", "sms", "whatsapp", and "tty".</p>
limitintegerOptional parameter that specifies the maximum number of helplines to return.
priority_onlyboolean<p>When true, returns only manually curated priority services for the specified topic. Currently only supporting 'Suicidal thoughts' topic.</p>
acceptstringGenerated from available response content types
200Lists the available verified helplines in a given country. Helplines will be listed in an optimal order using our intelligent ranking algorithm.
400<p>Parameters have not been provided or are invalid e.g country_code has not been provided</p>
401<p>Unauthorized, token not provided or invalid</p>
403Access to the requested country or topics is not permitted for the application.
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&priority_only=boolean", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));