Events
Emit a project event
Stores one timestamped project event. Event names must be lowercase
dotted snake_case. conversation_id is optional; include it when the
event belongs to a WhatsApp conversation.
POST
/
events
Emit a project event
curl --request POST \
--url https://api.kapso.ai/platform/v1/events \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "conversation.csat_scored",
"occurred_at": "2026-06-27T14:30:00Z",
"conversation_id": "770e8400-e29b-41d4-a716-446655440002",
"properties": {
"score": 4,
"reason": "Issue resolved in one reply",
"source": "workflow"
}
}
'import requests
url = "https://api.kapso.ai/platform/v1/events"
payload = {
"name": "conversation.csat_scored",
"occurred_at": "2026-06-27T14:30:00Z",
"conversation_id": "770e8400-e29b-41d4-a716-446655440002",
"properties": {
"score": 4,
"reason": "Issue resolved in one reply",
"source": "workflow"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'conversation.csat_scored',
occurred_at: '2026-06-27T14:30:00Z',
conversation_id: '770e8400-e29b-41d4-a716-446655440002',
properties: {score: 4, reason: 'Issue resolved in one reply', source: 'workflow'}
})
};
fetch('https://api.kapso.ai/platform/v1/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.kapso.ai/platform/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'conversation.csat_scored',
'occurred_at' => '2026-06-27T14:30:00Z',
'conversation_id' => '770e8400-e29b-41d4-a716-446655440002',
'properties' => [
'score' => 4,
'reason' => 'Issue resolved in one reply',
'source' => 'workflow'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.kapso.ai/platform/v1/events"
payload := strings.NewReader("{\n \"name\": \"conversation.csat_scored\",\n \"occurred_at\": \"2026-06-27T14:30:00Z\",\n \"conversation_id\": \"770e8400-e29b-41d4-a716-446655440002\",\n \"properties\": {\n \"score\": 4,\n \"reason\": \"Issue resolved in one reply\",\n \"source\": \"workflow\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.post("https://api.kapso.ai/platform/v1/events")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"conversation.csat_scored\",\n \"occurred_at\": \"2026-06-27T14:30:00Z\",\n \"conversation_id\": \"770e8400-e29b-41d4-a716-446655440002\",\n \"properties\": {\n \"score\": 4,\n \"reason\": \"Issue resolved in one reply\",\n \"source\": \"workflow\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kapso.ai/platform/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"conversation.csat_scored\",\n \"occurred_at\": \"2026-06-27T14:30:00Z\",\n \"conversation_id\": \"770e8400-e29b-41d4-a716-446655440002\",\n \"properties\": {\n \"score\": 4,\n \"reason\": \"Issue resolved in one reply\",\n \"source\": \"workflow\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "990e8400-e29b-41d4-a716-446655440004",
"name": "conversation.csat_scored",
"occurred_at": "2026-06-27T14:30:00Z",
"conversation_id": "770e8400-e29b-41d4-a716-446655440002",
"properties": {
"score": 4,
"reason": "Issue resolved in one reply",
"source": "workflow"
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}Authorizations
Body
application/json
Event name. Lowercase dotted snake_case is recommended for consistency.
Example:
"conversation.csat_scored"
Optional event timestamp. Defaults to the current time.
Optional WhatsApp conversation ID to link to the event
Optional flat event properties object
Show child attributes
Show child attributes
Response
Event created
Show child attributes
Show child attributes
Was this page helpful?
Previous
List API logsReturns logs of external API calls made by your project, most recent first.
Next
⌘I
Emit a project event
curl --request POST \
--url https://api.kapso.ai/platform/v1/events \
--header 'Content-Type: application/json' \
--header 'X-API-Key: <api-key>' \
--data '
{
"name": "conversation.csat_scored",
"occurred_at": "2026-06-27T14:30:00Z",
"conversation_id": "770e8400-e29b-41d4-a716-446655440002",
"properties": {
"score": 4,
"reason": "Issue resolved in one reply",
"source": "workflow"
}
}
'import requests
url = "https://api.kapso.ai/platform/v1/events"
payload = {
"name": "conversation.csat_scored",
"occurred_at": "2026-06-27T14:30:00Z",
"conversation_id": "770e8400-e29b-41d4-a716-446655440002",
"properties": {
"score": 4,
"reason": "Issue resolved in one reply",
"source": "workflow"
}
}
headers = {
"X-API-Key": "<api-key>",
"Content-Type": "application/json"
}
response = requests.post(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'POST',
headers: {'X-API-Key': '<api-key>', 'Content-Type': 'application/json'},
body: JSON.stringify({
name: 'conversation.csat_scored',
occurred_at: '2026-06-27T14:30:00Z',
conversation_id: '770e8400-e29b-41d4-a716-446655440002',
properties: {score: 4, reason: 'Issue resolved in one reply', source: 'workflow'}
})
};
fetch('https://api.kapso.ai/platform/v1/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.kapso.ai/platform/v1/events",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'name' => 'conversation.csat_scored',
'occurred_at' => '2026-06-27T14:30:00Z',
'conversation_id' => '770e8400-e29b-41d4-a716-446655440002',
'properties' => [
'score' => 4,
'reason' => 'Issue resolved in one reply',
'source' => 'workflow'
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json",
"X-API-Key: <api-key>"
],
]);
$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.kapso.ai/platform/v1/events"
payload := strings.NewReader("{\n \"name\": \"conversation.csat_scored\",\n \"occurred_at\": \"2026-06-27T14:30:00Z\",\n \"conversation_id\": \"770e8400-e29b-41d4-a716-446655440002\",\n \"properties\": {\n \"score\": 4,\n \"reason\": \"Issue resolved in one reply\",\n \"source\": \"workflow\"\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("X-API-Key", "<api-key>")
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.post("https://api.kapso.ai/platform/v1/events")
.header("X-API-Key", "<api-key>")
.header("Content-Type", "application/json")
.body("{\n \"name\": \"conversation.csat_scored\",\n \"occurred_at\": \"2026-06-27T14:30:00Z\",\n \"conversation_id\": \"770e8400-e29b-41d4-a716-446655440002\",\n \"properties\": {\n \"score\": 4,\n \"reason\": \"Issue resolved in one reply\",\n \"source\": \"workflow\"\n }\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.kapso.ai/platform/v1/events")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["X-API-Key"] = '<api-key>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"name\": \"conversation.csat_scored\",\n \"occurred_at\": \"2026-06-27T14:30:00Z\",\n \"conversation_id\": \"770e8400-e29b-41d4-a716-446655440002\",\n \"properties\": {\n \"score\": 4,\n \"reason\": \"Issue resolved in one reply\",\n \"source\": \"workflow\"\n }\n}"
response = http.request(request)
puts response.read_body{
"data": {
"id": "990e8400-e29b-41d4-a716-446655440004",
"name": "conversation.csat_scored",
"occurred_at": "2026-06-27T14:30:00Z",
"conversation_id": "770e8400-e29b-41d4-a716-446655440002",
"properties": {
"score": 4,
"reason": "Issue resolved in one reply",
"source": "workflow"
}
}
}{
"error": "<string>"
}{
"error": "<string>"
}{
"error": "<string>"
}
