curl --request PUT \
--url https://api.gleap.io/v3/s2s/conversations/{conversationId}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"name": "<string>",
"date": "<string>",
"data": "<unknown>"
}
]
}
'import requests
url = "https://api.gleap.io/v3/s2s/conversations/{conversationId}/events"
payload = { "events": [
{
"name": "<string>",
"date": "<string>",
"data": "<unknown>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [{name: '<string>', date: '<string>', data: '<unknown>'}]})
};
fetch('https://api.gleap.io/v3/s2s/conversations/{conversationId}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gleap.io/v3/s2s/conversations/{conversationId}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
[
'name' => '<string>',
'date' => '<string>',
'data' => '<unknown>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gleap.io/v3/s2s/conversations/{conversationId}/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"data\": \"<unknown>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gleap.io/v3/s2s/conversations/{conversationId}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"data\": \"<unknown>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gleap.io/v3/s2s/conversations/{conversationId}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"data\": \"<unknown>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}Set conversation events
Attach an event log snapshot to the conversation — the same events
Gleap.trackEvent() buffers in the SDK flow and attaches when a
conversation is created. Scoped to this conversation only (not the
contact), so events from other sessions never mix in. Shown to agents in
the conversation’s “Logs” panel. Each call replaces the previous snapshot
(max 500 events, 2 MB). Not delivered via webhooks or the stream.
For contact-level events that drive outbound rules, use
POST /contacts/{userId}/events instead.
curl --request PUT \
--url https://api.gleap.io/v3/s2s/conversations/{conversationId}/events \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"events": [
{
"name": "<string>",
"date": "<string>",
"data": "<unknown>"
}
]
}
'import requests
url = "https://api.gleap.io/v3/s2s/conversations/{conversationId}/events"
payload = { "events": [
{
"name": "<string>",
"date": "<string>",
"data": "<unknown>"
}
] }
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.put(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PUT',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({events: [{name: '<string>', date: '<string>', data: '<unknown>'}]})
};
fetch('https://api.gleap.io/v3/s2s/conversations/{conversationId}/events', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.gleap.io/v3/s2s/conversations/{conversationId}/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PUT",
CURLOPT_POSTFIELDS => json_encode([
'events' => [
[
'name' => '<string>',
'date' => '<string>',
'data' => '<unknown>'
]
]
]),
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>",
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.gleap.io/v3/s2s/conversations/{conversationId}/events"
payload := strings.NewReader("{\n \"events\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"data\": \"<unknown>\"\n }\n ]\n}")
req, _ := http.NewRequest("PUT", url, payload)
req.Header.Add("Authorization", "Bearer <token>")
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.put("https://api.gleap.io/v3/s2s/conversations/{conversationId}/events")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"events\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"data\": \"<unknown>\"\n }\n ]\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.gleap.io/v3/s2s/conversations/{conversationId}/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Put.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"events\": [\n {\n \"name\": \"<string>\",\n \"date\": \"<string>\",\n \"data\": \"<unknown>\"\n }\n ]\n}"
response = http.request(request)
puts response.read_body{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}{
"type": "https://docs.gleap.io/s2s/problems/conversation_closed",
"title": "<string>",
"status": 123,
"code": "conversation_closed",
"detail": "<string>",
"request_id": "req_66c0ffee0000000000000001"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Headers
Pin a specific API version; defaults to the current version.
"2026-08-01"
Path Parameters
Body
Snapshot of the events that led up to this conversation (max 500 entries, 2 MB). Replaces any previous snapshot for this conversation.
Show child attributes
Show child attributes
Response
No Content