/v1/events/batch
1 min
POST
https://api.throughlinecare.com/v1/events/batch
atomicboolean<p>Reject the whole batch if any event is invalid. When false (the default), valid events are accepted and only invalid ones are dropped. Per-item errors are reported in the status payload, indexed to each event's position in the batch.</p>
acceptstringGenerated from available response content types
EventsBatchSubmitV1object<p>Submit a batch of helpline events (helplineDisplay and/or helplineClick). Returns 202 immediately with a jobId; poll the returned statusUrl for the per-item result. Duplicate detection is out of scope; retrying a batch resubmits the same events.</p>
202Batch accepted.
400Malformed request.
401Unauthorized.
413Payload too large.
503Storage unavailable.
var myHeaders = new Headers();
myHeaders.append("accept", "application/json");
myHeaders.append("content-type", "application/json");
var raw = JSON.stringify({
"events": [
{
"type": "helpline_display",
"session_id": "3f0c8a2e-1d4b-4c9a-9e2f-7a1b2c3d4e5f",
"timestamp": "2026-07-05T12:34:56Z"
}
]
});
var requestOptions = {
method: 'POST',
headers: myHeaders,
body: raw,
redirect: 'follow'
};
fetch("https://api.throughlinecare.com/v1/events/batch?atomic=boolean", requestOptions)
.then(response => response.text())
.then(result => console.log(result))
.catch(error => console.log('error', error));