curl --request GET \
--url https://api.chatsailer.com/v1/success-events/{event_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chatsailer.com/v1/success-events/{event_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chatsailer.com/v1/success-events/{event_id}', 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.chatsailer.com/v1/success-events/{event_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chatsailer.com/v1/success-events/{event_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chatsailer.com/v1/success-events/{event_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/success-events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"billable": true,
"created_at": "2023-11-07T05:31:56Z",
"currency": "BRL",
"dedupe_key": "<string>",
"entry_kind": "record",
"event_code": "<string>",
"id": "sev_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"occurred_at": "2023-11-07T05:31:56Z",
"agreement_id": "agr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"conversation_id": "conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"deal_id": "deal_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"object": "success_event",
"reason": "<string>",
"reverses_event_id": "sev_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"value_cents": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Retrieve a success event
curl --request GET \
--url https://api.chatsailer.com/v1/success-events/{event_id} \
--header 'Authorization: Bearer <token>'import requests
url = "https://api.chatsailer.com/v1/success-events/{event_id}"
headers = {"Authorization": "Bearer <token>"}
response = requests.get(url, headers=headers)
print(response.text)const options = {method: 'GET', headers: {Authorization: 'Bearer <token>'}};
fetch('https://api.chatsailer.com/v1/success-events/{event_id}', 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.chatsailer.com/v1/success-events/{event_id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
CURLOPT_HTTPHEADER => [
"Authorization: Bearer <token>"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.chatsailer.com/v1/success-events/{event_id}"
req, _ := http.NewRequest("GET", url, nil)
req.Header.Add("Authorization", "Bearer <token>")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.chatsailer.com/v1/success-events/{event_id}")
.header("Authorization", "Bearer <token>")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.chatsailer.com/v1/success-events/{event_id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
request["Authorization"] = 'Bearer <token>'
response = http.request(request)
puts response.read_body{
"billable": true,
"created_at": "2023-11-07T05:31:56Z",
"currency": "BRL",
"dedupe_key": "<string>",
"entry_kind": "record",
"event_code": "<string>",
"id": "sev_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"occurred_at": "2023-11-07T05:31:56Z",
"agreement_id": "agr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"contact_id": "con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"conversation_id": "conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"deal_id": "deal_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"object": "success_event",
"reason": "<string>",
"reverses_event_id": "sev_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4",
"value_cents": 123
}{
"detail": [
{
"loc": [
"<string>"
],
"msg": "<string>",
"type": "<string>",
"ctx": {},
"input": "<unknown>"
}
]
}Authorizations
A workspace API token. Create one in Settings → API. Send it as Authorization: Bearer sk_live_....
Path Parameters
Unique identifier for a success event.
^sev_[0-9a-f]{32}$"sev_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Response
Successful Response
One entry in the success-event ledger.
Whether a billing agreement was attached when the event was recorded. false means the event is kept for reporting but will never be invoiced, even if an agreement starts later.
When Sailer recorded the event.
"BRL"
record for a success; reversal for the entry that undoes one. A reversal carries the same event_code and value_cents as the event it reverses.
record, reversal Unique identifier for a success event.
^sev_[0-9a-f]{32}$"sev_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for a billing agreement.
^agr_[0-9a-f]{32}$"agr_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for a contact.
^con_[0-9a-f]{32}$"con_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for a conversation.
^conv_[0-9a-f]{32}$"conv_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
Unique identifier for a deal.
^deal_[0-9a-f]{32}$"deal_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"
"success_event"Unique identifier for a success event.
^sev_[0-9a-f]{32}$"sev_9f2ac41d8b7e4a51b0d3e6f7a1c2d3e4"