AI API
AI endpoints exposed by the Devotel CPaaS API Base path:/api/v1/ai
Endpoint count: 13
title: “AI Knowledge Base endpoints (ingest, refresh, search)” description: “Curated note covering the embedded org-wide knowledge base in the AI API, with endpoints for document ingest, staleness scoring, and grounded search.”
The AI API also includes an embedded, org-wide Knowledge Base — not shown
in the auto-generated endpoint list below. Ingest documents by upload, URL,
markdown, or bulk help-center import (
POST /api/v1/ai/kb/documents,
POST /api/v1/ai/kb/import/help-center), keep them fresh with a staleness
scorecard and per-document verification (GET /api/v1/ai/kb/staleness,
POST /api/v1/ai/kb/documents/{id}/verify), and query them with raw semantic
search (POST /api/v1/ai/kb/search) or a grounded answer with citations
(POST /api/v1/ai/kb/answers). See the full
AI Knowledge Base reference. For a
separately provisioned, per-knowledge-base store, use the
Knowledge Bases API.Analyze text (sentiment / intent / language / topics)
POST /api/v1/ai/analyze/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
Text to analyze (1-10,000 chars).
Analyze a stored message by ID and persist the analysis
POST /api/v1/ai/analyze-message/{id}/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
—
OpenAI-compatible chat completion (general inference)
POST /api/v1/ai/chat/completions/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
Optional model id. OpenAI ids are remapped to the platform fast tier.
object[]
required
Conversation turns (1-50).
number
—
integer
—
object
—
Classify the customer’s intent from a conversation
POST /api/v1/ai/classify-intent/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
Conversation ID to analyze.
Draft a full campaign blueprint from a plain-English goal
POST /api/v1/ai/compose-campaign/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
Plain-English campaign goal (5-2,000 chars).
string (enum: champion|high_value_engaged|engaged|new|passive|at_risk|…)
—
string
—
string (enum: sms|whatsapp|email|voice)[]
—
string (enum: professional|casual|urgent|friendly|empathetic)
—
string
—
string
—
Generate AI-powered dashboard insights from stats
POST /api/v1/ai/dashboard-insights/ai endpoint it counts against the AI rate limit and deducts credits per call.
Generate embedding vectors for one or more input strings
POST /api/v1/ai/embeddings/ai endpoint it counts against the AI rate limit and deducts credits per call.
any
required
Text (or array of texts) to embed.
Generate channel-appropriate message content from a prompt
POST /api/v1/ai/generate-content/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
Plain-English prompt (1-2,000 chars).
string (enum: professional|casual|urgent|friendly)
—
string
—
Improve, shorten, lengthen, or rephrase existing text
POST /api/v1/ai/improve-text/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
Text to improve (1-10,000 chars).
string (enum: improve|shorter|longer|change_tone|fix_grammar|rephrase)
required
—
string
—
Recommend the optimal channel + fallbacks for a recipient
POST /api/v1/ai/optimize-channel/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
Recipient identifier (E.164 phone or email).
string (enum: marketing|transactional|otp)
—
string (enum: cheapest|fastest|highest_engagement|balanced)
—
string[]
—
Generate AI-suggested replies for a conversation
POST /api/v1/ai/suggest-reply/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
Conversation ID to analyze.
Summarize a conversation thread
POST /api/v1/ai/summarize-conversation/ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
Conversation ID to analyze.
Translate text to a target language
POST /api/v1/ai/translatetarget_language to an ISO 639-1 code (es, fr, pt-BR) or a language name (Spanish). Like every /ai endpoint it counts against the AI rate limit and deducts credits per call.
string
required
Text to translate (1-10,000 chars).
string
required
Target language name or ISO 639-1 code.