Languages: every operation supports cURL, Node.js (TypeScript), Python, Go, Ruby, and PHP. The first 15 operations on this page show all six languages; the remaining 10 show cURL and TypeScript — the two most-used.
AI API
AI endpoints exposed by the Devotel CPaaS API Base path:/api/v1/ai
Endpoint count: 25
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.Worked session/memory + budget envelopes
The auto-generated response examples below show the OpenAPI schema shape. The worked envelopes in this section show the exact fields your integration sees, with real values, across the three AI chains the reference below only half-covers: the per-contact session-memory read/write pair, the per-agent token-budget precheck, and the chat response the whole flow ends in. Together with the worked agent samples they give you a body you can branch on for every call an agent build makes first. Both the memory round trip and the budget precheck are tenant-owned controls: memory facts are scoped to one contact (and deleted with the contact’s GDPR erasure), and the token budget is a per-agent cap your workspace sets. The session-memory pair has its four statuses —201 write, 200 read, 409 opt-out or per-contact fact cap, 422 validation.
1. Session memory round trip
Teach the agent a fact about a contact, then read the same contact’s facts back. The write returns201 with the stored item; the read returns the newest facts with PII in the fact bodies masked unless your role is in the unmask allowlist and you pass ?reveal=true. When the contact has opted out of memory the write returns 409 MEMORY_DISABLED_FOR_CONTACT and the read returns an empty list with memory_enabled: false.
POST /api/v1/agents/{agentId}/memorycontact_id and fact are required; source is manual (default) or conversation, and importance (0–1) overrides the default 0.9 for manual teaches. The fact body is sanitised, capped to your tenant’s content limit, and stored with an embedding so the agent can retrieve it in later turns.
Request
GET /api/v1/agents/{agentId}/memory?contact_id=ctt_4f2a9c1efact-type entries are returned and phone/email tokens in the bodies are PII-masked; owner, admin, and developer roles can pass reveal=true to unmask (each reveal is audit-logged). A contact that has opted out returns an empty items list with memory_enabled: false.
409 the write returns when the contact has opted out — branch on this before you surface “teach the agent” in your UI:
409
2. Token-budget precheck
Evaluate an action against your agent’s governance policies before the send, so a long turn never starts when it would be denied. Pass the intendedmodel, the tool id (if the action invokes a tool), and the tokens the agent has already consumed this UTC month. The response merges every enabled policy that applies to the agent and returns a single allow/deny verdict with the effective caps it resolved — the monthly token budget is the strictest (minimum) across applying policies, and the model allowlist is the intersection. Gate on allowed: true/false; when the gate denies, reason is one of model_not_allowed, budget_exceeded, or sod_approval_required. Both fields you need to gate the send are on the envelope below.
GET /api/v1/agents/governance-internal/resolve?agent_id=agt_7e3b9c1f&model=claude-sonnet-4-6&monthly_tokens_used=84129monthly_tokens_used=250000 (already at the budget) the verdict flips — gate on it before you send:
200
POST /api/v1/agents/{agentId}/chat200
3. Errors-as-decision-table
Every/ai and /agents failure returns the same { error, meta } envelope. The error.code and status tell you which of the three decisions to take; don’t treat 4xx as one class.
429
429, 502, 503) are the only safe replay: they mean nothing was committed, so the same request can be resent after the wait. Reframe statuses (402, 409, 422) will fail identically every time until you change the request — and 409 MEMORY_DISABLED_FOR_CONTACT specifically means stop, because the contact revoked consent.
List knowledge-source connectors
GET /api/v1/ai/kb/connectorscategory, status, and a free-text search. Also returns per-category facet counts for the picker sidebar.
string
Filter by connector category. Validated against the catalog’s category enum by the controller (unknown value → 422).
string
Filter by availability status (e.g.
ga, coming_soon). Validated against the catalog’s status enum by the controller (unknown value → 422).string
Case-insensitive substring over connector id / name / description / objects.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.Get a knowledge-source connector
GET /api/v1/ai/kb/connectors/{id}string
required
The catalog connector slug, e.g.
zendesk_help_center (lowercase letters, digits, underscores). 404 for an unknown slug.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.List knowledge-base documents
GET /api/v1/ai/kb/documentsprocessing to ready. Page through large libraries with the previous page’s next_cursor.
string
Opaque keyset cursor from a prior page’s
next_cursor. Omit for the first page.integer
Page size (1-100). Defaults to 100.
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.Get a knowledge-base document
GET /api/v1/ai/kb/documents/{id}string
required
The knowledge-base document id (UUID).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.Scan the knowledge base for stale documents
GET /api/v1/ai/kb/stalenessstale_count, total_documents, by_reason) are tallied over the full scan; limit pages only the returned per-document verdict rows.
integer
Page size for the returned per-document verdict rows (1-1000). Defaults to 25. The header aggregates (
stale_count, total_documents, by_reason) are always tallied over the full scan.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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
The stored message id to analyze.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.string
required
Plain-English prompt (1-2,000 chars).
string (enum: professional|casual|urgent|friendly)
—
string
—
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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.string
required
Text to improve (1-10,000 chars).
string (enum: improve|shorter|longer|change_tone|fix_grammar|rephrase)
required
—
string
—
Answer a question from the knowledge base
POST /api/v1/ai/kb/answersaudiences, and meters one billable resolution per answered query above the confidence floor. Each call is one LLM round-trip, so it counts against the AI spend cap. For raw ranked chunks without an answer, use POST /ai/kb/search instead.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.string
required
The end-user question to answer (1-2000 chars).
string[]
Optional knowledge-base allowlist. When present, retrieval is scoped to these KBs only; when omitted, the whole workspace knowledge base is searched. Max 20 ids.
integer
Max chunks retrieved to ground the answer (1-10). Defaults to 8.
number
Optional retrieval similarity floor (0-1) passed through to the vector search.
number
Confidence floor (0-1) above which an answer is charged as a billable resolution. Defaults to the platform bar (0.75); a lower-confidence answer is still returned but not billed.
string
Optional language tag (e.g.
en, pt-BR) — the answer is written in this language.string[]
The audience tokens (roles / segments) the end-user belongs to, used to enforce per-document access control. Omit / empty = anonymous requester → only unrestricted documents are eligible. Max 50.
Add a knowledge-base document
POST /api/v1/ai/kb/documentsmultipart/form-data). The document is stored with status processing and returned immediately; ingestion — text extraction, chunking, and embedding — runs on the worker, so poll the list or detail endpoint until status is ready.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.Reindex a knowledge-base document
POST /api/v1/ai/kb/documents/{id}/reindexprocessing rows as a safety net.
string
required
The knowledge-base document id (UUID).
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.Mark a knowledge-base document as verified
POST /api/v1/ai/kb/documents/{id}/verifylast_verified_at timestamp to now. Used by the staleness workflow so freshly-reviewed documents drop off the stale list. Idempotent — re-verifying just refreshes the timestamp.
string
required
The knowledge-base document id (UUID).
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.Import a help center into the knowledge base
POST /api/v1/ai/kb/import/help-centersubdomain is a strict DNS label, so the only host the connector can fetch is <subdomain>.zendesk.com. Returns 201 with the queued document rows. If the help center reports no published articles nothing is created, so the call succeeds with 200 instead — same envelope, plus queued: 0, an empty documents array, and a message naming what to check. Treat BOTH 200 and 201 as success.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.string (enum: zendesk_guide)
Help-center provider to enumerate. Only Zendesk Guide is importable without OAuth today.
string
required
The lowercase DNS label in
<subdomain>.zendesk.com (letters, digits, hyphens; max 63 chars). This is the only host the connector can ever fetch.string
Help-center locale segment, e.g.
en or en-us. Defaults to en-us.string
Optional prefix prepended to each imported document’s name (max 80 chars).
integer
Upper bound on the number of articles queued in one import (1-1000). Defaults to 250.
Search the knowledge base
POST /api/v1/ai/kb/searchPOST /ai/kb/answers instead.
string
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.string
required
The search query text (1-2000 chars).
integer
Max chunks to return (1-20). Defaults to 5.
number
Optional similarity floor (0-1) passed through to the vector search.
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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.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
Stripe-style idempotency token. Pass a stable, client-generated value (1-255 chars) to dedupe retries on transient timeouts. The same key+credential+path replays the original response for 24h on 2xx (5min on 4xx, 30s on 5xx). Returns 409 if a concurrent request with the same key is already in flight; replayed responses include the
Idempotency-Replay: true response header.string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.string
required
Text to translate (1-10,000 chars).
string
required
Target language name or ISO 639-1 code.
Delete a knowledge-base document
DELETE /api/v1/ai/kb/documents/{id}string
required
The knowledge-base document id (UUID).
string (enum: true|false)
Sandbox opt-in for Clerk-session-authenticated requests. Set to
true to route the call through the test-mode pipeline: no real provider delivery, no credits deducted, response meta.test_mode: true. Ignored for live API keys (dv_live_sk_*) — server-to-server clients must use a test-prefixed key (dv_test_sk_*) to exercise sandbox. Test-prefixed keys unconditionally enable sandbox regardless of this header.204 No Content