Skip to main content
The AI Training API allows you to programmatically manage training scenarios, directories, and knowledge search for your AI assistant. Training scenarios teach the AI how to respond to specific situations unique to your business.

Training Types

  • Behavioral — Always-active instructions that control tone, style, guardrails, and escalation rules. Included in every conversation.
  • Scenario-specific — Triggered by semantic matching when a customer’s question is similar. Indexed as vector embeddings for retrieval.

Key Concepts

  • Scenarios — Question-answer pairs with a title (trigger) and body (instruction). Can be restricted to specific channels or contact segments.
  • Directories — Folders for organizing scenarios by topic.
  • Draft/Published — Draft scenarios are saved but not used by the AI. Publishing makes them active.

Available Endpoints

List Trainings

Retrieve all training scenarios

Get Training

Get a single training by ID

Create Training

Create a new training scenario

Update Training

Update an existing training

Delete Training

Delete a training scenario

Toggle Draft

Publish or unpublish a training

Move to Directory

Move a training into a directory

Search

Semantic search across training and knowledge base

Generate Scenario

Generate a scenario title from a chat session

Best Practices

  • Use search before creating to avoid duplicates
  • Start with draft scenarios, review, then publish
  • Use behavioral type for tone and guardrails, scenario-specific for Q&A
  • Organize related scenarios into directories
  • Restrict to channels/segments when a scenario only applies to specific contexts
  • Use generate_training_from_session to learn from real conversations