Update a training snapshot
curl --request PATCH \
--url https://your-instance.example.com/api/training/snapshots/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quality": "bad",
"tags": [
"sales",
"pricing",
"review"
],
"isArchived": false
}
'import requests
url = "https://your-instance.example.com/api/training/snapshots/{id}"
payload = {
"quality": "bad",
"tags": ["sales", "pricing", "review"],
"isArchived": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({quality: 'bad', tags: ['sales', 'pricing', 'review'], isArchived: false})
};
fetch('https://your-instance.example.com/api/training/snapshots/{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://your-instance.example.com/api/training/snapshots/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'quality' => 'bad',
'tags' => [
'sales',
'pricing',
'review'
],
'isArchived' => false
]),
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://your-instance.example.com/api/training/snapshots/{id}"
payload := strings.NewReader("{\n \"quality\": \"bad\",\n \"tags\": [\n \"sales\",\n \"pricing\",\n \"review\"\n ],\n \"isArchived\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://your-instance.example.com/api/training/snapshots/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quality\": \"bad\",\n \"tags\": [\n \"sales\",\n \"pricing\",\n \"review\"\n ],\n \"isArchived\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/training/snapshots/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quality\": \"bad\",\n \"tags\": [\n \"sales\",\n \"pricing\",\n \"review\"\n ],\n \"isArchived\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Training snapshot created successfully",
"data": {
"_id": "67f1a0b0c0d0e0f0a0b0c0d0",
"organizationId": "65a0e0e0e0e0e0e0e0e0e0e0",
"customerName": "Jane Doe",
"quality": "good",
"tags": [
"sales",
"pricing"
],
"isArchived": false,
"createdAt": "2026-05-18T14:30:00.000Z",
"updatedAt": "2026-05-18T14:30:00.000Z"
}
}{
"success": false,
"message": "Training snapshot not found",
"error": "NOT_FOUND"
}Training
Update a training snapshot
Update the editable metadata on a training snapshot — notes, tags, quality, category, or archive state. The captured message body is immutable.
PATCH
/
api
/
training
/
snapshots
/
{id}
Update a training snapshot
curl --request PATCH \
--url https://your-instance.example.com/api/training/snapshots/{id} \
--header 'Authorization: Bearer <token>' \
--header 'Content-Type: application/json' \
--data '
{
"quality": "bad",
"tags": [
"sales",
"pricing",
"review"
],
"isArchived": false
}
'import requests
url = "https://your-instance.example.com/api/training/snapshots/{id}"
payload = {
"quality": "bad",
"tags": ["sales", "pricing", "review"],
"isArchived": False
}
headers = {
"Authorization": "Bearer <token>",
"Content-Type": "application/json"
}
response = requests.patch(url, json=payload, headers=headers)
print(response.text)const options = {
method: 'PATCH',
headers: {Authorization: 'Bearer <token>', 'Content-Type': 'application/json'},
body: JSON.stringify({quality: 'bad', tags: ['sales', 'pricing', 'review'], isArchived: false})
};
fetch('https://your-instance.example.com/api/training/snapshots/{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://your-instance.example.com/api/training/snapshots/{id}",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "PATCH",
CURLOPT_POSTFIELDS => json_encode([
'quality' => 'bad',
'tags' => [
'sales',
'pricing',
'review'
],
'isArchived' => false
]),
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://your-instance.example.com/api/training/snapshots/{id}"
payload := strings.NewReader("{\n \"quality\": \"bad\",\n \"tags\": [\n \"sales\",\n \"pricing\",\n \"review\"\n ],\n \"isArchived\": false\n}")
req, _ := http.NewRequest("PATCH", 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.patch("https://your-instance.example.com/api/training/snapshots/{id}")
.header("Authorization", "Bearer <token>")
.header("Content-Type", "application/json")
.body("{\n \"quality\": \"bad\",\n \"tags\": [\n \"sales\",\n \"pricing\",\n \"review\"\n ],\n \"isArchived\": false\n}")
.asString();require 'uri'
require 'net/http'
url = URI("https://your-instance.example.com/api/training/snapshots/{id}")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Patch.new(url)
request["Authorization"] = 'Bearer <token>'
request["Content-Type"] = 'application/json'
request.body = "{\n \"quality\": \"bad\",\n \"tags\": [\n \"sales\",\n \"pricing\",\n \"review\"\n ],\n \"isArchived\": false\n}"
response = http.request(request)
puts response.read_body{
"success": true,
"message": "Training snapshot created successfully",
"data": {
"_id": "67f1a0b0c0d0e0f0a0b0c0d0",
"organizationId": "65a0e0e0e0e0e0e0e0e0e0e0",
"customerName": "Jane Doe",
"quality": "good",
"tags": [
"sales",
"pricing"
],
"isArchived": false,
"createdAt": "2026-05-18T14:30:00.000Z",
"updatedAt": "2026-05-18T14:30:00.000Z"
}
}{
"success": false,
"message": "Training snapshot not found",
"error": "NOT_FOUND"
}Authorizations
Bearer authentication header of the form Bearer <token>, where <token> is your auth token.
Path Parameters
Body
application/json
Response
Training snapshot updated successfully
Available options:
true Mongoose TrainingSnapshot document. userId and contactId are populated to user/contact docs on read endpoints.
Show child attributes
Show child attributes
Example:
{
"_id": "67f1a0b0c0d0e0f0a0b0c0d0",
"organizationId": "65a0e0e0e0e0e0e0e0e0e0e0",
"userId": {
"_id": "65b1f0a2c3d4e5f6a7b8c9d0",
"firstName": "Alice",
"lastName": "Rivera",
"email": "alice@example.com"
},
"contactId": {
"_id": "65c2d0e0f0a0b0c0d0e0f0a0",
"firstName": "Jane",
"lastName": "Doe",
"phoneNumber": "+14155550123",
"email": "jane@example.com",
"channelType": "sms"
},
"customerName": "Jane Doe",
"customerPhone": "+14155550123",
"customerEmail": "jane@example.com",
"messages": [
{
"id": "67e0a0b0c0d0e0f0a0b0c0d0",
"content": "Hi! How can we help?",
"sender": "user",
"senderType": "AI",
"timestamp": "2026-05-18T13:30:00.000Z"
}
],
"messageCount": 4,
"snapshotDate": "2026-05-18T14:30:00.000Z",
"conversationStartDate": "2026-05-18T13:30:00.000Z",
"conversationEndDate": "2026-05-18T14:10:00.000Z",
"notes": "Great handling of objection on pricing.",
"tags": ["sales", "pricing"],
"quality": "good",
"category": "objection-handling",
"isArchived": false,
"createdAt": "2026-05-18T14:30:00.000Z",
"updatedAt": "2026-05-18T14:30:00.000Z"
}
⌘I