Skip to main content
POST
/
api
/
training
/
snapshots
Create a training snapshot from a conversation
curl --request POST \
  --url https://your-instance.example.com/api/training/snapshots \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "contactId": "65c2d0e0f0a0b0c0d0e0f0a0",
  "messageIds": [
    "67e0a0b0c0d0e0f0a0b0c0d0",
    "67e0a0b0c0d0e0f0a0b0c0d1"
  ],
  "notes": "Great handling of objection on pricing.",
  "tags": [
    "sales",
    "pricing"
  ],
  "quality": "good",
  "category": "objection-handling"
}
'
{
  "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"
  }
}

Authorizations

Authorization
string
header
required

Bearer authentication header of the form Bearer <token>, where <token> is your auth token.

Body

application/json
contactId
string
required
messageIds
string[]
notes
string
tags
string[]
quality
string

Quality rating, e.g. "good", "bad", "neutral"

category
string

Response

Training snapshot created successfully

success
enum<boolean>
required
Available options:
true
data
object
required

Mongoose TrainingSnapshot document. userId and contactId are populated to user/contact docs on read endpoints.

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"
}
message
string