Technical Documentation: dograh-hq/dograh
ℹ️ Provenance: Multi-Tier Ingestion · CodeWiki Reference
Overview (`README.md`)
Dograh AI
The open-source, self-hostable alternative to Vapi & Retell — build production voice agents with a visual workflow builder, test them in minutes, and let AI coding assistants help design and edit them through MCP.
- 100% open source, self-hostable — no vendor lock-in, unlike Vapi or Retell
- Full control & transparency — every line of code is open, with flexible LLM / TTS / STT integration
- Maintained by YC alumni and exit founders, committed to keeping voice AI open
🎥 Featured
📺 Prefer a 2-minute product walkthrough? Click here.
⚖️ Dograh vs Vapi vs Retell
An honest comparison on the axes that matter most to teams evaluating voice AI platforms.
| Dograh | Vapi | Retell | |
|---|---|---|---|
| License | BSD 2-Clause (open source) | Proprietary | Proprietary |
| Self-hostable | ✅ Yes — one Docker command | ❌ SaaS only | ❌ SaaS only |
| Pricing | Free (self-host) · usage-based (cloud) | Per-minute SaaS | Per-minute SaaS |
| Bring your own LLM / STT / TTS | ✅ Any provider, or use Dograh's stack | Configurable within their integrations | Configurable within their integrations |
| Source-level customization | ✅ Every line is yours to modify | ❌ Closed source | ❌ Closed source |
| Data residency | Your infra, your rules | Their cloud | Their cloud |
| Vendor lock-in | None | Full | Full |
🚀 Get Started
Download and setup Dograh on your Local Machine
Note
We collect anonymous usage data to improve the product. You can opt out by settingENABLE_TELEMETRY=falsebefore running the startup script.
Note
If you wish to run the platform on a remote server instead, checkout our Documentation
curl -o docker-compose.yaml https://raw.githubusercontent.com/dograh-hq/dograh/main/docker-compose.yaml && curl -o start_docker.sh https://raw.githubusercontent.com/dograh-hq/dograh/main/scripts/start_docker.sh && chmod +x start_docker.sh && ./start_docker.shNote
By default the quickstart starts a public*.trycloudflare.comquick tunnel to the API (for inbound telephony webhooks), and signup is enabled. After creating your first account, you can close signup by settingENABLE_SIGNUP=falsein.envand re-running./start_docker.sh(docker compose restartdoes not apply.envchanges).
⚡ Prefer an AI agent to set it up for you?
If you use Claude Code or Codex, install the official Dograh setup skill and let your agent handle installation, configuration, and troubleshooting — it detects your OS, picks the right deploy path, runs Dograh's own setup scripts, and verifies the result.text# In Claude Code /plugin marketplace add dograh-hq/dograh-plugins /plugin install dograh@dograhThen start a new session and ask it to "set up Dograh" (or run
/dograh-setup). Codex is supported too — see the plugin repo.
Note
First startup may take 2-3 minutes to download all images. Once running, open http://localhost:3010 to create your first AI voice assistant!
For common issues and solutions, see 🔧 Troubleshooting.
🎙️ Your First Voice Bot
- Open http://localhost:3010 in your browser.
- Pick Inbound or Outbound, name your bot (e.g. Lead Qualification), and describe the use case in 5–10 words (e.g. Screen insurance form submissions for purchase intent).
- Click Test Agent.
- Use Test Audio to talk to your agent in the browser, or Test Chat to iterate faster in text. In Test Chat, you can edit or replay user turns and Dograh will regenerate the agent's replies and node transitions from that point.
🔑 No API keys needed. Dograh ships with auto-generated keys and its own LLM / TTS / STT stack. Connect your own keys for LLM, TTS, STT, or Telephony (e.g. Twilio, Vonage, Telnyx) anytime.
Featured On & Community Validation: Dograh was named #1 Product of the Day on Product Hunt.
Build Agents with MCP
Dograh ships with an MCP server, so coding agents can work directly inside your Dograh workspace.
Connect Codex, Claude Code, Cursor, or any MCP client to inspect existing agents, search Dograh docs, fetch node schemas, create new workflows, and save draft edits from natural language.
When asking your coding agent to build a voice agent, share a short script for
the use case instead of only a one-line prompt. Include the agent persona, call
flow, rules, objection handling, success criteria, and a sample conversation if
you have one.
See the MCP guide to connect your assistant.
Features
Voice Agent Builder
- Visual workflow builder with start nodes, agent nodes, global instructions, tools, transitions, and end-call outcomes
- Test Agent panel with Test Audio for browser voice testing and Test Chat for fast prompt iteration
- QA node, knowledge bases, webhooks, embeds, and tool calling for production workflows
Voice & Telephony
- Built-in telephony integrations including Twilio, Vonage, Telnyx, Plivo, Vobiz, Cloudonix, and Asterisk ARI
- Human handoff with call transfer on supported telephony providers
- Bring your own LLM, TTS, STT, and telephony providers; store artifacts in bundled MinIO or AWS/S3-compatible storage
Developer Experience
- One-command Docker setup for self-hosting
- Python backend and modular provider architecture for customization
- Python and Node SDKs for programmatic agent creation and outbound calls
Deployment Options
Local Development
Refer Local Setup
Self-Hosted Deployment
For detailed deployment instructions including remote server setup with HTTPS, see our Docker Deployment Guide.
Cloud Version
Visit https://www.dograh.com for our managed cloud offering.
📚Documentation
You can go to https://docs.dograh.com for our documentation.
📦 SDKs
- Python SDK — pypi.org/project/dograh-sdk
- Node SDK — npmjs.com/package/@dograh/sdk
🤝Community & Support
👋 Coming from the Better Stack video? Drop your use case in our pinned GitHub Discussion — we read every reply and the founders personally onboard early adopters.
- Slack — the cornerstone of Dograh AI contributions. Connect with maintainers, discuss features before coding, get help with setup, and stay current on contribution sprints.
- GitHub Discussions — share use cases, ask questions, swap workflow recipes.
- GitHub Issues — report bugs or request features.
👉 Join us → Dograh Community Slack
🙌 Contributing
We love contributions! Dograh AI is 100% open source and we intend to keep it that way.
Getting Started
- Fork the repository
- Create your feature branch (git checkout -b feature/AmazingFeature)
- Commit your changes (git commit -m 'Add some AmazingFeature')
- Push to the branch (git push origin feature/AmazingFeature)
- Open a Pull Request
⭐ Star History
📄 License
Dograh AI is licensed under the BSD 2-Clause License- the same license as projects that were used in building Dograh AI, ensuring compatibility and freedom to use, modify, and distribute.
🏢 About
Built with ❤️ by Dograh (Zansat Technologies Private Limited)
Founded by YC alumni and exit founders committed to keeping voice AI open and accessible to everyone.
Overview (`docs/README.md`)
Dograh AI Documentation
Local Setup
- Install mintlify
npm i mint - Clone the repository
cd dograh/docsand runmint dev
Overview (`examples/README.md`)
Dograh SDK Examples
Runnable examples of the Dograh SDK in Python and TypeScript.
Shared environment variables
Copy .env.example to .env in each example directory and fill in your values, then source .env (or use your preferred dotenv loader).
| Variable | Description |
|---|---|
DOGRAH_API_ENDPOINT |
Dograh API base URL (e.g. http://localhost:8000) |
DOGRAH_API_TOKEN |
API token — sent as X-API-Key |
The workflow ID and destination phone number are set as constants at the top of each example script — edit them there.
Python
pip install dograh-sdk
export DOGRAH_API_ENDPOINT=http://localhost:8000
export DOGRAH_API_TOKEN=sk-...
# Fetch a workflow by ID and place a test phone call.
python python/fetch_workflow_and_call.py
# Create a new workflow from a definition.
python python/create_workflow.py
# Build a 3-node agent with the Workflow SDK and save it as a draft.
# Edit WORKFLOW_ID at the top of the file first.
python python/build_workflow_with_sdk.py
# Load an existing workflow, edit the startCall prompt, and save as a draft.
# Edit WORKFLOW_ID at the top of the file first.
python python/load_and_edit_workflow.pyTypeScript
Uses tsx to run directly.
cd typescript
npm install
export DOGRAH_API_ENDPOINT=http://localhost:8000
export DOGRAH_API_TOKEN=sk-...
npm run call # fetch_workflow_and_call.ts
npm run create # create_workflow.ts
npm run build # build_workflow_with_sdk.ts (edit WORKFLOW_ID in the file first)
npm run edit # load_and_edit_workflow.ts (edit WORKFLOW_ID in the file first)Overview (`ui/README.md`)
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm run dev
# or
yarn dev
# or
pnpm dev
# or
bun devLogin Flow
- The redirection happens server side using
ui/src/stack.tsxafter the user has logged in.
Sentry and PostHog
- Initialized in
ui/src/instrumentation-client.ts
Overview (`deploy/hostinger/README.md`)
Hostinger (managed-Traefik) deployment
Deploy Dograh where a shared, managed Traefik with Let's Encrypt already
terminates TLS and routes ingress — e.g. Hostinger's VPS Docker Manager.
The same files work on any host that fronts containers with Traefik.
Files
| File | Role | Deploy on Hostinger? |
|---|---|---|
docker-compose.yaml |
The Dograh app stack. Single self-contained file — named volumes only, no host bind-mounts, no init/sidecar that reads files outside the compose. | ✅ Yes |
.env.example |
Required + optional environment variables, with guidance. Copy to .env and fill in. |
✅ Yes (as the env template) |
docker-compose.traefik.yaml |
A standalone Traefik + Let's Encrypt that stands in for the managed Traefik, so you can reproduce the environment on a plain VPS for testing. Also documents what the platform's Traefik must provide. | ❌ No — reference only |
What the app stack needs from Traefik
Routing is declared with Traefik labels on ui, api, and minio:/api/v1 → api (includes the signaling WebSocket), /voice-audio → minio,
everything else → ui. For that to work the platform's Traefik must offer:
- an HTTPS entrypoint — set
TRAEFIK_ENTRYPOINT(e.g.websecure) - a Let's Encrypt certresolver — set
TRAEFIK_CERTRESOLVER - the Docker provider watching a shared network — set
TRAEFIK_NETWORK - a long
idleTimeoutso long-lived signaling WebSockets aren't cut - (recommended) a global HTTP→HTTPS redirect
Traefik upgrades WebSockets automatically — no special label is required.
WebRTC media (coturn) is NOT proxied by Traefik
Voice audio is UDP (ICE/DTLS-SRTP), relayed by the bundled coturn. A reverse
proxy cannot carry it. coturn publishes host ports that must be open in the
VPS firewall: UDP+TCP 3478 and 5349, and UDP 49152-49200. TURN_HOST
must be the public IP (or a domain resolving to it). Without this, calls
connect (signaling succeeds) but have no audio.
Deploy on Hostinger
The platform provides Traefik, so you only deploy the app stack:
- Copy
.env.example→.envand fill inPUBLIC_HOST,TURN_HOST, the
secrets, and the threeTRAEFIK_*values (matched to Hostinger's Traefik). - Import / deploy
docker-compose.yaml. - Ensure the coturn UDP/TCP ports above are open in the firewall.
Test on a generic VPS (self-managed stand-in Traefik)
On a box that does not already run Traefik:
cp .env.example .env # fill in PUBLIC_HOST, TURN_HOST, secrets, ACME_EMAIL
docker network create traefik-proxy
docker compose -f docker-compose.traefik.yaml --env-file .env up -d # stand-in Traefik
docker compose --env-file .env up -d # app stackA no-cost trick for a real cert without owning a domain: setPUBLIC_HOST=.sslip.io (sslip.io resolves any embedded IP), which
Let's Encrypt will happily issue for.
Overview (`evals/stt/README.md`)
STT Evaluation Benchmark
Benchmark for comparing Speech-to-Text providers using WebSocket streaming with focus on:
- Speaker diarization - identifying who said what
- Keyterm boosting - improving recognition of specific terms (Deepgram)
Providers
| Provider | Diarization | Keyterm Boost | Streaming |
|---|---|---|---|
| Deepgram | Yes | Yes | WebSocket (v1/v2) |
| Speechmatics | Yes | Additional vocab | WebSocket RT |
Setup
# Install dependencies
pip install websockets
# Set API keys
export DEEPGRAM_API_KEY="your-key"
export SPEECHMATICS_API_KEY="your-key"Note: Requires ffmpeg installed for audio conversion to PCM16.
Usage
Run from the project root directory:
# Test both providers with diarization
python -m evals.stt.benchmark audio/multi_speaker.m4a --diarize
# Test only Deepgram
python -m evals.stt.benchmark audio/multi_speaker.m4a --diarize --providers deepgram
# Test with keyterm boosting (Deepgram)
python -m evals.stt.benchmark audio/multi_speaker.m4a --diarize --keyterms "Dograh" "Pipecat"
# Use different sample rate (default: 8000 Hz)
python -m evals.stt.benchmark audio/multi_speaker.m4a --diarize --sample-rate 16000
# Show word-level timings
python -m evals.stt.benchmark audio/multi_speaker.m4a --diarize --show-words
# Save results to JSON
python -m evals.stt.benchmark audio/multi_speaker.m4a --diarize --saveCLI Options
| Option | Description |
|---|---|
audio_file |
Path to audio file (relative to evals/stt/ or absolute) |
--providers |
Providers to test: deepgram, speechmatics (default: both) |
--diarize |
Enable speaker diarization |
--keyterms |
Keywords to boost (Deepgram) / additional vocab (Speechmatics) |
--language |
Language code (default: en) |
--sample-rate |
Audio sample rate for streaming (default: 8000) |
--show-words |
Show individual word timings |
--save |
Save results to JSON in results/ |
Directory Structure
evals/stt/
├── audio/ # Audio test files
│ └── multi_speaker.m4a
├── results/ # Saved benchmark results (JSON)
├── providers/ # STT provider implementations
│ ├── base.py # Base classes
│ ├── deepgram_provider.py # WebSocket streaming
│ └── speechmatics_provider.py # WebSocket streaming
├── audio_streamer.py # PCM16 audio file streamer
├── benchmark.py # Main runner script
└── README.mdHow It Works
- Audio Conversion: The
AudioStreamerconverts any audio file to raw PCM16 using ffmpeg - WebSocket Connection: Providers connect to their respective WebSocket APIs
- Streaming: Audio is sent in chunks (configurable sample rate, default 8kHz)
- Result Collection: Transcripts and speaker info are collected from WebSocket responses
- Comparison: Results are parsed into a common format for comparison
Output Example
Audio file: /path/to/audio/multi_speaker.m4a
Providers: ['deepgram', 'speechmatics']
Diarization: True
Sample rate: 8000 Hz
============================================================
Provider: DEEPGRAM
============================================================
Duration: 45.32s
Speakers detected: 2 - ['0', '1']
Transcript:
Hello, welcome to the demo...
--- Speaker Segments ---
[0.0s] Speaker 0: Hello, welcome to the demo.
[2.5s] Speaker 1: Thanks for having me.
...
============================================================
COMPARISON SUMMARY
============================================================
Provider Duration Speakers Words
---------------------------------------------
deepgram 45.32 2 312
speechmatics 45.32 2 308Adding New Providers
- Create a new file in
providers/(e.g.,whisper_provider.py) - Implement the
STTProviderabstract class with WebSocket streaming - Use
AudioStreamerfor PCM16 conversion - Add to
providers/__init__.py - Add to
benchmark.pyprovider choices
API Documentation
- Deepgram Streaming: https://developers.deepgram.com/docs/live-streaming-audio
- Deepgram Diarization: https://developers.deepgram.com/docs/diarization
- Deepgram Keyterms: https://developers.deepgram.com/docs/keyterm
- Speechmatics RT API: https://docs.speechmatics.com/rt-api-ref
- Speechmatics Diarization: https://docs.speechmatics.com/features/diarization
Overview (`evals/visualizer/README.md`)
This is a Next.js project bootstrapped with create-next-app.
Getting Started
First, run the development server:
npm install
npm run devOpen http://localhost:3000 with your browser to see the result.
You can start editing the page by modifying app/page.tsx. The page auto-updates as you edit the file.
This project uses next/font to automatically optimize and load Geist, a new font family for Vercel.
Learn More
To learn more about Next.js, take a look at the following resources:
- Next.js Documentation - learn about Next.js features and API.
- Learn Next.js - an interactive Next.js tutorial.
You can check out the Next.js GitHub repository - your feedback and contributions are welcome!
Deploy on Vercel
The easiest way to deploy your Next.js app is to use the Vercel Platform from the creators of Next.js.
Check out our Next.js deployment documentation for more details.
Overview (`sdk/python/README.md`)
dograh-sdk
Typed builder for Dograh voice-AI workflows. Fetches the node-spec catalog from
the Dograh backend at session start, validates every call against it at the
call site, and produces ReactFlowDTO-compatible JSON.
Install
pip install dograh-sdkFor local development against a checked-out monorepo:
pip install -e sdk/python/Usage
from dograh_sdk import DograhClient, Workflow
with DograhClient(base_url="http://localhost:8000", api_key="...") as client:
wf = Workflow(client=client, name="loan_qualification")
start = wf.add(
type="startCall",
name="greeting",
prompt="You are Sarah from Acme Loans. Greet the caller warmly.",
greeting_type="text",
greeting="Hi {{first_name}}, this is Sarah.",
)
qualify = wf.add(
type="agentNode",
name="qualify",
prompt="Ask about loan amount and timeline.",
)
done = wf.add(type="endCall", name="done", prompt="Thank the caller.")
wf.edge(start, qualify, label="interested", condition="Caller expressed interest.")
wf.edge(qualify, done, label="done", condition="Qualification complete.")
client.save_workflow(workflow_id=123, workflow=wf)What gets validated at the call site
The SDK fetches the spec for each node type via get_node_type and raisesValidationError immediately when:
- an unknown field is passed (catches typos)
- a required field is missing or empty
- a scalar type is wrong (e.g., string for a boolean)
- an
optionsvalue isn't in the allowed list
When a spec carries an llm_hint, the hint is appended to the error message so
an LLM agent can self-correct on retry:
tool_uuids: expected tool_refs, got str
Hint: List of tool UUIDs from `list_tools`.Server-side Pydantic validators run on save and surface anything the SDK lets
through (compound invariants, cross-field rules).
Environment
DOGRAH_API_URL=http://localhost:8000 # default
DOGRAH_API_KEY=sk-... # sent as X-API-KeyLicense
BSD 2-Clause — see LICENSE.
Overview (`sdk/typescript/README.md`)
@dograh/sdk
Typed builder for Dograh voice-AI workflows. Fetches the node-spec catalog from
the Dograh backend at session start, validates every call against it at the
call site, and produces wire-format JSON that round-trips through the PythonReactFlowDTO.
Install
npm install @dograh/sdk
# or
pnpm add @dograh/sdkFor local development against a checked-out monorepo, add a tsconfig paths
entry:
{
"paths": {
"@dograh/sdk": ["../sdk/typescript/src/index.ts"]
}
}Usage
import { DograhClient, Workflow } from "@dograh/sdk";
const client = new DograhClient({
baseUrl: "http://localhost:8000",
apiKey: process.env.DOGRAH_API_KEY,
});
const wf = new Workflow({ client, name: "loan_qualification" });
const start = await wf.add({
type: "startCall",
name: "greeting",
prompt: "You are Sarah from Acme Loans. Greet the caller warmly.",
greeting_type: "text",
greeting: "Hi {{first_name}}, this is Sarah.",
});
const qualify = await wf.add({
type: "agentNode",
name: "qualify",
prompt: "Ask about loan amount and timeline.",
});
const done = await wf.add({ type: "endCall", name: "done", prompt: "Thank them." });
wf.edge(start, qualify, { label: "interested", condition: "Caller expressed interest." });
wf.edge(qualify, done, { label: "done", condition: "Qualification complete." });
await client.saveWorkflow(123, wf);Client-side validation
Each add() call validates kwargs against the fetched spec. ValidationError
is thrown immediately when:
- an unknown field is passed (catches typos)
- a required field is missing or empty
- a scalar type is wrong (e.g., string for a boolean)
- an
optionsvalue isn't in the allowed list
When a spec carries an llm_hint, the hint is appended to the error so an LLM
agent can self-correct on retry:
tool_uuids: expected tool_refs, got string
Hint: List of tool UUIDs from `list_tools`.Server-side Pydantic validators run on save and surface anything the client
lets through.
Environment
DOGRAH_API_URL=http://localhost:8000 # default
DOGRAH_API_KEY=sk-... # sent as X-API-KeyLicense
BSD 2-Clause — see LICENSE.
Overview (`api/services/campaign/readme.md`)
campaign_orchestrator.py (CampaignOrchestrator)
- Listens to retry events, batch completed event, sync completed events from redis pubsub, and schedules batches
- Monitors stale campaigns and schedules batches if one is not already scheduled
- Marks campaign as completed if no more tasks pending
runner.py (CampaignRunnerService)
- Service layer to handle router requests, like run campaign, pause campaign, resume campaign, get campaign status etc.
call_dispatcher.py (CampaignCallDispatcher)
- Ensures rate limit and concurrency limits and dispatches call using telephony provider
campaign_tasks.py
- sync campaign from source
- process campaign batch
Overview (`api/services/gender/README.md`)
Gender Prediction Service
An internal service for predicting gender from first names using SSA (Social Security Administration) baby names data with GenderAPI fallback for uncertain predictions.
Overview
This service provides gender prediction with:
- Local model built from 145 years of SSA data (1880-2024)
- 104,819 unique names with confidence scores
- Compressed storage (2.21 MB model file)
- GenderAPI fallback for unknown or low-confidence names
Data Source
The SSA baby names data is already downloaded in the names/ directory from:
https://catalog.data.gov/dataset/baby-names-from-social-security-card-applications-national-data
Building the Model
Prerequisites
- Python 3.11+
- SSA data files in
names/directory (already included)
Build Steps
# Navigate to the gender service directory
cd dograh/api/services/gender/
# Run the model builder
python build_model.pyThis will:
- Process all 145 year files (yob1880.txt to yob2024.txt)
- Aggregate name counts across all years
- Calculate confidence scores based on gender ratios
- Generate a compressed
model.txtfile (~2.21 MB)
Model Output
The builder generates model.txt with:
- Version: Model version number
- Metadata: Build date, statistics, thresholds
- Names: Compressed array format
[male_count, female_count, confidence]
Example output:
Model saved to: .../services/gender/model.txt
File size: 2.21 MB
Model statistics:
Total names: 104,819
High confidence names (≥0.85): 1,711
Confidence percentage: 1.6%Using the Service
Basic Usage
from services.gender.gender_service import GenderService
# Initialize the service
service = GenderService()
# Predict gender for a single name
result = await service.predict("John")
print(f"Gender: {result.gender}") # "male"
print(f"Confidence: {result.confidence}") # 0.996
print(f"Source: {result.source}") # "model"
# Get salutation for a name
greeting = await service.get_salutation("John")
print(f"Salutation: {greeting}") # "Mr."
greeting = await service.get_salutation("Mary")
print(f"Salutation: {greeting}") # "Ms."
greeting = await service.get_salutation("Unknown")
print(f"Salutation: {greeting}") # "Dear"
# Clean up
await service.close()Configuration Options
# Custom configuration
service = GenderService(
model_path="custom/path/to/model.txt", # Default: ./model.txt
confidence_threshold=0.85, # Default: 0.85
gender_api_key="your-api-key", # Default: from GENDER_API_KEY env
gender_api_url="https://...", # Default: GenderAPI v2 endpoint
)Salutation Generation
# Get appropriate salutation based on gender
salutation = await service.get_salutation("John") # "Mr."
salutation = await service.get_salutation("Mary") # "Ms."
salutation = await service.get_salutation("Unknown") # "Dear"
# Custom confidence threshold for salutation
salutation = await service.get_salutation(
"Taylor", # Ambiguous name
confidence_threshold=0.9, # Higher threshold
) # Returns "Dear" due to low confidence
# Salutation logic:
# - "Mr." for male with confidence >= threshold
# - "Ms." for female with confidence >= threshold
# - "Dear" for unknown gender or low confidenceBatch Predictions
# Predict multiple names at once
names = ["Alice", "Bob", "Charlie", "Diana"]
results = await service.batch_predict(names)
for name, result in zip(names, results):
print(f"{name}: {result.gender} ({result.confidence:.2f})")Response Format
class GenderPrediction:
gender: "male" | "female" | "unknown" # Predicted gender
confidence: float # 0.0 to 1.0
source: "model" | "genderapi" # Prediction sourceService Statistics
# Get service statistics
stats = await service.get_stats()
print(f"Total names: {stats['model']['total_names']:,}")
print(f"High confidence: {stats['model']['high_confidence_names']:,}")
print(f"Cached names in Redis: {stats['cache']['cached_names']}")
print(f"Cache TTL: {stats['cache']['ttl_seconds']} seconds")
print(f"API enabled: {stats['api']['enabled']}")Cache Management
# Clear Redis cache
await service.clear_cache()Environment Variables
# Required: Redis connection URL
export REDIS_URL=redis://localhost:6379
# Optional: Set GenderAPI key for fallback
export GENDERAPI_API_KEY=your-api-key-here
# Optional: Override confidence threshold (default: 0.85)
export CONFIDENCE_THRESHOLD=0.85How It Works
- Name normalization: Converts to lowercase, strips whitespace
- Local model check: Looks up name in pre-built model
- Confidence evaluation: If confidence ≥ 0.85, returns local prediction
- Redis cache check: Checks Redis for previously fetched API results
- API fallback: For unknown/low-confidence names, calls GenderAPI
- Redis caching: Stores API responses in Redis with 30-day TTL
Testing
Run the test suite to verify the service:
python test_service.pyThis tests:
- High-confidence predictions
- Ambiguous names
- Edge cases (empty strings, special characters)
- International names (with API key)
- Batch predictions
Model Updates
The model should be rebuilt annually when new SSA data is released:
- Download new year file (e.g., yob2025.txt) to
names/directory - Run
python build_model.pyto rebuild - Test with
python test_service.py - Commit the updated
model.txt
Performance
- Model size: 2.21 MB (compressed JSON)
- Load time: < 100ms
- Prediction time: < 1ms (local), < 5ms (Redis cache), < 500ms (API)
- Memory usage: ~10 MB for model in memory
- Cache: Redis-based with 30-day TTL
- Scalability: Shared cache across all service instances
Limitations
- Based on US SSA data (may not work well for non-US names)
- Historical bias in older data
- Unisex names have lower confidence
- Requires GenderAPI key for comprehensive coverage
Overview (`api/services/telephony/README.md`)
Telephony Provider Implementation
This module implements the telephony provider abstraction for Dograh AI. For user-facing documentation, see the Mintlify docs.
Architecture
Business Logic → TelephonyProvider (Interface) → Concrete Provider (Twilio, Vonage, etc.)Developer Quick Reference
Using the Provider in Code
from api.services.telephony.factory import (
get_default_telephony_provider,
get_telephony_provider_by_id,
)
# Get the org's default outbound provider
provider = await get_default_telephony_provider(organization_id)
# Or resolve a specific telephony configuration row
provider = await get_telephony_provider_by_id(config_id, organization_id)
# Initiate a call
result = await provider.initiate_call(
to_number="+1987654321",
webhook_url="https://your-app.com/webhook",
workflow_run_id=123,
)File Structure
telephony/
├── __init__.py
├── base.py # Abstract TelephonyProvider interface
├── factory.py # Provider creation and config loading
├── providers/
│ ├── __init__.py
│ ├── twilio_provider.py # Twilio implementation
│ └── vonage_provider.py # Vonage implementation
├── twilio.py # Legacy (removed, use factory instead)
└── README.md # This fileImplementing a New Provider
See the Custom Provider Guide in the documentation for detailed implementation instructions.
Quick checklist:
- Create
providers/your_provider.pyimplementingTelephonyProvider - Register the package in
providers/__init__.pyand add its schemas toapi/schemas/telephony_config.py - Write unit tests
- Update documentation
Key Interfaces
class TelephonyProvider(ABC):
@abstractmethod
async def initiate_call(self, to_number: str, webhook_url: str, workflow_run_id: Optional[int] = None, **kwargs: Any) -> Dict[str, Any]
@abstractmethod
async def get_call_status(self, call_id: str) -> Dict[str, Any]
@abstractmethod
async def get_available_phone_numbers(self) -> List[str]
@abstractmethod
def validate_config(self) -> bool
@abstractmethod
async def verify_webhook_signature(self, url: str, params: Dict[str, Any], signature: str) -> bool
@abstractmethod
async def get_webhook_response(self, workflow_id: int, organization_id: int, workflow_run_id: int) -> strConfiguration Loading
The factory.py loads configuration from the database:
Both Saas and OSS Modes: Database configuration via UI
# Loaded from organization_configuration table
key: "TELEPHONY_CONFIGURATION"
value: {
"provider": "twilio", # or "vonage"
"account_sid": "xxx", # for Twilio
"auth_token": "xxx", # for Twilio
"application_id": "xxx", # for Vonage
"private_key": "xxx", # for Vonage
"from_numbers": [...],
}Testing
Unit Testing with Mock Provider
class MockProvider(TelephonyProvider):
async def initiate_call(self, to_number, webhook_url, **kwargs):
return {"call_id": "mock_123", "status": "initiated"}
async def get_call_status(self, call_id):
return {"call_id": call_id, "status": "completed"}
# Implement other required methods...
# In tests
@patch("api.services.telephony.factory.get_default_telephony_provider")
async def test_call_initiation(mock_get_provider):
mock_get_provider.return_value = MockProvider()
# Test your business logicIntegration Testing
Run against actual providers in development:
Configure your provider through the UI:
- Navigate to Settings → Integrations → Telephony
- Select your provider (Twilio or Vonage)
- Enter test credentials
- Save configuration
Run integration tests:
pytest tests/integration/test_telephony.pyMigration Notes
From Direct TwilioService Usage
Old code:
from api.services.telephony.twilio import TwilioService
service = TwilioService(org_id)
await service.initiate_call(...)New code:
from api.services.telephony.factory import get_default_telephony_provider
provider = await get_default_telephony_provider(org_id)
await provider.initiate_call(...)Backward Compatibility
- Old
/api/v1/twilio/*endpoints still work (redirect to/api/v1/telephony/*) TwilioServiceclass remains for legacy code- Database configuration key
TWILIO_CONFIGURATIONunchanged
Common Issues
- Import Error: Always import from
factory, not directly from providers - Config Not Found: Check database configuration via UI
- Signature Verification: Ensure auth tokens match between provider and config
- WebSocket Issues: Verify audio format compatibility (MULAW for Twilio)
Related Documentation
Overview (`deploy/helm/dograh/README.md`)
Dograh Helm chart
Deploys Dograh on Kubernetes with decomposed backend workloads (web,
ARQ workers, telephony singleton, campaign singleton), Next.js UI, and
coturn for WebRTC media relay. Implements the architecture defined inHELM_DEPLOYMENT_PLAN.md at the repo root.
Status
v1, alpha. Validated with helm lint and helm template. Not yet
exercised against a live cluster.
Quick start
cd deploy/helm/dograh
# Install with defaults (all internal deps, Gateway API exposure).
# The bundled Postgres/Redis/MinIO are in-chart manifests (official Postgres and
# Redis images, dograh's MinIO build) — no `helm dependency` / subchart pull step
# needed.
helm install dograh . \
--set secrets.ossJwtSecret="$(openssl rand -hex 32)" \
--set secrets.turnSecret="$(openssl rand -hex 32)" \
--set exposure.gatewayApi.gatewayClassName=istioSee examples/values-single-node.yaml, examples/values-managed.yaml,
and examples/values-aws.yaml for topology-specific overrides.
Architecture summary
| Workload | Replicas | Strategy | Notes |
|---|---|---|---|
dograh-web |
2 (HPA opt) | RollingUpdate | Long-lived WS, graceful drain |
dograh-arq-worker |
1 (HPA opt) | RollingUpdate | Stateless |
dograh-ari-manager |
1 fixed | Recreate | Telephony singleton |
dograh-campaign-orchestrator |
1 fixed | Recreate | Campaign singleton (in-memory locks) |
dograh-ui |
2 (HPA opt) | RollingUpdate | Next.js SSR |
dograh-coturn |
1 | Recreate | LoadBalancer Service, port-pinned |
HTTP traffic: Gateway API (default) or Ingress (fallback).
TURN traffic: dedicated L4 Service of type LoadBalancer.
Decisions log
These are choices the chart made where HELM_DEPLOYMENT_PLAN.md was
silent. Each is exposed in values.yaml for operator override.
- terminationGracePeriodSeconds for web: 1275s. Covers a full-length
(20-minute) call so scale-down / rolling updates drain instead of cutting
it, plus 60s after preStop for bounded text-chat finalization and resource
shutdown; tune to your call-length distribution. Shutdown attempts to mark
unfinished chat turns failed before cancellation. If completion already
committed, it hands transcript upload and completion enqueue to an ARQ worker
before cancelling the local task. Both operations share a 5-second deadline;
a failed database write or handoff leaves the local task running for the
remaining shutdown window. This is best effort: dependency outages or forced
termination can still leave a session pending or interrupt work before handoff.
Deploy ARQ workers withfinalize_completed_text_chatsupport before updating
web instances that can enqueue that job. - preStop active-call drain (scripts/drain_web.sh). Waits
preStopSleepSeconds(15s) for the gateway to stop dispatching new
connections, then polls /api/v1/health/active-calls and holds SIGTERM until
the count hits 0 ordrainMaxWaitSeconds(1200s). Falls back to a fixed
sleep when the devops secret is unset. - Liveness probes on singletons:
exec(pgrep). No HTTP endpoint
exists on ari-manager / campaign-orchestrator; process-alive check is
the simplest correct signal. - HPA on web / workers / ui: CPU(/memory), disabled by default.
Templates exist for all three tiers (web-hpa.yaml,arq-worker-hpa.yaml,ui-hpa.yaml) but everyautoscaling.<tier>
block shipsenabled: false— flip on per tier with a knowing eye.
CPU/memory is a poor signal for the WS-heavy web tier and a coarse
one for the IO-bound ARQ workers (plan: queue-depth / active-call
scaling, see TODOs); it is a reasonable signal for the Next.js UI. - Singleton replica counts: hard-coded. No
replicaCountknob
exposed on ari-manager / campaign-orchestrator. Prevents accidentalkubectl scalecorrupting in-memory dedup state. - MinIO browser exposure: shared host, path prefix
/voice-audio/.
Mirrors current nginx behavior. Operators wanting a separate
hostname can override by editinghttproute-minio.yamloringress.yamlpost-install. - NetworkPolicy: not in v1. TODO below.
- ServiceMonitor / Prometheus: not in v1. TODO below.
- TURN TLS (turns://): not in v1. Original docker-compose exposed
port 5349 but never wired certs. Chart scopes v1 to plain TURN.
`/tmp` audit (review fix #6)
Resolved. End-of-call artifacts (recordings, transcript) are uploaded to
object storage directly from the web process
(api/services/workflow_run_artifacts.py) before the ARQ completion job
is enqueued; the job carries only the workflow run id. No file handoff
crosses a pod boundary, so web and arq-worker pods need no shared
volume. The remaining /tmp uses (audio_file_cache.py,knowledge_base_processing.py) write and read within a single process.
Open TODOs (deferred from v1)
- Leader election for singletons. Adopt Kubernetes lease-based
leader election soari-manager/campaign-orchestratorcan run
HA. Until then, replicas remain hard-coded to 1. - Connection-count HPA metric. Expose active WS sessions per pod
(Prometheus or KEDA) and replace CPU/memory HPA target. - NetworkPolicy. Add default-deny + explicit egress to Postgres,
Redis, MinIO/S3, and (for ari-manager) Asterisk. - ServiceMonitor. First-class Prometheus integration once
observability stack is selected. - TURN TLS (turns://). Wire certificate paths through coturn config
and document the cert-manager pattern. - MinIO public route via separate hostname. Make
/voice-audio/
path-prefix the default but allow operators to opt into a dedicated
hostname. - KEDA for ARQ workers. When a queue-depth or active-calls metric
is available, switch ARQ from CPU HPA to KEDA-driven scaling. Keepautoscaling.workers.enabled=falsewhen a KEDA ScaledObject owns the
Deployment so the chart doesn't render a competing HPA.
Validation
cd deploy/helm/dograh
helm lint .
helm template test-release . > /tmp/render-default.yaml
helm template test-release . -f examples/values-single-node.yaml > /tmp/render-single.yaml
helm template test-release . -f examples/values-managed.yaml > /tmp/render-managed.yaml
helm template test-release . -f examples/values-aws.yaml > /tmp/render-aws.yaml
helm template test-release . -f examples/values-k3s-prod.yaml > /tmp/render-k3s.yamlSpot-check expectations:
Deployment/<release>-ari-managerhasreplicas: 1andstrategy.type: Recreate.Deployment/<release>-campaign-orchestratorhasreplicas: 1andstrategy.type: Recreate.Deployment/<release>-webhasterminationGracePeriodSeconds: 1275
and alifecycle.preStopexec hook running./scripts/drain_web.sh.- Liveness probe on ari-manager / campaign-orchestrator uses
exec,
nothttpGet.
Layout
deploy/helm/dograh/
├── Chart.yaml
├── values.yaml # heavily commented
├── values.schema.json # enforces mode enums
├── README.md # this file
├── examples/
│ ├── values-single-node.yaml
│ ├── values-managed.yaml
│ ├── values-aws.yaml
│ └── values-k3s-prod.yaml
└── templates/
├── _helpers.tpl
├── NOTES.txt
├── serviceaccount.yaml
├── configmap.yaml
├── secret.yaml
├── migrate-job.yaml
├── web-deployment.yaml
├── web-service.yaml
├── web-hpa.yaml
├── web-pdb.yaml
├── arq-worker-deployment.yaml
├── arq-worker-hpa.yaml
├── ari-manager-deployment.yaml
├── campaign-orchestrator-deployment.yaml
├── ui-deployment.yaml
├── ui-service.yaml
├── ui-hpa.yaml
├── ui-pdb.yaml
├── coturn-deployment.yaml
├── coturn-service.yaml
├── coturn-configmap.yaml
├── gateway.yaml
├── httproute-api.yaml
├── httproute-ui.yaml
├── httproute-minio.yaml
└── ingress.yamlApi Reference Overview (`docs/api-reference/overview.mdx`)
title: "Overview"
Base URL
All API requests are made to:
https://your-dograh-instance/api/v1If you are using the hosted version, the base URL is https://app.dograh.com/api/v1.
Versioning
The current API version is v1. The version is included in the URL path.
Request format
All request bodies must be sent as JSON with the Content-Type: application/json header.
curl -X POST https://your-dograh-instance/api/v1/workflow/create/definition \
-H "Content-Type: application/json" \
-H "X-API-Key: dg_your_api_key" \
-d '{"name": "My Agent", "workflow_definition": {}}'Response format
All responses are JSON. Successful responses return the relevant resource object. Error responses follow a consistent shape:
{
"detail": "Error message describing what went wrong"
}For validation errors (422), the detail may be a list:
{
"detail": [
{
"loc": ["body", "name"],
"msg": "field required",
"type": "value_error.missing"
}
]
}Health check
Verify your instance is reachable before making API calls.
curl https://your-dograh-instance/api/v1/health{
"status": "ok",
"version": "1.0.0",
"backend_api_endpoint": "https://your-dograh-instance",
"deployment_mode": "oss",
"auth_provider": "local"
}Getting Started Index (`docs/getting-started/index.mdx`)
title: "Introduction"
About Dograh
Dograh is an open-source alternative to platforms like Vapi and Retell - Dograh helps you build voice AI agents with an easy drag-and-drop workflow builder. Unlike proprietary solutions like Vapi, Dograh gives you:
- 100% open source - no vendor lock-in, full transparency
- Self-hostable - deploy anywhere, own your infrastructure
- Complete control - every line of code is open and customizable
- 2-minute setup - from zero to working voice bot in under 2 minutes
Overview
Watch the following video to learn about Dograh’s capabilities.
Setting up
Get the platform up and running using Docker with a small startup script on your local computer. If you are looking to deploy the platform on a server different than your local machine, please check the Deployment section.
ENABLE_TELEMETRY=false before running the startup script.
Then start a new session and ask it to "set up Dograh" (in Claude Code you can also run /dograh-setup). See dograh-hq/dograh-plugins for details.
Please check Prerequisites for the system requirements and Troubleshooting for common issues.
Next Steps
Once the platform is running, build your first agent in Your First Agent in 5 Minutes — no telephony setup required. Or configure an inference provider first if you're bringing your own LLM keys.
Integrations Overview (`docs/integrations/overview.mdx`)
title: "Integrations Overview"
Introduction
Dograh AI provides a flexible integration architecture that allows you to connect with various external services and platforms. Our integration system is designed with modularity and extensibility in mind, making it easy to add new providers while maintaining backward compatibility.
Integration Categories
Telephony Providers
Connect your voice agents with telephony services to make and receive calls.
Future Integration Categories
The integration architecture is designed to support additional categories in the future, such as storage services, analytics platforms, and CRM systems.
Architecture Principles
Our integration system follows these core principles:
- Provider Abstraction: All integrations implement a common interface, making it easy to switch between providers
- Configuration Flexibility: Database-based configuration through the web interface
- Backward Compatibility: New integrations don't break existing implementations
- Secure by Default: All credentials are encrypted and never exposed in logs or UI
Getting Started
- Choose the integration category you need
- Follow the provider-specific setup guide
- Configure credentials through the UI
- Test your integration with the provided verification tools
Best Practices
- Store credentials securely using database configuration
- Test integrations in a development environment before production deployment
- Use the provider abstraction to maintain clean separation between business logic and provider specifics
- Monitor integration health through application logs
Need Help?
- Check provider-specific documentation for detailed setup instructions
- Visit our GitHub Issues for community support
- Join our Slack community for assistance
Integrations Telephony Overview (`docs/integrations/telephony/overview.mdx`)
title: "Telephony Integration"
Overview
Dograh AI's telephony integration system provides a unified interface for connecting with various telephony providers. The same configuration powers both outbound calls (initiated from Dograh) and inbound calls (received on a phone number you own).
Dograh does not sell phone numbers or minutes. The phone service is always
yours — there are two ways to bring it.
Two ways to connect
Supported Providers
Configuration
All telephony providers are configured from a single page in Dograh:
- Navigate to /telephony-configurations and click Add configuration
- Select your provider
- Enter your credentials and save
- Open the new configuration and add at least one phone number
- (Optional) Assign an Inbound workflow to a phone number to enable inbound calling
A single org can hold multiple configurations (for example, separate Twilio sub-accounts) and multiple phone numbers per configuration. Mark one configuration as the default outbound to use it for test calls and campaigns by default.
Common Features
The telephony integration in Dograh AI supports:
- Outbound Calls: Initiate calls to any phone number from a workflow or campaign
- Inbound Calls: Route incoming calls to the right voice agent — see the Inbound Calling guide
- Call Transfer: Transfer an in-progress call to a human or another number (provider-dependent)
- Call Status Tracking: Monitor call lifecycle events (initiated, ringing, answered, completed, failed)
- WebSocket Audio Streaming: Real-time, bidirectional audio between caller and agent
- Webhook Signature Verification: Inbound webhooks are verified against the matched configuration's credentials
Inbound Calling
Inbound calls use a single org-wide webhook URL:
https://api.dograh.com/api/v1/telephony/inbound/runDograh resolves the org from the webhook's account credentials and the agent from the called number's Inbound workflow assignment. See Inbound Calling for the full setup.
Troubleshooting
Next Steps
AGENTS (`docs/AGENTS.md`)
Mintlify documentation
Working relationship
- You can push back on ideas-this can lead to better documentation. Cite sources and explain your reasoning when you do so
- ALWAYS ask for clarification rather than making assumptions
- NEVER lie, guess, or make up information
Project context
- Format: MDX files with YAML frontmatter
- Config: docs.json for navigation, theme, settings
- Components: Mintlify components
Content strategy
- Document just enough for user success - not too much, not too little
- Prioritize accuracy and usability of information
- Make content evergreen when possible
- Search for existing information before adding new content. Avoid duplication unless it is done for a strategic reason
- Check existing patterns for consistency
- Start by making the smallest reasonable changes
Frontmatter requirements for pages
- title: Clear, descriptive page title
- description: Concise summary for SEO/navigation
Writing standards
- Second-person voice ("you")
- Prerequisites at start of procedural content
- Test all code examples before publishing
- Match style and formatting of existing pages
- Include both basic and advanced use cases
- Language tags on all code blocks
- Alt text on all images
- Relative paths for internal links
Git workflow
- NEVER use --no-verify when committing
- Ask how to handle uncommitted changes before starting
- Create a new branch when no clear branch exists for changes
- Commit frequently throughout development
- NEVER skip or disable pre-commit hooks
Do not
- Skip frontmatter on any MDX file
- Use absolute URLs for internal links
- Include untested code examples
- Make assumptions - always ask for clarification
Docs.Json (`docs/docs.json`)
{
"$schema": "https://mintlify.com/docs.json",
"theme": "mint",
"name": "Dograh AI",
"colors": {
"primary": "#16A34A",
"light": "#07C983",
"dark": "#15803D"
},
"favicon": "/favicon.ico",
"navigation": {
"tabs": [
{
"tab": "Guides",
"icon": "book-open",
"groups": [
{
"group": "Getting started",
"pages": [
{
"group": "Introduction",
"pages": [
"getting-started/index",
"getting-started/prerequisites",
"getting-started/troubleshooting"
]
}
]
},
{
"group": "Build your First Agent",
"pages": [
"getting-started/first-agent",
"getting-started/trigger-calls-from-your-backend",
"getting-started/send-call-data-with-webhooks",
"getting-started/connect-telephony",
"getting-started/add-tools-and-knowledge-base"
]
},
{
"group": "Core Concepts",
"pages": [
"core-concepts/how-dograh-works",
"core-concepts/workflows-and-agents",
"core-concepts/calls-and-runs",
"core-concepts/context-and-variables",
"core-concepts/campaigns"
]
},
{
"group": "Configurations",
"pages": [
"configurations/inference-providers",
"configurations/llm",
"configurations/voice",
"configurations/transcriber",
"configurations/api-keys",
"configurations/agent-uuid",
"configurations/interruption",
"configurations/tracing",
"configurations/call-events"
]
},
{
"group": "Voice Agent Builder",
"pages": [
"voice-agent/introduction",
"voice-agent/editing-a-workflow",
"voice-agent/pre-recorded-audio",
"voice-agent/template-variables",
"voice-agent/pre-call-data-fetch",
{
"group": "Tools",
"pages": [
"voice-agent/tools/introduction",
{
"group": "Built-in Tools",
"pages": [
"voice-agent/tools/call-transfer",
"voice-agent/tools/transfer-agent",
"voice-agent/tools/end-call"
]
},
{
"group": "Custom Tools",
"pages": [
"voice-agent/tools/http-api",
"voice-agent/tools/mcp-tool"
]
}
]
},
"voice-agent/knowledge-base",
{
"group": "Nodes",
"pages": [
"voice-agent/start-call",
"voice-agent/end-call",
"voice-agent/agent",
"voice-agent/global",
"voice-agent/qa",
"voice-agent/api-trigger",
"voice-agent/webhook"
]
},
"voice-agent/add-to-website"
]
},
{
"group": "Telephony",
"pages": [
"integrations/telephony/overview",
"integrations/telephony/inbound",
"integrations/telephony/dograh-sip",
"integrations/telephony/twilio",
"integrations/telephony/vonage",
"integrations/telephony/plivo",
"integrations/telephony/telnyx",
"integrations/telephony/cloudonix",
"integrations/telephony/exotel",
"integrations/telephony/vobiz",
"integrations/telephony/whatsapp",
"integrations/telephony/asterisk-ari",
"integrations/telephony/vicidial",
"integrations/telephony/webhooks",
"integrations/telephony/agent-stream",
"integrations/telephony/custom"
]
},
{
"group": "Integrations",
"tag": "NEW",
"pages": [
"integrations/mcp",
"integrations/tuner",
"integrations/paygent",
"integrations/noveum"
]
}
]
},
{
"tab": "Developer",
"icon": "code",
"groups": [
{
"group": "Contribution",
"pages": [
"contribution/setup",
"contribution/reference"
]
},
{
"group": "Guides",
"pages": [
"developer/workflow-schema",
"developer/call-dispositions",
"developer/webhooks",
"developer/environment-variables"
]
},
{
"group": "SDKs",
"tag": "NEW",
"pages": [
"sdks/introduction",
"sdks/build-an-agent",
"sdks/outbound-calls"
]
},
{
"group": "Deployment",
"pages": [
"deployment/introduction",
"deployment/docker",
"deployment/authentication",
"deployment/custom-domain",
"deployment/scaling",
"deployment/update",
"deployment/heroku"
]
}
]
},
{
"tab": "API Reference",
"icon": "square-terminal",
"groups": [
{
"group": "Resources",
"pages": [
{
"group": "API Keys",
"pages": [
"api-reference/api-keys",
"api-reference/api-keys/create",
"api-reference/api-keys/list",
"api-reference/api-keys/archive",
"api-reference/api-keys/reactivate"
]
},
{
"group": "Agents",
"pages": [
"api-reference/agents",
"api-reference/agents/create-from-definition",
"api-reference/agents/create-from-template",
"api-reference/agents/list",
"api-reference/agents/count",
"api-reference/agents/get",
"api-reference/agents/update",
"api-reference/agents/archive",
"api-reference/agents/validate",
{
"group": "Runs",
"pages": [
"api-reference/agents/runs/create",
"api-reference/agents/runs/list",
"api-reference/agents/runs/get"
]
}
]
},
{
"group": "Runs",
"pages": [
"api-reference/runs",
"api-reference/runs/trigger",
"api-reference/runs/trigger-workflow",
"api-reference/runs/get-run",
"api-reference/runs/list-runs",
"api-reference/runs/download",
"api-reference/runs/inbound"
]
},
{
"group": "Campaigns",
"pages": [
"api-reference/campaigns",
"api-reference/campaigns/upload-contacts",
"api-reference/campaigns/create",
"api-reference/campaigns/list",
"api-reference/campaigns/get",
"api-reference/campaigns/update",
"api-reference/campaigns/start",
"api-reference/campaigns/pause",
"api-reference/campaigns/resume",
"api-reference/campaigns/progress",
"api-reference/campaigns/runs"
]
},
{
"group": "Telephony Configurations",
"pages": [
"api-reference/telephony-configs",
"api-reference/telephony-configs/providers",
"api-reference/telephony-configs/list",
"api-reference/telephony-configs/create",
"api-reference/telephony-configs/get",
"api-reference/telephony-configs/update",
"api-reference/telephony-configs/delete",
"api-reference/telephony-configs/set-default-outbound",
{
"group": "Phone Numbers",
"pages": [
"api-reference/telephony-configs/phone-numbers/list",
"api-reference/telephony-configs/phone-numbers/create",
"api-reference/telephony-configs/phone-numbers/get",
"api-reference/telephony-configs/phone-numbers/update",
"api-reference/telephony-configs/phone-numbers/delete",
"api-reference/telephony-configs/phone-numbers/set-default-caller"
]
}
]
}
]
},
{
"group": "Authentication & Errors",
"pages": [
"api-reference/overview",
"api-reference/authentication",
"api-reference/errors"
]
}
]
}
]
},
"logo": {
"light": "/logo/light.svg",
"dark": "/logo/dark.svg",
"href": "https://docs.dograh.com"
},
"navbar": {
"links": [
{
"label": "Support",
"href": "https://github.com/dograh-hq/dograh/issues/new/choose"
}
],
"primary": {
"type": "button",
"label": "Dashboard",
"href": "https://app.dograh.com"
}
},
"banner": {
"content": "🎉 New: MCP Server & SDKs Released — Drive Dograh from Claude, Cursor, or your own Python/TypeScript code. MCP → · SDKs →",
"dismissible": true
},
"search": {
"prompt": "Search for Tools, Webhook, Deployment, etc..."
},
"customCSS": "/custom.css",
"contextual": {
"options": [
"copy",
"view",
"chatgpt",
"claude",
"perplexity",
"mcp",
"cursor",
"vscode"
]
},
"footer": {
"socials": {
"github": "https://github.com/dograh-hq",
"linkedin": "https://linkedin.com/company/dograh"
}
},
"api": {
"openapi": "api-reference/openapi.json"
},
"redirects": [
{
"source": "/contribution/introduction",
"destination": "/contribution/setup"
},
{
"source": "/contribution/devcontainer",
"destination": "/contribution/reference"
},
{
"source": "/contribution/host-managed-setup",
"destination": "/contribution/reference"
},
{
"source": "/contribution/fork-workflow",
"destination": "/contribution/reference"
}
]
}
Api Reference Agents (`docs/api-reference/agents.mdx`)
title: "Overview"
In Dograh, a voice agent is called a workflow in the API. A workflow defines the conversation flow, LLM configuration, voice settings, and tools available to your agent.
| Method | Endpoint | Quick Link |
|---|---|---|
POST |
/workflow/create/definition |
Create from definition |
POST |
/workflow/create/template |
Create from template |
GET |
/workflow/fetch |
List agents |
GET |
/workflow/count |
Get agent count |
GET |
/workflow/fetch/{workflow_id} |
Get an agent |
PUT |
/workflow/{workflow_id} |
Update an agent |
PUT |
/workflow/{workflow_id}/status |
Archive an agent |
POST |
/workflow/{workflow_id}/validate |
Validate a workflow |
POST |
/workflow/{workflow_id}/runs |
Create test run |
GET |
/workflow/{workflow_id}/runs |
List runs |
GET |
/workflow/{workflow_id}/runs/{run_id} |
Get a run |
Api Reference Api Keys (`docs/api-reference/api-keys.mdx`)
title: "Overview"
API keys authenticate requests from your applications and services. Each key is scoped to your organization — all API calls made with a key create and access resources within that organization.
| Method | Endpoint | Quick Link |
|---|---|---|
POST |
/user/api-keys |
Create an API key |
GET |
/user/api-keys |
List API keys |
DELETE |
/user/api-keys/{api_key_id} |
Archive an API key |
PUT |
/user/api-keys/{api_key_id}/reactivate |
Reactivate an API key |
Best practices
- Use one key per environment — separate keys for development, staging, and production make rotation easy and limit blast radius if a key is compromised.
- Use one key per service — this allows you to revoke a single service's access without affecting others.
- Rotate keys regularly — create a new key, update your secret store, then archive the old key.
- Never hardcode keys — use environment variables or a secrets manager. Never commit keys to version control.
- Monitor
last_used_at— keys with no recent activity may be safe to archive.
Api Reference Authentication (`docs/api-reference/authentication.mdx`)
title: "Authentication"
API key authentication
API keys are the recommended way to authenticate programmatic requests. Pass your key in the X-API-Key request header.
curl https://your-dograh-instance/api/v1/workflow/fetch \
-H "X-API-Key: dg_your_api_key"API keys are scoped to an organization. All resources created or accessed using a key belong to that organization.
Create an API key
Create keys in the dashboard under Settings → API Keys. The full key is shown only once at creation time — store it immediately in a secrets manager or environment variable.
Manage API keys
| Action | Method | Path |
|---|---|---|
| List keys | GET |
/user/api-keys |
| Create key | POST |
/user/api-keys |
| Archive key | DELETE |
/user/api-keys/{api_key_id} |
| Reactivate key | PUT |
/user/api-keys/{api_key_id}/reactivate |
Archiving a key immediately revokes it. All subsequent requests using that key return 401.
Error responses
| Status | Cause |
|---|---|
401 Unauthorized |
Missing, invalid, or expired credentials |
403 Forbidden |
Valid credentials but insufficient permissions for the resource |
{
"detail": "Invalid or expired API key"
}Api Reference Campaigns (`docs/api-reference/campaigns.mdx`)
title: "Overview"
A campaign runs a workflow against a list of contacts. You upload a CSV of phone numbers, configure retry logic and scheduling, then start the campaign. Dograh dials contacts automatically up to your configured concurrency limit.
| Method | Endpoint | Quick Link |
|---|---|---|
POST |
/s3/presigned-upload-url |
Upload contacts CSV |
POST |
/campaign/create |
Create a campaign |
GET |
/campaign/ |
List campaigns |
GET |
/campaign/{campaign_id} |
Get a campaign |
PATCH |
/campaign/{campaign_id} |
Update a campaign |
POST |
/campaign/{campaign_id}/start |
Start |
POST |
/campaign/{campaign_id}/pause |
Pause |
POST |
/campaign/{campaign_id}/resume |
Resume |
GET |
/campaign/{campaign_id}/progress |
Get campaign progress |
GET |
/campaign/{campaign_id}/runs |
Get campaign call runs |
Campaign status values
| Status | Description |
|---|---|
draft |
Created but not started |
running |
Actively dialing contacts |
paused |
Temporarily stopped; can be resumed |
completed |
All contacts processed |
failed |
Campaign encountered a fatal error |
Api Reference Errors (`docs/api-reference/errors.mdx`)
title: "Errors"
Error format
All errors return a JSON body with a detail field:
{
"detail": "Human-readable error message"
}For request validation failures (status 422), detail is an array of field-level errors:
{
"detail": [
{
"loc": ["body", "phone_number"],
"msg": "field required",
"type": "value_error.missing"
}
]
}HTTP status codes
| Status | Meaning | Common causes |
|---|---|---|
400 |
Bad Request | Missing required fields, invalid parameter values, unsupported operation |
401 |
Unauthorized | Missing auth header, invalid or expired API key or JWT token |
403 |
Forbidden | Valid credentials but the resource belongs to a different organization |
404 |
Not Found | Resource ID does not exist or is not accessible to your organization |
409 |
Conflict | Duplicate resource (e.g., email already registered) |
422 |
Unprocessable Entity | Request body or query parameter failed schema validation |
500 |
Internal Server Error | Unexpected server-side failure |
501 |
Not Implemented | Feature not supported in the current deployment |
Workflow validation errors
When validating a workflow (or creating one with invalid nodes), the API returns structured errors that reference specific nodes, edges, or fields:
{
"errors": [
{
"kind": "node",
"id": "agent-1",
"field": "data.prompt",
"message": "Prompt cannot be empty"
},
{
"kind": "edge",
"id": "edge-3",
"field": null,
"message": "Edge target node does not exist"
},
{
"kind": "workflow",
"id": null,
"field": null,
"message": "Workflow must have exactly one Start Call node"
}
]
}| Field | Type | Description |
|---|---|---|
kind |
"node" | "edge" | "workflow" |
What the error applies to |
id |
string or null | Node or edge ID from the workflow definition |
field |
string or null | Dot-notation path to the specific field (e.g. data.prompt) |
message |
string | Human-readable description of the problem |
Telephony errors
Telephony operations may fail with one of these named error types returned in the detail field:
| Error | Description |
|---|---|
PROVIDER_MISMATCH |
The request was routed to the wrong telephony provider |
WORKFLOW_NOT_FOUND |
The workflow ID in the inbound URL does not exist |
ACCOUNT_VALIDATION_FAILED |
Your telephony provider credentials are invalid |
PHONE_NUMBER_NOT_CONFIGURED |
The phone number is not set up in your telephony account |
SIGNATURE_VALIDATION_FAILED |
Webhook signature verification failed (possible spoofed request) |
QUOTA_EXCEEDED |
Your organization has exceeded its usage quota |
GENERAL_AUTH_FAILED |
Generic authentication failure with the telephony provider |
Tips for handling errors
- Retry on
500with exponential backoff — transient server errors can resolve on retry. - Do not retry
4xx— these indicate problems with your request that will not self-resolve. - Check
detailcarefully on422— thelocarray pinpoints exactly which field failed validation. - Store API keys securely — a
401on a previously working key likely means the key was archived.
Api Reference Openapi.Json (`docs/api-reference/openapi.json`)
{"openapi":"3.1.0","info":{"title":"Dograh API","description":"API for the Dograh app","version":"1.0.0"},"servers":[{"url":"https://app.dograh.com","description":"Production"},{"url":"http://localhost:8000","description":"Local development"}],"paths":{"/api/v1/telephony/initiate-call":{"post":{"tags":["main"],"summary":"Initiate Call","description":"Initiate a call using the configured telephony provider from web browser. This is\nsupposed to be a test call method for the draft version of the agent.","operationId":"initiate_call_api_v1_telephony_initiate_call_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitiateCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"test_phone_call","x-sdk-description":"Place a test call from a workflow to a phone number."}},"/api/v1/telephony/inbound/run":{"get":{"tags":["main"],"summary":"Handle Inbound Run","description":"Workflow-agnostic inbound dispatcher.\n\nAll providers can point a single webhook at this endpoint instead of one\nURL per workflow. The dispatcher resolves the org from the webhook's\naccount_id and the workflow from the called number's\ninbound_workflow_id. This is what configure_inbound writes into\neach provider's resource so per-workflow webhook bookkeeping disappears.\n\nProvider-specific signature/timestamp headers are not enumerated here \u2014\neach provider's verify_inbound_signature reads its own headers from\nthe dict, so adding a new provider doesn't require changes to this route.","operationId":"handle_inbound_run_api_v1_telephony_inbound_run_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}},"post":{"tags":["main"],"summary":"Handle Inbound Run","description":"Workflow-agnostic inbound dispatcher.\n\nAll providers can point a single webhook at this endpoint instead of one\nURL per workflow. The dispatcher resolves the org from the webhook's\naccount_id and the workflow from the called number's\ninbound_workflow_id. This is what configure_inbound writes into\neach provider's resource so per-workflow webhook bookkeeping disappears.\n\nProvider-specific signature/timestamp headers are not enumerated here \u2014\neach provider's verify_inbound_signature reads its own headers from\nthe dict, so adding a new provider doesn't require changes to this route.","operationId":"handle_inbound_run_api_v1_telephony_inbound_run_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v1/telephony/inbound/fallback":{"post":{"tags":["main"],"summary":"Handle Inbound Fallback","description":"Fallback endpoint that returns audio message when calls cannot be processed.","operationId":"handle_inbound_fallback_api_v1_telephony_inbound_fallback_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v1/telephony/inbound/{workflow_id}":{"post":{"tags":["main"],"summary":"Handle Inbound Telephony","description":"[LEGACY] Per-workflow inbound webhook.\n\nSuperseded by POST /inbound/run, which resolves the workflow from\nthe called number's inbound_workflow_id and lets a single webhook\nURL serve every workflow in the org. New integrations should point\ntheir provider at /inbound/run; this route is kept only for\nexisting provider configurations that still encode workflow_id\nin the URL.","operationId":"handle_inbound_telephony_api_v1_telephony_inbound__workflow_id__post","deprecated":true,"parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/transfer-result/{transfer_id}":{"post":{"tags":["main"],"summary":"Complete Transfer Function Call","description":"Webhook endpoint to complete the function call with transfer result.\n\nCalled by Twilio's StatusCallback when the transfer call status changes.","operationId":"complete_transfer_function_call_api_v1_telephony_transfer_result__transfer_id__post","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"string","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/cloudonix/transfer-result/{transfer_id}":{"post":{"tags":["main"],"summary":"Handle Cloudonix Transfer Result","description":"Drive transfer completion from the destination leg's session status.\n\nCloudonixProvider.transfer_call sets this URL as the outbound call\nobject's callback. Cloudonix POSTs session-status notifications here;\na connected status means the destination answered (publish\nDESTINATION_ANSWERED so the shared handler forks the caller into the\nconference), while terminal non-answer statuses publish TRANSFER_FAILED.\nIntermediate statuses (ringing/processing) are acked without publishing.","operationId":"handle_cloudonix_transfer_result_api_v1_telephony_cloudonix_transfer_result__transfer_id__post","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"string","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/cloudonix/status-callback/{workflow_run_id}":{"post":{"tags":["main"],"summary":"Handle Cloudonix Status Callback","description":"Handle Cloudonix-specific status callbacks.\n\nCloudonix sends call status updates to the callback URL specified during call initiation.","operationId":"handle_cloudonix_status_callback_api_v1_telephony_cloudonix_status_callback__workflow_run_id__post","parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/cloudonix/cdr":{"post":{"tags":["main"],"summary":"Handle Cloudonix Cdr","description":"Handle Cloudonix CDR (Call Detail Record) webhooks.\n\nCloudonix sends CDR records when calls complete. The CDR contains:\n- domain: Used to identify the organization\n- call_id: Used to find the workflow run\n- disposition: Call termination status (ANSWER, BUSY, CANCEL, FAILED, CONGESTION, NOANSWER)\n- duration/billsec: Call duration information","operationId":"handle_cloudonix_cdr_api_v1_telephony_cloudonix_cdr_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v1/telephony/exotel/status-callback/{workflow_run_id}":{"post":{"tags":["main"],"summary":"Handle Exotel Status Callback","operationId":"handle_exotel_status_callback_api_v1_telephony_exotel_status_callback__workflow_run_id__post","parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/plivo/hangup-callback/{workflow_run_id}":{"post":{"tags":["main"],"summary":"Handle Plivo Hangup Callback","description":"Handle Plivo hangup callbacks.","operationId":"handle_plivo_hangup_callback_api_v1_telephony_plivo_hangup_callback__workflow_run_id__post","parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/plivo/ring-callback/{workflow_run_id}":{"post":{"tags":["main"],"summary":"Handle Plivo Ring Callback","description":"Handle Plivo ring callbacks.","operationId":"handle_plivo_ring_callback_api_v1_telephony_plivo_ring_callback__workflow_run_id__post","parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/telnyx/events/{workflow_run_id}":{"post":{"tags":["main"],"summary":"Handle Telnyx Events","description":"Handle Telnyx Call Control webhook events.\n\nTelnyx sends all call lifecycle events (call.initiated, call.answered,\ncall.hangup, streaming.started, streaming.stopped) as JSON POST requests.\n\nInvalid-signature requests are answered with the same 404 "Workflow run\nnot found" as unknown run ids, deliberately: run ids are sequential\nintegers, so a distinct 401 on existing runs would let unsigned callers\nenumerate which runs exist. The trade-off is that a misconfigured\nwebhook_public_key presents as a 404 to the caller; the\nlogger.warning below carries the real reason for operators.\n\nWhen TELEPHONY_WS_TOKEN_SECRET is configured, the events webhook URL\nminted by the provider carries an HMAC capability token in its query\nstring (Telnyx preserves query strings on webhook POSTs, unlike media\nstream URLs, verified live). The token is verified before any database\nlookup, so the reject path does constant work and the run-existence\ndistinction is closed for both status code and timing. With no secret\nconfigured, the flow falls back to the lookup-then-verify order above.","operationId":"handle_telnyx_events_api_v1_telephony_telnyx_events__workflow_run_id__post","parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/telnyx/transfer-result/{transfer_id}":{"post":{"tags":["main"],"summary":"Handle Telnyx Transfer Result","description":"Handle Telnyx Call Control events for the transfer destination leg.\n\nThe destination leg is dialed by :meth:TelnyxProvider.transfer_call with\nthis URL as webhook_url. Telnyx sends every event for that leg here.\nOutcomes:\n\n- call.answered: seed a conference with the destination's live\n call_control_id, stamp conference_id onto the TransferContext,\n and publish DESTINATION_ANSWERED so transfer_call_handler can\n end the pipeline. TelnyxConferenceStrategy then joins the caller\n into this conference at pipeline teardown.\n- call.hangup pre-answer (no conference_id on the context):\n publish TRANSFER_FAILED so the LLM can recover.\n- call.hangup post-answer (conference_id set): the destination\n left a bridged conference; hang up the caller's leg to tear down the\n empty bridge (Telnyx's create_conference doesn't accept\n end_conference_on_exit on the seed leg).\n\nEvent references:\n - call.answered: https://developers.telnyx.com/api-reference/callbacks/call-answered\n - call.hangup: https://developers.telnyx.com/api-reference/callbacks/call-hangup","operationId":"handle_telnyx_transfer_result_api_v1_telephony_telnyx_transfer_result__transfer_id__post","parameters":[{"name":"transfer_id","in":"path","required":true,"schema":{"type":"string","title":"Transfer Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/twilio/status-callback/{workflow_run_id}":{"post":{"tags":["main"],"summary":"Handle Twilio Status Callback","description":"Handle Twilio-specific status callbacks.","operationId":"handle_twilio_status_callback_api_v1_telephony_twilio_status_callback__workflow_run_id__post","parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/vobiz/hangup-callback/{workflow_run_id}":{"post":{"tags":["main"],"summary":"Handle Vobiz Hangup Callback","description":"Handle Vobiz hangup callback (sent when call ends).\n\nVobiz sends callbacks to hangup_url when the call terminates.\nThis includes call duration, status, and billing information.","operationId":"handle_vobiz_hangup_callback_api_v1_telephony_vobiz_hangup_callback__workflow_run_id__post","parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/vobiz/ring-callback/{workflow_run_id}":{"post":{"tags":["main"],"summary":"Handle Vobiz Ring Callback","description":"Handle Vobiz ring callback (sent when call starts ringing).\n\nVobiz can send callbacks to ring_url when the call starts ringing.\nThis is optional and used for tracking ringing status.","operationId":"handle_vobiz_ring_callback_api_v1_telephony_vobiz_ring_callback__workflow_run_id__post","parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/vobiz/hangup-callback/workflow/{workflow_id}":{"post":{"tags":["main"],"summary":"Handle Vobiz Hangup Callback By Workflow","description":"Handle Vobiz hangup callback with workflow_id - finds workflow run by call_id.","operationId":"handle_vobiz_hangup_callback_by_workflow_api_v1_telephony_vobiz_hangup_callback_workflow__workflow_id__post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/vonage/events/{workflow_run_id}":{"post":{"tags":["main"],"summary":"Handle Vonage Events","description":"Handle Vonage-specific event webhooks.\n\nVonage sends all call events to a single endpoint.\nEvents include: started, ringing, answered, complete, failed, etc.","operationId":"handle_vonage_events_api_v1_telephony_vonage_events__workflow_run_id__post","parameters":[{"name":"workflow_run_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Run Id"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/telephony/vonage/events":{"post":{"tags":["main"],"summary":"Handle Vonage Events Without Run","description":"Handle application-level events by resolving the run from call UUID.","operationId":"handle_vonage_events_without_run_api_v1_telephony_vonage_events_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v1/telephony/whatsapp/webhook":{"get":{"tags":["main"],"summary":"Handle Webhook Verification","description":"Handle Meta's webhook verification handshake (hub.challenge).\n\nEvery organization's configuration points Meta at this one URL, so the\ntoken is what identifies which configuration is being verified.","operationId":"handle_webhook_verification_api_v1_telephony_whatsapp_webhook_get","parameters":[{"name":"hub.mode","in":"query","required":true,"schema":{"type":"string","title":"Hub.Mode"}},{"name":"hub.verify_token","in":"query","required":true,"schema":{"type":"string","title":"Hub.Verify Token"}},{"name":"hub.challenge","in":"query","required":true,"schema":{"type":"string","title":"Hub.Challenge"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["main"],"summary":"Handle Whatsapp Webhook","description":"Handle incoming WhatsApp Cloud API webhooks (including calling events).","operationId":"handle_whatsapp_webhook_api_v1_telephony_whatsapp_webhook_post","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v1/superuser/impersonate":{"post":{"tags":["main","superuser"],"summary":"Impersonate","description":"Impersonate a user as a super-admin.\nInternally, Stack Auth requires the provider user ID (a UUID-ish string)\nto create an impersonation session.","operationId":"impersonate_api_v1_superuser_impersonate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ImpersonateResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/superuser/workflow-runs":{"get":{"tags":["main","superuser"],"summary":"Get Workflow Runs","description":"Get paginated list of all workflow runs with organization information.\nRequires superuser privileges.\n\nFilters should be provided as a JSON-encoded array of filter criteria.\nExample: [{"field": "id", "type": "number", "value": {"value": 680}}]","operationId":"get_workflow_runs_api_v1_superuser_workflow_runs_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (starts from 1)","default":1,"title":"Page"},"description":"Page number (starts from 1)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items per page","default":50,"title":"Limit"},"description":"Number of items per page"},{"name":"filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON-encoded filter criteria","title":"Filters"},"description":"JSON-encoded filter criteria"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by (e.g., 'duration', 'created_at')","title":"Sort By"},"description":"Field to sort by (e.g., 'duration', 'created_at')"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order ('asc' or 'desc')","default":"desc","title":"Sort Order"},"description":"Sort order ('asc' or 'desc')"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/SuperuserWorkflowRunsListResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/validate":{"post":{"tags":["main"],"summary":"Validate Workflow","description":"Validate all nodes in a workflow to ensure they have required fields.\n\nArgs:\n workflow_id: The ID of the workflow to validate\n user: The authenticated user\n\nReturns:\n Object indicating if workflow is valid and any invalid nodes/edges","operationId":"validate_workflow_api_v1_workflow__workflow_id__validate_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ValidateWorkflowResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/create/definition":{"post":{"tags":["main"],"summary":"Create Workflow","description":"Create a new workflow from the client\n\nArgs:\n request: The create workflow request\n user: The user to create the workflow for","operationId":"create_workflow_api_v1_workflow_create_definition_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"create_workflow","x-sdk-description":"Create a new workflow from a workflow definition."}},"/api/v1/workflow/create/template":{"post":{"tags":["main"],"summary":"Create Workflow From Template","description":"Create a new workflow from a natural language template request.\n\nThis endpoint:\n1. Uses mps_service_key_client to call MPS workflow API\n2. Passes organization ID (authenticated mode) or created_by (OSS mode)\n3. Creates the workflow in the database\n\nArgs:\n request: The template creation request with call_type, use_case, and activity_description\n user: The authenticated user\n\nReturns:\n The created workflow\n\nRaises:\n HTTPException: If MPS API call fails","operationId":"create_workflow_from_template_api_v1_workflow_create_template_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowTemplateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/count":{"get":{"tags":["main"],"summary":"Get Workflow Count","description":"Get workflow counts for the authenticated user's organization.\n\nThis is a lightweight endpoint for checking if the user has workflows,\nuseful for redirect logic without fetching full workflow data.","operationId":"get_workflow_count_api_v1_workflow_count_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowCountResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/fetch":{"get":{"tags":["main"],"summary":"Get Workflows","description":"Get all workflows for the authenticated user's organization.\n\nReturns a lightweight response with only essential fields for listing.\nUse GET /workflow/fetch/{workflow_id} to get full workflow details.","operationId":"get_workflows_api_v1_workflow_fetch_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status - can be single value (active/archived) or comma-separated (active,archived)","title":"Status"},"description":"Filter by status - can be single value (active/archived) or comma-separated (active,archived)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowListResponse"},"title":"Response Get Workflows Api V1 Workflow Fetch Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"list_workflows","x-sdk-description":"List all workflows in the authenticated organization."}},"/api/v1/workflow/fetch/{workflow_id}":{"get":{"tags":["main"],"summary":"Get Workflow","description":"Get a single workflow by ID.\n\nIf a draft version exists, returns the draft content for editing.\nOtherwise returns the published version's content.","operationId":"get_workflow_api_v1_workflow_fetch__workflow_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"get_workflow","x-sdk-description":"Get a single workflow by ID (returns draft if one exists, else published)."}},"/api/v1/workflow/{workflow_id}/version-summaries":{"get":{"tags":["main"],"summary":"Get Workflow Version Summaries","operationId":"get_workflow_version_summaries_api_v1_workflow__workflow_id__version_summaries_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowVersionSummaryResponse"},"title":"Response Get Workflow Version Summaries Api V1 Workflow Workflow Id Version Summaries Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/versions":{"get":{"tags":["main"],"summary":"Get Workflow Versions","description":"List versions for a workflow, newest first.\n\nPass limit/offset to page through long histories. With no limit,\nreturns every version (legacy behavior). Filter by version_number to\nopen an exact version, or by status=published for the latest release.","operationId":"get_workflow_versions_api_v1_workflow__workflow_id__versions_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"limit","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","maximum":100,"minimum":1},{"type":"null"}],"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"version_number","in":"query","required":false,"schema":{"anyOf":[{"type":"integer","minimum":1},{"type":"null"}],"title":"Version Number"}},{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"enum":["draft","published","archived"],"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowVersionResponse"},"title":"Response Get Workflow Versions Api V1 Workflow Workflow Id Versions Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/versions/{definition_id}/metadata":{"patch":{"tags":["main"],"summary":"Update Workflow Version Metadata","description":"Edit release notes on a published or archived version without republishing.","operationId":"update_workflow_version_metadata_api_v1_workflow__workflow_id__versions__definition_id__metadata_patch","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"definition_id","in":"path","required":true,"schema":{"type":"integer","title":"Definition Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowVersionMetadataRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionMetadataResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/publish":{"post":{"tags":["main"],"summary":"Publish Workflow","description":"Publish the current draft version of a workflow.\n\nDrafts are allowed to be incomplete (so the editor can save mid-edit),\nbut a published version is what runtime executes \u2014 so this is the gate\nwhere the full DTO + graph + trigger-conflict checks must pass.","operationId":"publish_workflow_api_v1_workflow__workflow_id__publish_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/PublishWorkflowRequest"},{"type":"null"}],"title":"Request"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/create-draft":{"post":{"tags":["main"],"summary":"Create Workflow Draft","description":"Create a draft version from the current published version.\n\nIf a draft already exists, returns the existing draft.","operationId":"create_workflow_draft_api_v1_workflow__workflow_id__create_draft_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowVersionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/summary":{"get":{"tags":["main"],"summary":"Get Workflows Summary","description":"Get minimal workflow information (id and name only) for all workflows","operationId":"get_workflows_summary_api_v1_workflow_summary_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by status (e.g. 'active' or 'archived'). Omit to return all.","title":"Status"},"description":"Filter by status (e.g. 'active' or 'archived'). Omit to return all."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowSummaryResponse"},"title":"Response Get Workflows Summary Api V1 Workflow Summary Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/status":{"put":{"tags":["main"],"summary":"Update Workflow Status","description":"Update the status of a workflow (e.g., archive/unarchive).\n\nArgs:\n workflow_id: The ID of the workflow to update\n request: The status update request\n\nReturns:\n The updated workflow","operationId":"update_workflow_status_api_v1_workflow__workflow_id__status_put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowStatusRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/folder":{"put":{"tags":["main"],"summary":"Move Workflow To Folder","description":"Move a workflow into a folder, or to "Uncategorized" (folder_id=null).\n\nValidates that the target folder belongs to the caller's organization \u2014\nthe FK alone proves the folder exists, not that the caller may use it.","operationId":"move_workflow_to_folder_api_v1_workflow__workflow_id__folder_put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/MoveWorkflowToFolderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowListResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}":{"put":{"tags":["main"],"summary":"Update Workflow","description":"Update an existing workflow.\n\nArgs:\n workflow_id: The ID of the workflow to update\n request: The update request containing the new name and workflow definition\n\nReturns:\n The updated workflow\n\nRaises:\n HTTPException: If the workflow is not found or if there's a database error","operationId":"update_workflow_api_v1_workflow__workflow_id__put","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateWorkflowRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"update_workflow","x-sdk-description":"Update a workflow's name and/or definition. Saves as a new draft."}},"/api/v1/workflow/{workflow_id}/duplicate":{"post":{"tags":["main"],"summary":"Duplicate Workflow Endpoint","description":"Duplicate a workflow including its definition, configuration, recordings, and triggers.","operationId":"duplicate_workflow_endpoint_api_v1_workflow__workflow_id__duplicate_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/runs":{"post":{"tags":["main"],"summary":"Create Workflow Run","description":"Create a new workflow run when the user decides to execute the workflow via chat or voice\n\nArgs:\n workflow_id: The ID of the workflow to run\n request: The create workflow run request\n user: The user to create the workflow run for","operationId":"create_workflow_run_api_v1_workflow__workflow_id__runs_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowRunRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateWorkflowRunResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["main"],"summary":"Get Workflow Runs","description":"Get workflow runs with optional filtering and sorting.\n\nFilters should be provided as a JSON-encoded array of filter criteria.\nExample: [{"attribute": "dateRange", "value": {"from": "2024-01-01", "to": "2024-01-31"}}]","operationId":"get_workflow_runs_api_v1_workflow__workflow_id__runs_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (starts from 1)","default":1,"title":"Page"},"description":"Page number (starts from 1)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items per page","default":50,"title":"Limit"},"description":"Number of items per page"},{"name":"filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON-encoded filter criteria","title":"Filters"},"description":"JSON-encoded filter criteria"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by (e.g., 'duration', 'created_at')","title":"Sort By"},"description":"Field to sort by (e.g., 'duration', 'created_at')"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order ('asc' or 'desc')","default":"desc","title":"Sort Order"},"description":"Sort order ('asc' or 'desc')"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/runs/{run_id}":{"get":{"tags":["main"],"summary":"Get Workflow Run","operationId":"get_workflow_run_api_v1_workflow__workflow_id__runs__run_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/report":{"get":{"tags":["main"],"summary":"Download Workflow Report","description":"Download a CSV report of completed runs for a workflow.","operationId":"download_workflow_report_api_v1_workflow__workflow_id__report_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter runs created on or after this datetime (ISO 8601)","title":"Start Date"},"description":"Filter runs created on or after this datetime (ISO 8601)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter runs created on or before this datetime (ISO 8601)","title":"End Date"},"description":"Filter runs created on or before this datetime (ISO 8601)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/templates":{"get":{"tags":["main"],"summary":"Get Workflow Templates","description":"Get all available workflow templates.\n\nReturns:\n List of workflow templates","operationId":"get_workflow_templates_api_v1_workflow_templates_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"items":{"$ref":"#/components/schemas/WorkflowTemplateResponse"},"type":"array","title":"Response Get Workflow Templates Api V1 Workflow Templates Get"}}}},"404":{"description":"Not found"}}}},"/api/v1/workflow/templates/duplicate":{"post":{"tags":["main"],"summary":"Duplicate Workflow Template","description":"Duplicate a workflow template to create a new workflow for the user.\n\nArgs:\n request: The duplicate template request\n user: The authenticated user\n\nReturns:\n The newly created workflow","operationId":"duplicate_workflow_template_api_v1_workflow_templates_duplicate_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DuplicateTemplateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/ambient-noise/upload-url":{"post":{"tags":["main"],"summary":"Get a presigned URL to upload a custom ambient noise audio file","description":"Generate a presigned PUT URL for uploading a custom ambient noise file.","operationId":"get_ambient_noise_upload_url_api_v1_workflow_ambient_noise_upload_url_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmbientNoiseUploadRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AmbientNoiseUploadResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/text-chat/sessions":{"post":{"tags":["main","workflow-text-chat"],"summary":"Create Text Chat Session","operationId":"create_text_chat_session_api_v1_workflow__workflow_id__text_chat_sessions_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTextChatSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunTextSessionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/text-chat/sessions/{run_id}":{"get":{"tags":["main","workflow-text-chat"],"summary":"Get Text Chat Session","operationId":"get_text_chat_session_api_v1_workflow__workflow_id__text_chat_sessions__run_id__get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunTextSessionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/text-chat/sessions/recovery/{request_id}":{"get":{"tags":["main","workflow-text-chat"],"summary":"Recover Text Chat Session","description":"Find a creation whose response was lost; null means it is not visible yet.","operationId":"recoverTextChatSession","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"request_id","in":"path","required":true,"schema":{"type":"string","format":"uuid","title":"Request Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/WorkflowRunTextSessionResponse"},{"type":"null"}],"title":"Response Recovertextchatsession"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/text-chat/sessions/{run_id}/messages":{"post":{"tags":["main","workflow-text-chat"],"summary":"Append Text Chat Message","operationId":"append_text_chat_message_api_v1_workflow__workflow_id__text_chat_sessions__run_id__messages_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendTextChatMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunTextSessionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/text-chat/sessions/{run_id}/end":{"post":{"tags":["main","workflow-text-chat"],"summary":"End Text Chat Session","operationId":"end_text_chat_session_api_v1_workflow__workflow_id__text_chat_sessions__run_id__end_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EndTextChatSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunTextSessionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/text-chat/sessions/{run_id}/rewind":{"post":{"tags":["main","workflow-text-chat"],"summary":"Rewind Text Chat Session","operationId":"rewind_text_chat_session_api_v1_workflow__workflow_id__text_chat_sessions__run_id__rewind_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RewindTextChatSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/WorkflowRunTextSessionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/text-chat/sessions/stream":{"post":{"tags":["main","workflow-text-chat"],"summary":"Stream Text Chat Session","operationId":"streamTextChatSession","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateTextChatSessionRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/event-stream":{"schema":{"type":"string","oneOf":[{"$ref":"#/components/schemas/TextChatSessionStreamEvent"},{"$ref":"#/components/schemas/TextChatTurnStreamEvent"},{"$ref":"#/components/schemas/TextChatStreamError"}],"discriminator":{"propertyName":"type","mapping":{"session":"#/components/schemas/TextChatSessionStreamEvent","complete":"#/components/schemas/TextChatSessionStreamEvent","turn_event":"#/components/schemas/TextChatTurnStreamEvent","error":"#/components/schemas/TextChatStreamError"}},"title":"Response 200 Streamtextchatsession"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/text-chat/sessions/{run_id}/messages/stream":{"post":{"tags":["main","workflow-text-chat"],"summary":"Stream Text Chat Message","operationId":"streamTextChatMessage","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"run_id","in":"path","required":true,"schema":{"type":"integer","title":"Run Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/AppendTextChatMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/event-stream":{"schema":{"type":"string","oneOf":[{"$ref":"#/components/schemas/TextChatSessionStreamEvent"},{"$ref":"#/components/schemas/TextChatTurnStreamEvent"},{"$ref":"#/components/schemas/TextChatStreamError"}],"discriminator":{"propertyName":"type","mapping":{"session":"#/components/schemas/TextChatSessionStreamEvent","complete":"#/components/schemas/TextChatSessionStreamEvent","turn_event":"#/components/schemas/TextChatTurnStreamEvent","error":"#/components/schemas/TextChatStreamError"}},"title":"Response 200 Streamtextchatmessage"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/configurations/defaults":{"get":{"tags":["main"],"summary":"Get Default Configurations","operationId":"get_default_configurations_api_v1_user_configurations_defaults_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultConfigurationsResponse"}}}},"404":{"description":"Not found"}}}},"/api/v1/user/auth/user":{"get":{"tags":["main"],"summary":"Get Auth User","operationId":"get_auth_user_api_v1_user_auth_user_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthUserResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/configurations/user":{"get":{"tags":["main"],"summary":"Get User Configurations","operationId":"get_user_configurations_api_v1_user_configurations_user_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConfigurationRequestResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["main"],"summary":"Update User Configurations","operationId":"update_user_configurations_api_v1_user_configurations_user_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConfigurationRequestResponseSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserConfigurationRequestResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/onboarding-state":{"get":{"tags":["main"],"summary":"Get User Onboarding State","operationId":"get_user_onboarding_state_api_v1_user_onboarding_state_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingState"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["main"],"summary":"Update User Onboarding State","operationId":"update_user_onboarding_state_api_v1_user_onboarding_state_put","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingStateUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OnboardingState"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/configurations/user/validate":{"get":{"tags":["main"],"summary":"Validate User Configurations","description":"Check the organization's default model credentials with their providers.","operationId":"validate_user_configurations_api_v1_user_configurations_user_validate_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/APIKeyStatusResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/api-keys":{"get":{"tags":["main"],"summary":"Get Api Keys","description":"Get all API keys for the user's selected organization.","operationId":"get_api_keys_api_v1_user_api_keys_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/APIKeyResponse"},"title":"Response Get Api Keys Api V1 User Api Keys Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["main"],"summary":"Create Api Key","description":"Create a new API key for the user's selected organization.","operationId":"create_api_key_api_v1_user_api_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateAPIKeyResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/api-keys/{api_key_id}":{"delete":{"tags":["main"],"summary":"Archive Api Key","description":"Archive an API key (soft delete).","operationId":"archive_api_key_api_v1_user_api_keys__api_key_id__delete","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"integer","title":"Api Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Archive Api Key Api V1 User Api Keys Api Key Id Delete"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/api-keys/{api_key_id}/reactivate":{"put":{"tags":["main"],"summary":"Reactivate Api Key","description":"Reactivate an archived API key.","operationId":"reactivate_api_key_api_v1_user_api_keys__api_key_id__reactivate_put","parameters":[{"name":"api_key_id","in":"path","required":true,"schema":{"type":"integer","title":"Api Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Reactivate Api Key Api V1 User Api Keys Api Key Id Reactivate Put"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/configurations/voices/{provider}":{"get":{"tags":["main"],"summary":"Get Voices","description":"Get voices from Dograh's managed catalog or a saved provider connection.\n\nExternal providers require provider_connection_uuid for an active connection\nin the selected organization. Model and language filtering depends on the\nprovider's catalog capabilities.","operationId":"get_voices_api_v1_user_configurations_voices__provider__get","parameters":[{"name":"provider","in":"path","required":true,"schema":{"enum":["elevenlabs","deepgram","sarvam","cartesia","dograh","rime"],"type":"string","title":"Provider"}},{"name":"model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Model"}},{"name":"language","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"}},{"name":"q","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Q"}},{"name":"gender","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"}},{"name":"accent","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent"}},{"name":"provider_connection_uuid","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Connection Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/VoicesResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}/traffic-stats":{"get":{"tags":["main"],"summary":"Get Campaign Traffic Stats","operationId":"get_campaign_traffic_stats_api_v1_campaign__campaign_id__traffic_stats_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignTrafficStatsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/create":{"post":{"tags":["main"],"summary":"Create Campaign","description":"Create a new campaign","operationId":"create_campaign_api_v1_campaign_create_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCampaignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/":{"get":{"tags":["main"],"summary":"Get Campaigns","description":"Get campaigns for user's organization","operationId":"get_campaigns_api_v1_campaign__get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}":{"get":{"tags":["main"],"summary":"Get Campaign","description":"Get campaign details","operationId":"get_campaign_api_v1_campaign__campaign_id__get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["main"],"summary":"Update Campaign","description":"Update campaign settings (name, retry config, max concurrency, schedule)","operationId":"update_campaign_api_v1_campaign__campaign_id__patch","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCampaignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}/start":{"post":{"tags":["main"],"summary":"Start Campaign","description":"Start campaign execution","operationId":"start_campaign_api_v1_campaign__campaign_id__start_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}/pause":{"post":{"tags":["main"],"summary":"Pause Campaign","description":"Pause campaign execution","operationId":"pause_campaign_api_v1_campaign__campaign_id__pause_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}/runs":{"get":{"tags":["main"],"summary":"Get Campaign Runs","description":"Get campaign workflow runs with pagination, filters and sorting","operationId":"get_campaign_runs_api_v1_campaign__campaign_id__runs_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"description":"Page number (starts from 1)","default":1,"title":"Page"},"description":"Page number (starts from 1)"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"description":"Number of items per page","default":50,"title":"Limit"},"description":"Number of items per page"},{"name":"filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON-encoded filter criteria","title":"Filters"},"description":"JSON-encoded filter criteria"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by (e.g., 'duration', 'created_at')","title":"Sort By"},"description":"Field to sort by (e.g., 'duration', 'created_at')"},{"name":"sort_order","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Sort order ('asc' or 'desc')","default":"desc","title":"Sort Order"},"description":"Sort order ('asc' or 'desc')"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignRunsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}/redial":{"post":{"tags":["main"],"summary":"Redial Campaign","description":"Create a new campaign that re-dials unique subscribers from a completed\ncampaign whose latest call resulted in voicemail, no-answer, or busy.\n\nThe new campaign is created in 'created' state with queued_runs pre-seeded\nfrom the parent's original initial contexts. A campaign can be redialed at\nmost once.","operationId":"redial_campaign_api_v1_campaign__campaign_id__redial_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RedialCampaignRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}/resume":{"post":{"tags":["main"],"summary":"Resume Campaign","description":"Resume a paused campaign","operationId":"resume_campaign_api_v1_campaign__campaign_id__resume_post","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}/progress":{"get":{"tags":["main"],"summary":"Get Campaign Progress","description":"Get current campaign progress and statistics","operationId":"get_campaign_progress_api_v1_campaign__campaign_id__progress_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignProgressResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}/source-download-url":{"get":{"tags":["main"],"summary":"Get Campaign Source Download Url","description":"Get presigned download URL for campaign CSV source file\nValidates that the campaign belongs to the user's organization for security.","operationId":"get_campaign_source_download_url_api_v1_campaign__campaign_id__source_download_url_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignSourceDownloadResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/campaign/{campaign_id}/report":{"get":{"tags":["main"],"summary":"Download Campaign Report","description":"Download a CSV report of completed campaign runs.","operationId":"download_campaign_report_api_v1_campaign__campaign_id__report_get","parameters":[{"name":"campaign_id","in":"path","required":true,"schema":{"type":"integer","title":"Campaign Id"}},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter runs created on or after this datetime (ISO 8601)","title":"Start Date"},"description":"Filter runs created on or after this datetime (ISO 8601)"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"description":"Filter runs created on or before this datetime (ISO 8601)","title":"End Date"},"description":"Filter runs created on or before this datetime (ISO 8601)"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/credentials/":{"get":{"tags":["main"],"summary":"List Credentials","description":"List all webhook credentials for the user's organization.\n\nReturns:\n List of credentials (without sensitive data)","operationId":"list_credentials_api_v1_credentials__get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/CredentialResponse"},"title":"Response List Credentials Api V1 Credentials Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"list_credentials","x-sdk-description":"List webhook credentials available to the authenticated organization."},"post":{"tags":["main"],"summary":"Create Credential","description":"Create a new webhook credential.\n\nArgs:\n request: The credential creation request\n\nReturns:\n The created credential (without sensitive data)","operationId":"create_credential_api_v1_credentials__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateCredentialRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/credentials/{credential_uuid}":{"get":{"tags":["main"],"summary":"Get Credential","description":"Get a specific webhook credential by UUID.\n\nArgs:\n credential_uuid: The UUID of the credential\n\nReturns:\n The credential (without sensitive data)","operationId":"get_credential_api_v1_credentials__credential_uuid__get","parameters":[{"name":"credential_uuid","in":"path","required":true,"schema":{"type":"string","title":"Credential Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["main"],"summary":"Update Credential","description":"Update a webhook credential.\n\nArgs:\n credential_uuid: The UUID of the credential to update\n request: The update request\n\nReturns:\n The updated credential (without sensitive data)","operationId":"update_credential_api_v1_credentials__credential_uuid__put","parameters":[{"name":"credential_uuid","in":"path","required":true,"schema":{"type":"string","title":"Credential Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateCredentialRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CredentialResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main"],"summary":"Delete Credential","description":"Delete (soft delete) a webhook credential.\n\nArgs:\n credential_uuid: The UUID of the credential to delete\n\nReturns:\n Success message","operationId":"delete_credential_api_v1_credentials__credential_uuid__delete","parameters":[{"name":"credential_uuid","in":"path","required":true,"schema":{"type":"string","title":"Credential Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Credential Api V1 Credentials Credential Uuid Delete"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tools/":{"get":{"tags":["main"],"summary":"List Tools","description":"List all tools for the user's organization.\n\nArgs:\n status: Optional filter by status (active, archived, draft)\n category: Optional filter by category (http_api, native, integration)\n\nReturns:\n List of tools","operationId":"list_tools_api_v1_tools__get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},{"name":"category","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Category"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ToolResponse"},"title":"Response List Tools Api V1 Tools Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"list_tools","x-sdk-description":"List tools available to the authenticated organization."},"post":{"tags":["main"],"summary":"Create Tool","description":"Create a new tool.\n\nArgs:\n request: The tool creation request\n\nReturns:\n The created tool","operationId":"create_tool_api_v1_tools__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateToolRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"create_tool","x-sdk-description":"Create a reusable tool for the authenticated organization."}},"/api/v1/tools/{tool_uuid}":{"get":{"tags":["main"],"summary":"Get Tool","description":"Get a specific tool by UUID.\n\nArgs:\n tool_uuid: The UUID of the tool\n\nReturns:\n The tool","operationId":"get_tool_api_v1_tools__tool_uuid__get","parameters":[{"name":"tool_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tool Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["main"],"summary":"Update Tool","description":"Update a tool.\n\nArgs:\n tool_uuid: The UUID of the tool to update\n request: The update request\n\nReturns:\n The updated tool","operationId":"update_tool_api_v1_tools__tool_uuid__put","parameters":[{"name":"tool_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tool Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateToolRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main"],"summary":"Delete Tool","description":"Archive (soft delete) a tool.\n\nArgs:\n tool_uuid: The UUID of the tool to delete\n\nReturns:\n Success message","operationId":"delete_tool_api_v1_tools__tool_uuid__delete","parameters":[{"name":"tool_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tool Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Delete Tool Api V1 Tools Tool Uuid Delete"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tools/{tool_uuid}/mcp/refresh":{"post":{"tags":["main"],"summary":"Refresh Mcp Tools","description":"Re-discover an MCP tool's server catalog and overwrite the cached\ndefinition.config.discovered_tools. Server down \u2192 200 with error\n(cache not overwritten on transient failure).","operationId":"refresh_mcp_tools_api_v1_tools__tool_uuid__mcp_refresh_post","parameters":[{"name":"tool_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tool Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/McpRefreshResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tools/{tool_uuid}/test":{"post":{"tags":["main"],"summary":"Test Tool","description":"Execute an HTTP API tool with sample LLM and preset parameters.","operationId":"test_tool_api_v1_tools__tool_uuid__test_post","parameters":[{"name":"tool_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tool Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolTestRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolTestResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tools/{tool_uuid}/unarchive":{"post":{"tags":["main"],"summary":"Unarchive Tool","description":"Unarchive a tool (restore from archived state).\n\nArgs:\n tool_uuid: The UUID of the tool to unarchive\n\nReturns:\n The unarchived tool","operationId":"unarchive_tool_api_v1_tools__tool_uuid__unarchive_post","parameters":[{"name":"tool_uuid","in":"path","required":true,"schema":{"type":"string","title":"Tool Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ToolResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/context":{"get":{"tags":["main","organizations"],"summary":"Get Current Organization Context","description":"Return organization-scoped configuration signals owned by Dograh.","operationId":"get_current_organization_context_api_v1_organizations_context_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationContextResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/telephony-providers/metadata":{"get":{"tags":["main","organizations"],"summary":"Get Telephony Providers Metadata","description":"Return the list of available telephony providers and their form schemas.\n\nThe UI uses this to render the configuration form generically instead of\nhard-coding fields per provider. Adding a new provider only requires\ndeclaring its ui_metadata in providers/missing_at_provider for the operator to act on.","operationId":"sync_phone_numbers_api_v1_organizations_telephony_configs__config_id__phone_numbers_sync_post","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberSyncResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}":{"get":{"tags":["main","organizations"],"summary":"Get Phone Number","operationId":"get_phone_number_api_v1_organizations_telephony_configs__config_id__phone_numbers__phone_number_id__get","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"integer","title":"Phone Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["main","organizations"],"summary":"Update Phone Number","operationId":"update_phone_number_api_v1_organizations_telephony_configs__config_id__phone_numbers__phone_number_id__put","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"integer","title":"Phone Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberUpdateRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main","organizations"],"summary":"Delete Phone Number","operationId":"delete_phone_number_api_v1_organizations_telephony_configs__config_id__phone_numbers__phone_number_id__delete","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"integer","title":"Phone Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/set-default-caller":{"post":{"tags":["main","organizations"],"summary":"Set Default Caller Id","operationId":"set_default_caller_id_api_v1_organizations_telephony_configs__config_id__phone_numbers__phone_number_id__set_default_caller_post","parameters":[{"name":"config_id","in":"path","required":true,"schema":{"type":"integer","title":"Config Id"}},{"name":"phone_number_id","in":"path","required":true,"schema":{"type":"integer","title":"Phone Number Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PhoneNumberResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/langfuse-credentials":{"get":{"tags":["main","organizations"],"summary":"Get Langfuse Credentials","description":"Get Langfuse credentials for the user's organization with masked sensitive fields.","operationId":"get_langfuse_credentials_api_v1_organizations_langfuse_credentials_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/LangfuseCredentialsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["main","organizations"],"summary":"Save Langfuse Credentials","description":"Save Langfuse credentials for the user's organization.","operationId":"save_langfuse_credentials_api_v1_organizations_langfuse_credentials_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LangfuseCredentialsRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main","organizations"],"summary":"Delete Langfuse Credentials","description":"Delete Langfuse credentials for the user's organization.","operationId":"delete_langfuse_credentials_api_v1_organizations_langfuse_credentials_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/campaign-defaults":{"get":{"tags":["main","organizations"],"summary":"Get Campaign Defaults","description":"Get campaign limits for the user's organization.\n\nReturns the organization's concurrent call limit and default retry configuration.","operationId":"get_campaign_defaults_api_v1_organizations_campaign_defaults_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CampaignDefaultsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/model-connections/catalog":{"get":{"tags":["main","model-connections"],"summary":"Get Catalog","operationId":"get_model_connection_catalog","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Get Model Connection Catalog"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/model-connections/provider-connections":{"get":{"tags":["main","model-connections"],"summary":"List Connections","operationId":"list_provider_connections","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ProviderConnectionResponse"},"title":"Response List Provider Connections"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["main","model-connections"],"summary":"Create Connection","operationId":"create_provider_connection","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectionCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/model-connections/provider-connections/{connection_uuid}":{"patch":{"tags":["main","model-connections"],"summary":"Update Connection","operationId":"update_provider_connection","parameters":[{"name":"connection_uuid","in":"path","required":true,"schema":{"type":"string","title":"Connection Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectionUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main","model-connections"],"summary":"Archive Connection","operationId":"archive_provider_connection","parameters":[{"name":"connection_uuid","in":"path","required":true,"schema":{"type":"string","title":"Connection Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/model-connections/provider-connections/{connection_uuid}/restore":{"post":{"tags":["main","model-connections"],"summary":"Restore Connection","operationId":"restore_provider_connection","parameters":[{"name":"connection_uuid","in":"path","required":true,"schema":{"type":"string","title":"Connection Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProviderConnectionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/model-connections/model-configurations":{"get":{"tags":["main","model-connections"],"summary":"List Configurations","operationId":"list_named_model_configurations","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/NamedModelConfigurationResponse"},"title":"Response List Named Model Configurations"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["main","model-connections"],"summary":"Create Configuration","operationId":"create_named_model_configuration","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamedModelConfigurationCreate"}}}},"responses":{"201":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamedModelConfigurationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/model-connections/model-configurations/{configuration_uuid}":{"get":{"tags":["main","model-connections"],"summary":"Get Configuration","operationId":"get_named_model_configuration","parameters":[{"name":"configuration_uuid","in":"path","required":true,"schema":{"type":"string","title":"Configuration Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamedModelConfigurationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"patch":{"tags":["main","model-connections"],"summary":"Update Configuration","operationId":"update_named_model_configuration","parameters":[{"name":"configuration_uuid","in":"path","required":true,"schema":{"type":"string","title":"Configuration Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamedModelConfigurationUpdate"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamedModelConfigurationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main","model-connections"],"summary":"Archive Configuration","operationId":"archive_named_model_configuration","parameters":[{"name":"configuration_uuid","in":"path","required":true,"schema":{"type":"string","title":"Configuration Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"204":{"description":"Successful Response"},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/model-connections/model-configurations/{configuration_uuid}/restore":{"post":{"tags":["main","model-connections"],"summary":"Restore Configuration","operationId":"restore_named_model_configuration","parameters":[{"name":"configuration_uuid","in":"path","required":true,"schema":{"type":"string","title":"Configuration Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NamedModelConfigurationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/model-connections/default":{"get":{"tags":["main","model-connections"],"summary":"Get Default Configuration","operationId":"get_default_model_configuration","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultModelConfigurationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["main","model-connections"],"summary":"Set Default Configuration","operationId":"set_default_model_configuration","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultModelConfigurationRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DefaultModelConfigurationResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/model-connections/resolve":{"post":{"tags":["main","model-connections"],"summary":"Preview Configuration","operationId":"preview_model_configuration","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelConfigurationOverride"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ModelConfigurationPreview"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/s3/signed-url":{"get":{"tags":["main","s3"],"summary":"Generate a signed S3 URL","description":"Return a short-lived signed URL for a file stored on S3 / MinIO.\n\nAccess Control:\n* Known org-scoped keys (for example campaigns/{org_id}/... and\n recordings/{org_id}/{recording_id}/...) are authorized by matching the\n org_id against the requesting user's organization.\n* Legacy keys (recordings/{run_id}.wav, transcripts/{run_id}.txt)\n are authorized via the workflow run they belong to.\n* Superusers can request any key.","operationId":"get_signed_url_api_v1_s3_signed_url_get","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"S3 object key","title":"Key"},"description":"S3 object key"},{"name":"expires_in","in":"query","required":false,"schema":{"type":"integer","default":3600,"title":"Expires In"}},{"name":"inline","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Inline"}},{"name":"storage_backend","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Storage backend to use (e.g. 'minio', 's3'). When omitted the backend is inferred from the resource.","title":"Storage Backend"},"description":"Storage backend to use (e.g. 'minio', 's3'). When omitted the backend is inferred from the resource."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/S3SignedUrlResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/s3/file-metadata":{"get":{"tags":["main","s3"],"summary":"Get file metadata for debugging","description":"Get file metadata including creation timestamp for debugging.\n\nAccess Control:\n* Superusers can request any key.\n* Regular users can only request resources belonging to their workflow runs.","operationId":"get_file_metadata_api_v1_s3_file_metadata_get","parameters":[{"name":"key","in":"query","required":true,"schema":{"type":"string","description":"S3 object key","title":"Key"},"description":"S3 object key"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FileMetadataResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/s3/presigned-upload-url":{"post":{"tags":["main","s3"],"summary":"Generate a presigned URL for direct CSV upload","description":"Generate a presigned PUT URL for direct CSV file upload to S3/MinIO.\n\nThis endpoint enables browser-to-storage uploads without passing through the backend\n\nAccess Control:\n* All authenticated users can upload CSV files scoped to their organization.\n* Files are stored with organization-scoped keys for multi-tenancy.\n\nReturns:\n* upload_url: Presigned URL (valid for 15 minutes) for PUT request\n* file_key: Unique storage key to use as source_id in campaign creation\n* expires_in: URL expiration time in seconds","operationId":"get_presigned_upload_url_api_v1_s3_presigned_upload_url_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedUploadUrlRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PresignedUploadUrlResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/service-keys":{"get":{"tags":["main"],"summary":"Get Service Keys","description":"Get all service keys for the user's organization.","operationId":"get_service_keys_api_v1_user_service_keys_get","parameters":[{"name":"include_archived","in":"query","required":false,"schema":{"type":"boolean","default":false,"title":"Include Archived"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/ServiceKeyResponse"},"title":"Response Get Service Keys Api V1 User Service Keys Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["main"],"summary":"Create Service Key","description":"Create a new service key for the user's organization.","operationId":"create_service_key_api_v1_user_service_keys_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServiceKeyRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateServiceKeyResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/service-keys/{service_key_id}":{"delete":{"tags":["main"],"summary":"Archive Service Key","description":"Archive a service key.","operationId":"archive_service_key_api_v1_user_service_keys__service_key_id__delete","parameters":[{"name":"service_key_id","in":"path","required":true,"schema":{"type":"string","title":"Service Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/user/service-keys/{service_key_id}/reactivate":{"put":{"tags":["main"],"summary":"Reactivate Service Key","description":"Reactivate an archived service key.\n\nNote: This endpoint is provided for API compatibility but service key\nreactivation is not supported by MPS. Once archived, a service key\ncannot be reactivated and a new key must be created instead.","operationId":"reactivate_service_key_api_v1_user_service_keys__service_key_id__reactivate_put","parameters":[{"name":"service_key_id","in":"path","required":true,"schema":{"type":"string","title":"Service Key Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/concurrent-calls":{"get":{"tags":["main"],"summary":"Get Organization Concurrent Calls","description":"Get your organization's current concurrent call count across all workers.\n\nAuthenticate with X-API-Key; the key determines the organization. Session\nauthentication also works for the user's selected organization. Counts\noccupied call slots, including dialing/ringing calls before media starts,\nusing the concurrency limiter's stale-slot expiry. This is a snapshot,\nnot a reservation of capacity for a future call.","operationId":"get_organization_concurrent_calls_api_v1_organizations_concurrent_calls_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/OrganizationConcurrentCallsResponse"}}}},"404":{"description":"Not found"},"401":{"description":"Missing or invalid credentials"},"503":{"description":"The current call count is unavailable"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/usage/current-period":{"get":{"tags":["main"],"summary":"Get Current Period Usage","description":"Get current reporting-period usage for the user's organization.","operationId":"get_current_period_usage_api_v1_organizations_usage_current_period_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/CurrentUsageResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/billing/credits":{"get":{"tags":["main"],"summary":"Get Billing Credits","description":"Return per-key MPS credits (OSS) or the org's paginated billing ledger.","operationId":"get_billing_credits_api_v1_organizations_billing_credits_get","parameters":[{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"entry_type","in":"query","required":false,"schema":{"anyOf":[{"enum":["credit","purchase","debit","grant","additional_credit"],"type":"string"},{"type":"null"}],"description":"Entry type; credit includes purchases, grants, and additional credits","title":"Entry Type"},"description":"Entry type; credit includes purchases, grants, and additional credits"},{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive calendar date in timezone","title":"Start Date"},"description":"Inclusive calendar date in timezone"},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string","format":"date"},{"type":"null"}],"description":"Inclusive calendar date in timezone","title":"End Date"},"description":"Inclusive calendar date in timezone"},{"name":"timezone","in":"query","required":false,"schema":{"type":"string","description":"IANA timezone for the selected calendar dates","default":"UTC","title":"Timezone"},"description":"IANA timezone for the selected calendar dates"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MPSBillingCreditsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/usage/mps-credits/purchase-url":{"post":{"tags":["main"],"summary":"Create Mps Credit Purchase Url","description":"Create a checkout URL for purchasing organization credits.","operationId":"create_mps_credit_purchase_url_api_v1_organizations_usage_mps_credits_purchase_url_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/MPSCreditPurchaseUrlResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/usage/runs":{"get":{"tags":["main"],"summary":"Get Usage History","description":"Get paginated workflow runs with usage for the organization.","operationId":"get_usage_history_api_v1_organizations_usage_runs_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 date-time string (UTC). Lower bound (inclusive) on created_at.","examples":["2026-04-01T00:00:00Z"],"title":"Start Date"},"description":"ISO 8601 date-time string (UTC). Lower bound (inclusive) on created_at."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 date-time string (UTC). Upper bound (inclusive) on created_at.","examples":["2026-05-01T00:00:00Z"],"title":"End Date"},"description":"ISO 8601 date-time string (UTC). Upper bound (inclusive) on created_at."},{"name":"page","in":"query","required":false,"schema":{"type":"integer","minimum":1,"default":1,"title":"Page"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":50,"title":"Limit"}},{"name":"filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON-encoded array of filter objects. Each object has the shape:\n\njson\n{ \"attribute\": \"<name>\", \"type\": \"<type>\", \"value\": <value> }\n\n\nSupported attribute / type / value combinations:\n\n| attribute | type | value shape | matches |\n|-----------------|---------------|----------------------------------------------|------------------------------------------------------|\n| runId | number | { \"value\": 12345 } | exact run id |\n| workflowId | number | { \"value\": 42 } | exact agent (workflow) id |\n| campaignId | number | { \"value\": 7 } | exact campaign id |\n| callerNumber | text | { \"value\": \"415555\" } | substring match on initial_context.caller_number |\n| calledNumber | text | { \"value\": \"9911848\" } | substring match on initial_context.called_number |\n| dispositionCode | multiSelect | { \"codes\": [\"XFER\", \"DNC\"] } | any of the codes in gathered_context.mapped_call_disposition |\n| duration | numberRange | { \"min\": 60, \"max\": 300 } | call duration (seconds), inclusive bounds |\n| callDirection | radio | { \"status\": \"inbound\" } | inbound or outbound; any other value matches all |\n| callChannel | radio | { \"status\": \"telephony\" } | telephony, web, or chat \u2014 the group of run modes for that channel |\n\nUnknown attributes and unsupported type values are silently ignored.\n\nDate filtering on this endpoint is done via the dedicated start_date / end_date query params, not via a dateRange filter object.\n","examples":["[{"attribute":"callerNumber","type":"text","value":{"value":"415555"}}]","[{"attribute":"campaignId","type":"number","value":{"value":7}},{"attribute":"duration","type":"numberRange","value":{"min":60,"max":300}}]","[{"attribute":"dispositionCode","type":"multiSelect","value":{"codes":["XFER","DNC"]}}]"],"title":"Filters"},"description":"JSON-encoded array of filter objects. Each object has the shape:\n\njson\n{ \"attribute\": \"<name>\", \"type\": \"<type>\", \"value\": <value> }\n\n\nSupported attribute / type / value combinations:\n\n| attribute | type | value shape | matches |\n|-----------------|---------------|----------------------------------------------|------------------------------------------------------|\n| runId | number | { \"value\": 12345 } | exact run id |\n| workflowId | number | { \"value\": 42 } | exact agent (workflow) id |\n| campaignId | number | { \"value\": 7 } | exact campaign id |\n| callerNumber | text | { \"value\": \"415555\" } | substring match on initial_context.caller_number |\n| calledNumber | text | { \"value\": \"9911848\" } | substring match on initial_context.called_number |\n| dispositionCode | multiSelect | { \"codes\": [\"XFER\", \"DNC\"] } | any of the codes in gathered_context.mapped_call_disposition |\n| duration | numberRange | { \"min\": 60, \"max\": 300 } | call duration (seconds), inclusive bounds |\n| callDirection | radio | { \"status\": \"inbound\" } | inbound or outbound; any other value matches all |\n| callChannel | radio | { \"status\": \"telephony\" } | telephony, web, or chat \u2014 the group of run modes for that channel |\n\nUnknown attributes and unsupported type values are silently ignored.\n\nDate filtering on this endpoint is done via the dedicated start_date / end_date query params, not via a dateRange filter object.\n"},{"name":"sort_by","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Field to sort by ('duration'). Defaults to created_at.","examples":["duration"],"title":"Sort By"},"description":"Field to sort by ('duration'). Defaults to created_at."},{"name":"sort_order","in":"query","required":false,"schema":{"type":"string","pattern":"^(asc|desc)$","description":"Sort order ('asc' or 'desc').","default":"desc","title":"Sort Order"},"description":"Sort order ('asc' or 'desc')."},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UsageHistoryResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/usage/runs/report":{"get":{"tags":["main"],"summary":"Download Usage Runs Report","description":"Download a CSV of runs matching the same filters as /usage/runs.","operationId":"download_usage_runs_report_api_v1_organizations_usage_runs_report_get","parameters":[{"name":"start_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 date-time string (UTC). Lower bound (inclusive) on created_at.","title":"Start Date"},"description":"ISO 8601 date-time string (UTC). Lower bound (inclusive) on created_at."},{"name":"end_date","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"ISO 8601 date-time string (UTC). Upper bound (inclusive) on created_at.","title":"End Date"},"description":"ISO 8601 date-time string (UTC). Upper bound (inclusive) on created_at."},{"name":"filters","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"JSON-encoded array of filter objects. Each object has the shape:\n\njson\n{ \"attribute\": \"<name>\", \"type\": \"<type>\", \"value\": <value> }\n\n\nSupported attribute / type / value combinations:\n\n| attribute | type | value shape | matches |\n|-----------------|---------------|----------------------------------------------|------------------------------------------------------|\n| runId | number | { \"value\": 12345 } | exact run id |\n| workflowId | number | { \"value\": 42 } | exact agent (workflow) id |\n| campaignId | number | { \"value\": 7 } | exact campaign id |\n| callerNumber | text | { \"value\": \"415555\" } | substring match on initial_context.caller_number |\n| calledNumber | text | { \"value\": \"9911848\" } | substring match on initial_context.called_number |\n| dispositionCode | multiSelect | { \"codes\": [\"XFER\", \"DNC\"] } | any of the codes in gathered_context.mapped_call_disposition |\n| duration | numberRange | { \"min\": 60, \"max\": 300 } | call duration (seconds), inclusive bounds |\n| callDirection | radio | { \"status\": \"inbound\" } | inbound or outbound; any other value matches all |\n| callChannel | radio | { \"status\": \"telephony\" } | telephony, web, or chat \u2014 the group of run modes for that channel |\n\nUnknown attributes and unsupported type values are silently ignored.\n\nDate filtering on this endpoint is done via the dedicated start_date / end_date query params, not via a dateRange filter object.\n","title":"Filters"},"description":"JSON-encoded array of filter objects. Each object has the shape:\n\njson\n{ \"attribute\": \"<name>\", \"type\": \"<type>\", \"value\": <value> }\n\n\nSupported attribute / type / value combinations:\n\n| attribute | type | value shape | matches |\n|-----------------|---------------|----------------------------------------------|------------------------------------------------------|\n| runId | number | { \"value\": 12345 } | exact run id |\n| workflowId | number | { \"value\": 42 } | exact agent (workflow) id |\n| campaignId | number | { \"value\": 7 } | exact campaign id |\n| callerNumber | text | { \"value\": \"415555\" } | substring match on initial_context.caller_number |\n| calledNumber | text | { \"value\": \"9911848\" } | substring match on initial_context.called_number |\n| dispositionCode | multiSelect | { \"codes\": [\"XFER\", \"DNC\"] } | any of the codes in gathered_context.mapped_call_disposition |\n| duration | numberRange | { \"min\": 60, \"max\": 300 } | call duration (seconds), inclusive bounds |\n| callDirection | radio | { \"status\": \"inbound\" } | inbound or outbound; any other value matches all |\n| callChannel | radio | { \"status\": \"telephony\" } | telephony, web, or chat \u2014 the group of run modes for that channel |\n\nUnknown attributes and unsupported type values are silently ignored.\n\nDate filtering on this endpoint is done via the dedicated start_date / end_date query params, not via a dateRange filter object.\n"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/usage/daily-breakdown":{"get":{"tags":["main"],"summary":"Get Daily Usage Breakdown","description":"Get daily usage breakdown for the last N days. Only available for organizations with pricing.","operationId":"get_daily_usage_breakdown_api_v1_organizations_usage_daily_breakdown_get","parameters":[{"name":"days","in":"query","required":false,"schema":{"type":"integer","maximum":30,"minimum":1,"description":"Number of days to include","default":7,"title":"Days"},"description":"Number of days to include"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyUsageBreakdownResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/reports/daily":{"get":{"tags":["main"],"summary":"Get Daily Report","description":"Get daily report for the specified date and timezone.\nIf workflow_id is provided, filters results to that specific workflow.\nIf workflow_id is None, includes all workflows for the organization.","operationId":"get_daily_report_api_v1_organizations_reports_daily_get","parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","description":"Date in YYYY-MM-DD format","title":"Date"},"description":"Date in YYYY-MM-DD format"},{"name":"timezone","in":"query","required":true,"schema":{"type":"string","description":"IANA timezone (e.g., 'America/New_York')","title":"Timezone"},"description":"IANA timezone (e.g., 'America/New_York')"},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Optional workflow ID to filter by","title":"Workflow Id"},"description":"Optional workflow ID to filter by"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DailyReportResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/reports/workflows":{"get":{"tags":["main"],"summary":"Get Workflow Options","description":"Get all workflows for the user's organization.\nUsed to populate the workflow selector dropdown in the reports page.","operationId":"get_workflow_options_api_v1_organizations_reports_workflows_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowOption"},"title":"Response Get Workflow Options Api V1 Organizations Reports Workflows Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/organizations/reports/daily/runs":{"get":{"tags":["main"],"summary":"Get Daily Runs Detail","description":"Get detailed workflow runs for the specified date.\nUsed for CSV export functionality.","operationId":"get_daily_runs_detail_api_v1_organizations_reports_daily_runs_get","parameters":[{"name":"date","in":"query","required":true,"schema":{"type":"string","description":"Date in YYYY-MM-DD format","title":"Date"},"description":"Date in YYYY-MM-DD format"},{"name":"timezone","in":"query","required":true,"schema":{"type":"string","description":"IANA timezone (e.g., 'America/New_York')","title":"Timezone"},"description":"IANA timezone (e.g., 'America/New_York')"},{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Optional workflow ID to filter by","title":"Workflow Id"},"description":"Optional workflow ID to filter by"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/WorkflowRunDetail"},"title":"Response Get Daily Runs Detail Api V1 Organizations Reports Daily Runs Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/turn/credentials":{"get":{"tags":["main","turn"],"summary":"Get Turn Credentials","description":"Get time-limited TURN credentials for WebRTC connections.\n\nThis endpoint generates ephemeral TURN credentials that are:\n- Valid for the configured TTL (default: 24 hours)\n- Cryptographically bound to the user via HMAC\n- Compatible with coturn's use-auth-secret mode\n\nReturns:\n TurnCredentialsResponse with username, password, ttl, and TURN URIs","operationId":"get_turn_credentials_api_v1_turn_credentials_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnCredentialsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/embed/init":{"post":{"tags":["main"],"summary":"Initialize Embed Session","operationId":"initialize_embed_session_api_v1_public_embed_init_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitEmbedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitEmbedResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["main"],"summary":"Options Init","description":"Fallback OPTIONS handler for init endpoint.","operationId":"options_init_api_v1_public_embed_init_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v1/public/embed/init/stream":{"post":{"tags":["main"],"summary":"Stream Initialize Embed Chat","operationId":"stream_initialize_embed_chat_api_v1_public_embed_init_stream_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/InitEmbedRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"text/event-stream":{"schema":{"oneOf":[{"$ref":"#/components/schemas/PublicEmbedChatSessionStreamEvent"},{"$ref":"#/components/schemas/PublicEmbedChatMessageStreamEvent"},{"$ref":"#/components/schemas/PublicEmbedChatStreamError"}],"type":"string","title":"Response 200 Stream Initialize Embed Chat Api V1 Public Embed Init Stream Post","discriminator":{"propertyName":"type","mapping":{"session":"#/components/schemas/PublicEmbedChatSessionStreamEvent","complete":"#/components/schemas/PublicEmbedChatSessionStreamEvent","message":"#/components/schemas/PublicEmbedChatMessageStreamEvent","error":"#/components/schemas/PublicEmbedChatStreamError"}}}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["main"],"summary":"Options Init","description":"Fallback OPTIONS handler for init endpoint.","operationId":"options_init_api_v1_public_embed_init_stream_options","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"}}}},"/api/v1/public/embed/config/{token}":{"options":{"tags":["main"],"summary":"Options Embed Config","description":"Fallback OPTIONS handler for the embed config endpoint.\n\nBrowser preflights include Access-Control-Request-Method and are handled by\nPublicEmbedCORSMiddleware before global CORS. This keeps non-conformant\nOPTIONS requests on the same validation path.","operationId":"options_embed_config_api_v1_public_embed_config__token__options","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["main"],"summary":"Get Embed Config","description":"Get embed configuration without creating a session.\n\nThis endpoint is used to fetch widget configuration for display purposes\nwithout actually starting a call session.","operationId":"get_embed_config_api_v1_public_embed_config__token__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedConfigResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/embed/turn-credentials/{session_token}":{"get":{"tags":["main"],"summary":"Get Public Turn Credentials","description":"Get TURN credentials for an embed session.\n\nThis endpoint allows embedded widgets to obtain TURN server credentials\nfor WebRTC connections without requiring authentication.\n\nArgs:\n session_token: The session token from embed initialization\n\nReturns:\n TurnCredentialsResponse with username, password, ttl, and TURN URIs","operationId":"get_public_turn_credentials_api_v1_public_embed_turn_credentials__session_token__get","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TurnCredentialsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["main"],"summary":"Options Turn Credentials","description":"Fallback OPTIONS handler for TURN credentials endpoint.","operationId":"options_turn_credentials_api_v1_public_embed_turn_credentials__session_token__options","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/embed/chat/{session_token}":{"get":{"tags":["main"],"summary":"Get Public Chat Session","description":"Current transcript for an embed chat session (used for 409 resync).","operationId":"get_public_chat_session_api_v1_public_embed_chat__session_token__get","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmbedChatSessionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["main"],"summary":"Options Public Chat Session","description":"Fallback OPTIONS handler; browser preflights hit PublicEmbedCORSMiddleware.","operationId":"options_public_chat_session_api_v1_public_embed_chat__session_token__options","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/embed/chat/{session_token}/end":{"post":{"tags":["main"],"summary":"End Public Chat Session","operationId":"end_public_chat_session_api_v1_public_embed_chat__session_token__end_post","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmbedChatEndRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmbedChatSessionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["main"],"summary":"Options Public Chat End","description":"Fallback OPTIONS handler; browser preflights hit PublicEmbedCORSMiddleware.","operationId":"options_public_chat_end_api_v1_public_embed_chat__session_token__end_options","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/embed/chat/{session_token}/messages":{"post":{"tags":["main"],"summary":"Post Public Chat Message","operationId":"post_public_chat_message_api_v1_public_embed_chat__session_token__messages_post","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmbedChatMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmbedChatSessionResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["main"],"summary":"Options Public Chat Messages","description":"Fallback OPTIONS handler; browser preflights hit PublicEmbedCORSMiddleware.","operationId":"options_public_chat_messages_api_v1_public_embed_chat__session_token__messages_options","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/embed/chat/{session_token}/messages/stream":{"post":{"tags":["main"],"summary":"Stream Public Chat Message","operationId":"stream_public_chat_message_api_v1_public_embed_chat__session_token__messages_stream_post","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/PublicEmbedChatMessageRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"text/event-stream":{"schema":{"type":"string","oneOf":[{"$ref":"#/components/schemas/PublicEmbedChatSessionStreamEvent"},{"$ref":"#/components/schemas/PublicEmbedChatMessageStreamEvent"},{"$ref":"#/components/schemas/PublicEmbedChatStreamError"}],"discriminator":{"propertyName":"type","mapping":{"session":"#/components/schemas/PublicEmbedChatSessionStreamEvent","complete":"#/components/schemas/PublicEmbedChatSessionStreamEvent","message":"#/components/schemas/PublicEmbedChatMessageStreamEvent","error":"#/components/schemas/PublicEmbedChatStreamError"}},"title":"Response 200 Stream Public Chat Message Api V1 Public Embed Chat Session Token Messages Stream Post"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"options":{"tags":["main"],"summary":"Options Public Chat Messages","description":"Fallback OPTIONS handler; browser preflights hit PublicEmbedCORSMiddleware.","operationId":"options_public_chat_messages_api_v1_public_embed_chat__session_token__messages_stream_options","parameters":[{"name":"session_token","in":"path","required":true,"schema":{"type":"string","title":"Session Token"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/agent/{uuid}":{"post":{"tags":["main"],"summary":"Initiate Call","description":"Initiate a phone call against the published agent.\n\nExecutes the workflow's currently released definition.","operationId":"initiate_call_api_v1_public_agent__uuid__post","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCallResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/agent/test/{uuid}":{"post":{"tags":["main"],"summary":"Initiate Call Test","description":"Initiate a phone call against the latest draft of the agent.\n\nUseful for verifying changes before publishing. Falls back to the\npublished definition when no draft exists.","operationId":"initiate_call_test_api_v1_public_agent_test__uuid__post","parameters":[{"name":"uuid","in":"path","required":true,"schema":{"type":"string","title":"Uuid"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCallResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/agent/workflow/{workflow_uuid}":{"post":{"tags":["main"],"summary":"Initiate Call By Workflow Uuid","description":"Initiate a phone call against the published workflow identified by UUID.","operationId":"initiate_call_by_workflow_uuid_api_v1_public_agent_workflow__workflow_uuid__post","parameters":[{"name":"workflow_uuid","in":"path","required":true,"schema":{"type":"string","title":"Workflow Uuid"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCallResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/agent/test/workflow/{workflow_uuid}":{"post":{"tags":["main"],"summary":"Initiate Call Test By Workflow Uuid","description":"Initiate a phone call against the latest draft of the workflow by UUID.","operationId":"initiate_call_test_by_workflow_uuid_api_v1_public_agent_test_workflow__workflow_uuid__post","parameters":[{"name":"workflow_uuid","in":"path","required":true,"schema":{"type":"string","title":"Workflow Uuid"}},{"name":"X-API-Key","in":"header","required":true,"schema":{"type":"string","title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCallRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TriggerCallResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/public/download/workflow/{token}/{artifact_type}":{"get":{"tags":["main"],"summary":"Download Workflow Artifact","description":"Download a workflow recording or transcript via public access token.\n\nThis endpoint:\n1. Validates the public access token\n2. Looks up the corresponding workflow run\n3. Generates a signed URL for the requested artifact\n4. Redirects to the signed URL\n\nArgs:\n token: The public access token (UUID format)\n artifact_type: Type of artifact - "recording", "transcript",\n "user_recording", or "bot_recording"\n inline: If true, sets Content-Disposition to inline for browser preview\n\nReturns:\n RedirectResponse to the signed URL (302 redirect)\n\nRaises:\n HTTPException 400: If artifact type is unsupported\n HTTPException 404: If token is invalid or artifact not found","operationId":"download_workflow_artifact_api_v1_public_download_workflow__token___artifact_type__get","parameters":[{"name":"token","in":"path","required":true,"schema":{"type":"string","title":"Token"}},{"name":"artifact_type","in":"path","required":true,"schema":{"type":"string","title":"Artifact Type"}},{"name":"inline","in":"query","required":false,"schema":{"type":"boolean","description":"Display inline in browser instead of download","default":false,"title":"Inline"},"description":"Display inline in browser instead of download"}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow/{workflow_id}/embed-token":{"post":{"tags":["main"],"summary":"Create Or Update Embed Token","description":"Create or update an embed token for a workflow.\nEach workflow can have only one active embed token.","operationId":"create_or_update_embed_token_api_v1_workflow__workflow_id__embed_token_post","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedTokenRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/EmbedTokenResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["main"],"summary":"Get Embed Token","description":"Get the embed token for a workflow if it exists.","operationId":"get_embed_token_api_v1_workflow__workflow_id__embed_token_get","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"anyOf":[{"$ref":"#/components/schemas/EmbedTokenResponse"},{"type":"null"}],"title":"Response Get Embed Token Api V1 Workflow Workflow Id Embed Token Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main"],"summary":"Deactivate Embed Token","description":"Deactivate the embed token for a workflow.","operationId":"deactivate_embed_token_api_v1_workflow__workflow_id__embed_token_delete","parameters":[{"name":"workflow_id","in":"path","required":true,"schema":{"type":"integer","title":"Workflow Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":true,"title":"Response Deactivate Embed Token Api V1 Workflow Workflow Id Embed Token Delete"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-base/upload-url":{"post":{"tags":["main","knowledge-base"],"summary":"Get presigned URL for document upload","description":"Generate a presigned PUT URL for uploading a document.\n\nThis endpoint:\n1. Generates a unique document UUID for organizing the S3 key\n2. Generates a presigned S3/MinIO URL for uploading the file\n3. Returns the upload URL and document metadata\n\nAfter uploading to the returned URL, call /process-document to create\nthe document record and trigger processing.\n\nAccess Control:\n* All authenticated users can upload documents scoped to their organization.","operationId":"get_upload_url_api_v1_knowledge_base_upload_url_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentUploadResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-base/process-document":{"post":{"tags":["main","knowledge-base"],"summary":"Trigger document processing","description":"Trigger asynchronous processing of an uploaded document.\n\nThis endpoint should be called after successfully uploading a file to the presigned URL.\nIt will:\n1. Create a document record in the database with the specified UUID\n2. Enqueue a background task to process the document (chunking and embedding)\n\nThe document status will be updated from 'pending' -> 'processing' -> 'completed' or 'failed'.\n\nEmbedding:\nUses OpenAI text-embedding-3-small (1536-dimensional embeddings, requires API key configured in Model Configurations).\n\nAccess Control:\n* Users can only process documents in their organization.","operationId":"process_document_api_v1_knowledge_base_process_document_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ProcessDocumentRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-base/documents":{"get":{"tags":["main","knowledge-base"],"summary":"List documents","description":"List all documents for the user's organization.\n\nAccess Control:\n* Users can only see documents from their organization.","operationId":"list_documents_api_v1_knowledge_base_documents_get","parameters":[{"name":"status","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by processing status","title":"Status"},"description":"Filter by processing status"},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":100,"title":"Limit"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentListResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"list_documents","x-sdk-description":"List knowledge base documents available to the authenticated organization."}},"/api/v1/knowledge-base/documents/{document_uuid}":{"get":{"tags":["main","knowledge-base"],"summary":"Get document details","description":"Get details of a specific document.\n\nAccess Control:\n* Users can only access documents from their organization.","operationId":"get_document_api_v1_knowledge_base_documents__document_uuid__get","parameters":[{"name":"document_uuid","in":"path","required":true,"schema":{"type":"string","title":"Document Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main","knowledge-base"],"summary":"Delete document","description":"Soft delete a document and its chunks.\n\nAccess Control:\n* Users can only delete documents from their organization.","operationId":"delete_document_api_v1_knowledge_base_documents__document_uuid__delete","parameters":[{"name":"document_uuid","in":"path","required":true,"schema":{"type":"string","title":"Document Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-base/documents/{document_uuid}/content":{"get":{"tags":["main","knowledge-base"],"summary":"Get editable document content","description":"Return the raw text of a .txt or .md document for editing.\n\nAccess Control:\n* Users can only read documents from their organization.","operationId":"get_document_content_api_v1_knowledge_base_documents__document_uuid__content_get","parameters":[{"name":"document_uuid","in":"path","required":true,"schema":{"type":"string","title":"Document Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentContentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"put":{"tags":["main","knowledge-base"],"summary":"Replace document content and re-index","description":"Replace the text of a .txt or .md document and re-process it.\n\nThe stored file is overwritten and the document is re-indexed in the\nbackground. Agents keep using the previous version until that succeeds.\n\nAccess Control:\n* Users can only edit documents from their organization.","operationId":"save_document_content_api_v1_knowledge_base_documents__document_uuid__content_put","parameters":[{"name":"document_uuid","in":"path","required":true,"schema":{"type":"string","title":"Document Uuid"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentContentUpdateRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/DocumentResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/knowledge-base/search":{"post":{"tags":["main","knowledge-base"],"summary":"Search for similar chunks","description":"Search for document chunks similar to the query.\n\nThis endpoint uses vector similarity search to find relevant chunks.\nResults are returned without threshold filtering - apply similarity\nthresholds at the application layer after optional reranking.\n\nAccess Control:\n* Users can only search documents from their organization.","operationId":"search_chunks_api_v1_knowledge_base_search_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkSearchRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ChunkSearchResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow-recordings/upload-url":{"post":{"tags":["main","workflow-recordings"],"summary":"Get presigned URLs for recording uploads","description":"Generate presigned PUT URLs for uploading one or more audio recordings.","operationId":"get_upload_urls_api_v1_workflow_recordings_upload_url_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRecordingUploadRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRecordingUploadResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow-recordings/":{"post":{"tags":["main","workflow-recordings"],"summary":"Create recording records after upload","description":"Create one or more recording records after audio files have been uploaded.","operationId":"create_recordings_api_v1_workflow_recordings__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRecordingCreateRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/BatchRecordingCreateResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"get":{"tags":["main","workflow-recordings"],"summary":"List recordings","description":"List recordings for the organization, optionally filtered.","operationId":"list_recordings_api_v1_workflow_recordings__get","parameters":[{"name":"workflow_id","in":"query","required":false,"schema":{"anyOf":[{"type":"integer"},{"type":"null"}],"description":"Filter by workflow ID","title":"Workflow Id"},"description":"Filter by workflow ID"},{"name":"tts_provider","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by TTS provider","title":"Tts Provider"},"description":"Filter by TTS provider"},{"name":"tts_model","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by TTS model","title":"Tts Model"},"description":"Filter by TTS model"},{"name":"tts_voice_id","in":"query","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"description":"Filter by TTS voice ID","title":"Tts Voice Id"},"description":"Filter by TTS voice ID"},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingListResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"list_recordings","x-sdk-description":"List workflow recordings available to the authenticated organization."}},"/api/v1/workflow-recordings/{recording_id}":{"delete":{"tags":["main","workflow-recordings"],"summary":"Delete a recording","description":"Soft delete a recording.","operationId":"delete_recording_api_v1_workflow_recordings__recording_id__delete","parameters":[{"name":"recording_id","in":"path","required":true,"schema":{"type":"string","title":"Recording Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow-recordings/{id}":{"patch":{"tags":["main","workflow-recordings"],"summary":"Update a recording's Recording ID","description":"Update the recording_id (descriptive name) of a recording.","operationId":"update_recording_api_v1_workflow_recordings__id__patch","parameters":[{"name":"id","in":"path","required":true,"schema":{"type":"integer","title":"Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingUpdateRequestSchema"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/RecordingResponseSchema"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/workflow-recordings/transcribe":{"post":{"tags":["main","workflow-recordings"],"summary":"Transcribe an audio file","description":"Transcribe an uploaded audio file using MPS STT.","operationId":"transcribe_audio_api_v1_workflow_recordings_transcribe_post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"multipart/form-data":{"schema":{"$ref":"#/components/schemas/Body_transcribe_audio_api_v1_workflow_recordings_transcribe_post"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tts-cache":{"get":{"tags":["main","tts-cache"],"summary":"List Tts Cache","operationId":"list_tts_cache_api_v1_tts_cache_get","parameters":[{"name":"search","in":"query","required":false,"schema":{"type":"string","maxLength":200,"default":"","title":"Search"}},{"name":"sort","in":"query","required":false,"schema":{"enum":["last_used","duration","usage"],"type":"string","default":"last_used","title":"Sort"}},{"name":"order","in":"query","required":false,"schema":{"enum":["asc","desc"],"type":"string","default":"desc","title":"Order"}},{"name":"min_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Min Duration"}},{"name":"max_duration","in":"query","required":false,"schema":{"anyOf":[{"type":"number","minimum":0},{"type":"null"}],"title":"Max Duration"}},{"name":"offset","in":"query","required":false,"schema":{"type":"integer","minimum":0,"default":0,"title":"Offset"}},{"name":"limit","in":"query","required":false,"schema":{"type":"integer","maximum":100,"minimum":1,"default":25,"title":"Limit"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSCacheList"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main","tts-cache"],"summary":"Clear Tts Cache","operationId":"clear_tts_cache_api_v1_tts_cache_delete","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSCacheInvalidation"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tts-cache/{entry_id}/audio":{"get":{"tags":["main","tts-cache"],"summary":"Preview Tts Cache","operationId":"preview_tts_cache_api_v1_tts_cache__entry_id__audio_get","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"audio/wav":{"schema":{"type":"string","format":"binary"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/tts-cache/{entry_id}":{"delete":{"tags":["main","tts-cache"],"summary":"Invalidate Tts Cache Entry","operationId":"invalidate_tts_cache_entry_api_v1_tts_cache__entry_id__delete","parameters":[{"name":"entry_id","in":"path","required":true,"schema":{"type":"string","pattern":"^[a-f0-9]{64}$","title":"Entry Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/TTSCacheInvalidation"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/folder/":{"get":{"tags":["main"],"summary":"List Folders","description":"List all folders in the authenticated user's organization.","operationId":"list_folders_api_v1_folder__get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"array","items":{"$ref":"#/components/schemas/FolderResponse"},"title":"Response List Folders Api V1 Folder Get"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"post":{"tags":["main"],"summary":"Create Folder","description":"Create a new folder in the authenticated user's organization.","operationId":"create_folder_api_v1_folder__post","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/CreateFolderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/folder/{folder_id}":{"put":{"tags":["main"],"summary":"Rename Folder","description":"Rename a folder owned by the authenticated user's organization.","operationId":"rename_folder_api_v1_folder__folder_id__put","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"integer","title":"Folder Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"requestBody":{"required":true,"content":{"application/json":{"schema":{"$ref":"#/components/schemas/UpdateFolderRequest"}}}},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/FolderResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}},"delete":{"tags":["main"],"summary":"Delete Folder","description":"Delete a folder. Member agents are moved to "Uncategorized", not deleted.","operationId":"delete_folder_api_v1_folder__folder_id__delete","parameters":[{"name":"folder_id","in":"path","required":true,"schema":{"type":"integer","title":"Folder Id"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"type":"object","additionalProperties":{"type":"boolean"},"title":"Response Delete Folder Api V1 Folder Folder Id Delete"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/signup":{"post":{"tags":["main","auth"],"summary":"Signup","operationId":"signup_api_v1_auth_signup_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/SignupRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/login":{"post":{"tags":["main","auth"],"summary":"Login","operationId":"login_api_v1_auth_login_post","requestBody":{"content":{"application/json":{"schema":{"$ref":"#/components/schemas/LoginRequest"}}},"required":true},"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AuthResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/auth/me":{"get":{"tags":["main","auth"],"summary":"Get Current User","operationId":"get_current_user_api_v1_auth_me_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/UserResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/node-types":{"get":{"tags":["main"],"summary":"List Node Types","description":"List every registered NodeSpec.\n\nSDK clients should pin to spec_version and warn if the server reports\na higher version than what they were generated against.","operationId":"list_node_types_api_v1_node_types_get","parameters":[{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeTypesResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"list_node_types","x-sdk-description":"List every registered node type with its spec. Pinned to spec_version."}},"/api/v1/node-types/{name}":{"get":{"tags":["main"],"summary":"Get Node Type","operationId":"get_node_type_api_v1_node_types__name__get","parameters":[{"name":"name","in":"path","required":true,"schema":{"type":"string","title":"Name"}},{"name":"authorization","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Authorization"}},{"name":"X-API-Key","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Api-Key"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/NodeSpec"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}},"x-sdk-method":"get_node_type","x-sdk-description":"Fetch a single node spec by name."}},"/api/v1/health":{"get":{"tags":["main"],"summary":"Health","operationId":"health_api_v1_health_get","responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HealthResponse"}}}},"404":{"description":"Not found"}}}},"/api/v1/health/active-calls":{"get":{"tags":["main"],"summary":"Active Calls","description":"In-flight call count for THIS worker \u2014 the drain signal for deploys.\n\nA deploy orchestrator polls this per worker and waits for zero before\nsending SIGTERM, because uvicorn force-closes live call WebSockets (close\ncode 1012) on SIGTERM and would cut calls mid-conversation otherwise. The\ncount is per-process: one uvicorn per VM port (scripts/rolling_update.sh)\nor per Kubernetes pod (preStop hook). See api/services/observability/active_calls.py.","operationId":"active_calls_api_v1_health_active_calls_get","parameters":[{"name":"X-Dograh-Devops-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dograh-Devops-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/ActiveCallsResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}},"/api/v1/health/autoscale-metric":{"get":{"tags":["main"],"summary":"Autoscale Metric","description":"Fleet-wide autoscaling signal for KEDA: total active calls + warm buffer.\n\nUnlike /health/active-calls (a per-worker drain signal), this is the whole\nfleet's active-call count read from Redis, so a single scrape drives the\nScaledObject. buffer (query param, in calls) is the warm headroom: KEDA\ndivides value by the per-pod target K, giving desiredPods =\nceil((calls + buffer) / K). All scaling policy \u2014 K, buffer, min/max \u2014 lives\nin the ScaledObject; this endpoint is pure signal.\n\nWhen the fleet count cannot be read (Redis down) this responds 503, NOT 0:\na failed scrape makes KEDA's HPA hold the current replica count, while a\nsuccessful scrape of 0 would instruct it to scale toward minReplicas.","operationId":"autoscale_metric_api_v1_health_autoscale_metric_get","parameters":[{"name":"buffer","in":"query","required":false,"schema":{"type":"integer","default":0,"title":"Buffer"}},{"name":"X-Dograh-Devops-Secret","in":"header","required":false,"schema":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"X-Dograh-Devops-Secret"}}],"responses":{"200":{"description":"Successful Response","content":{"application/json":{"schema":{"$ref":"#/components/schemas/AutoscaleMetricResponse"}}}},"404":{"description":"Not found"},"422":{"description":"Validation Error","content":{"application/json":{"schema":{"$ref":"#/components/schemas/HTTPValidationError"}}}}}}}},"components":{"schemas":{"APIKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"}},"type":"object","required":["id","name","key_prefix","is_active","created_at"],"title":"APIKeyResponse"},"APIKeyStatus":{"properties":{"model":{"type":"string","title":"Model"},"message":{"type":"string","title":"Message"}},"type":"object","required":["model","message"],"title":"APIKeyStatus"},"APIKeyStatusResponse":{"properties":{"status":{"items":{"$ref":"#/components/schemas/APIKeyStatus"},"type":"array","title":"Status"}},"type":"object","required":["status"],"title":"APIKeyStatusResponse"},"ARIConfigurationRequest":{"properties":{"provider":{"type":"string","const":"ari","title":"Provider","default":"ari"},"ari_endpoint":{"type":"string","title":"Ari Endpoint","description":"ARI base URL (e.g., http://asterisk.example.com:8088)"},"app_name":{"type":"string","title":"App Name","description":"ARI username, matching the ari.conf section name"},"app_password":{"type":"string","title":"App Password","description":"ARI user password"},"ws_client_name":{"type":"string","title":"Ws Client Name","description":"websocket_client.conf connection name for externalMedia (e.g., dograh_staging)","default":""},"dial_string_template":{"type":"string","title":"Dial String Template","description":"How a plain number becomes an Asterisk dial string. {number} is substituted; anything already carrying a channel technology (PJSIP/..., Local/...) is dialled as written.","default":"PJSIP/{number}"},"external_pbx":{"anyOf":[{"$ref":"#/components/schemas/VicidialExternalPBXConfiguration"},{"type":"null"}],"description":"Optional external PBX connected through this Asterisk instance"}},"type":"object","required":["ari_endpoint","app_name","app_password"],"title":"ARIConfigurationRequest","description":"Request schema for Asterisk ARI configuration."},"ActiveCallsResponse":{"properties":{"active_calls":{"type":"integer","title":"Active Calls"},"loop_lag_p95_ms":{"type":"number","title":"Loop Lag P95 Ms","default":0.0},"loop_lag_max_ms":{"type":"number","title":"Loop Lag Max Ms","default":0.0}},"type":"object","required":["active_calls"],"title":"ActiveCallsResponse"},"AmbientNoiseConfigurationDefaults":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"volume":{"type":"number","title":"Volume","default":0.3}},"additionalProperties":true,"type":"object","title":"AmbientNoiseConfigurationDefaults"},"AmbientNoiseUploadRequest":{"properties":{"workflow_id":{"type":"integer","title":"Workflow Id"},"filename":{"type":"string","title":"Filename"},"mime_type":{"type":"string","title":"Mime Type","default":"audio/wav"},"file_size":{"type":"integer","maximum":10485760.0,"exclusiveMinimum":0.0,"title":"File Size","description":"Max 10MB"}},"type":"object","required":["workflow_id","filename","file_size"],"title":"AmbientNoiseUploadRequest"},"AmbientNoiseUploadResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"storage_key":{"type":"string","title":"Storage Key"},"storage_backend":{"type":"string","title":"Storage Backend"}},"type":"object","required":["upload_url","storage_key","storage_backend"],"title":"AmbientNoiseUploadResponse"},"AppendTextChatMessageRequest":{"properties":{"text":{"type":"string","minLength":1,"title":"Text"},"expected_revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Revision"}},"type":"object","required":["text"],"title":"AppendTextChatMessageRequest"},"AuthResponse":{"properties":{"token":{"type":"string","title":"Token"},"user":{"$ref":"#/components/schemas/UserResponse"}},"type":"object","required":["token","user"],"title":"AuthResponse"},"AuthUserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"is_superuser":{"type":"boolean","title":"Is Superuser"}},"type":"object","required":["id","is_superuser"],"title":"AuthUserResponse"},"AutoscaleMetricResponse":{"properties":{"value":{"type":"integer","title":"Value"}},"type":"object","required":["value"],"title":"AutoscaleMetricResponse"},"BatchRecordingCreateRequestSchema":{"properties":{"recordings":{"items":{"$ref":"#/components/schemas/RecordingCreateRequestSchema"},"type":"array","maxItems":20,"minItems":1,"title":"Recordings","description":"List of recordings to create"}},"type":"object","required":["recordings"],"title":"BatchRecordingCreateRequestSchema","description":"Request schema for creating one or more recording records after upload."},"BatchRecordingCreateResponseSchema":{"properties":{"recordings":{"items":{"$ref":"#/components/schemas/RecordingResponseSchema"},"type":"array","title":"Recordings","description":"Created recording records"}},"type":"object","required":["recordings"],"title":"BatchRecordingCreateResponseSchema","description":"Response schema for recording creation."},"BatchRecordingUploadRequestSchema":{"properties":{"files":{"items":{"$ref":"#/components/schemas/FileDescriptor"},"type":"array","maxItems":20,"minItems":1,"title":"Files","description":"List of files to upload"}},"type":"object","required":["files"],"title":"BatchRecordingUploadRequestSchema","description":"Request schema for getting presigned upload URLs for one or more files."},"BatchRecordingUploadResponseSchema":{"properties":{"items":{"items":{"$ref":"#/components/schemas/RecordingUploadResponseSchema"},"type":"array","title":"Items","description":"Upload URLs for each file"}},"type":"object","required":["items"],"title":"BatchRecordingUploadResponseSchema","description":"Response schema with presigned upload URLs."},"Body_transcribe_audio_api_v1_workflow_recordings_transcribe_post":{"properties":{"file":{"type":"string","contentMediaType":"application/octet-stream","title":"File"},"language":{"type":"string","title":"Language","default":"en"}},"type":"object","required":["file"],"title":"Body_transcribe_audio_api_v1_workflow_recordings_transcribe_post"},"CalculatorToolDefinition":{"properties":{"schema_version":{"type":"integer","title":"Schema Version","description":"Schema version.","default":1},"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolStartTextMessage"},{"$ref":"#/components/schemas/ToolStartAudioMessage"},{"$ref":"#/components/schemas/ToolDelayedTextMessage"},{"$ref":"#/components/schemas/ToolDelayedAudioMessage"}]},"type":"array","maxItems":220,"title":"Messages","description":"Configured speech. An empty list disables announcements. HTTP/MCP choose one start entry and one entry per delayed timing at random. End-call and transfer tools support one start entry only."},"type":{"type":"string","const":"calculator","title":"Type","description":"Tool type."}},"type":"object","required":["type"],"title":"CalculatorToolDefinition","description":"Tool definition for Calculator tools."},"CallDispositionCodes":{"properties":{"disposition_codes":{"items":{"type":"string"},"type":"array","title":"Disposition Codes","default":[]}},"type":"object","title":"CallDispositionCodes"},"CallDispositionOption":{"properties":{"code":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[A-Za-z][A-Za-z0-9_-]$","title":"Code","description":"Stable code recorded when this outcome is selected."},"description":{"type":"string","maxLength":1000,"minLength":1,"title":"Description","description":"Business criteria for selecting this disposition."}},"type":"object","required":["code","description"],"title":"CallDispositionOption","description":"One business outcome the terminal classifier may select."},"CallEventsConnectionResult":{"properties":{"message":{"type":"string","title":"Message"}},"type":"object","required":["message"],"title":"CallEventsConnectionResult"},"CallEventsSettings":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"sink_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Sink Type"},"config":{"additionalProperties":true,"type":"object","title":"Config"}},"type":"object","title":"CallEventsSettings"},"CallType":{"type":"string","enum":["inbound","outbound"],"title":"CallType"},"CampaignDefaultsResponse":{"properties":{"concurrent_call_limit":{"type":"integer","title":"Concurrent Call Limit"},"from_numbers_count":{"type":"integer","title":"From Numbers Count"},"default_retry_config":{"$ref":"#/components/schemas/RetryConfigResponse"},"last_campaign_settings":{"anyOf":[{"$ref":"#/components/schemas/LastCampaignSettingsResponse"},{"type":"null"}]}},"type":"object","required":["concurrent_call_limit","from_numbers_count","default_retry_config"],"title":"CampaignDefaultsResponse"},"CampaignLogEntryResponse":{"properties":{"ts":{"type":"string","title":"Ts"},"level":{"type":"string","title":"Level"},"event":{"type":"string","title":"Event"},"message":{"type":"string","title":"Message"},"details":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Details"}},"type":"object","required":["ts","level","event","message"],"title":"CampaignLogEntryResponse","description":"A single timestamped entry from the campaign's append-only log.\n\nSurfaced in the UI so operators can see why a campaign moved to\npaused / failed without digging through server logs."},"CampaignProgressResponse":{"properties":{"campaign_id":{"type":"integer","title":"Campaign Id"},"state":{"type":"string","title":"State"},"total_rows":{"type":"integer","title":"Total Rows"},"processed_rows":{"type":"integer","title":"Processed Rows"},"failed_calls":{"type":"integer","title":"Failed Calls"},"progress_percentage":{"type":"number","title":"Progress Percentage"},"source_sync":{"additionalProperties":true,"type":"object","title":"Source Sync"},"rate_limit":{"type":"integer","title":"Rate Limit"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"}},"type":"object","required":["campaign_id","state","total_rows","processed_rows","failed_calls","progress_percentage","source_sync","rate_limit","started_at","completed_at"],"title":"CampaignProgressResponse"},"CampaignResponse":{"properties":{"traffic_split":{"anyOf":[{"$ref":"#/components/schemas/TrafficSplitResponse"},{"type":"null"}]},"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"workflow_id":{"type":"integer","title":"Workflow Id"},"workflow_name":{"type":"string","title":"Workflow Name"},"state":{"type":"string","title":"State"},"source_type":{"type":"string","title":"Source Type"},"source_id":{"type":"string","title":"Source Id"},"total_rows":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Rows"},"processed_rows":{"type":"integer","title":"Processed Rows"},"failed_rows":{"type":"integer","title":"Failed Rows"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"started_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Started At"},"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"retry_config":{"$ref":"#/components/schemas/RetryConfigResponse"},"max_concurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Concurrency"},"rate_limit_per_second":{"type":"integer","title":"Rate Limit Per Second","default":1},"schedule_config":{"anyOf":[{"$ref":"#/components/schemas/ScheduleConfigResponse"},{"type":"null"}]},"circuit_breaker":{"anyOf":[{"$ref":"#/components/schemas/CircuitBreakerConfigResponse"},{"type":"null"}]},"executed_count":{"type":"integer","title":"Executed Count","default":0},"total_queued_count":{"type":"integer","title":"Total Queued Count","default":0},"parent_campaign_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Parent Campaign Id"},"redialed_campaign_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Redialed Campaign Id"},"telephony_configuration_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telephony Configuration Id"},"telephony_configuration_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Telephony Configuration Name"},"logs":{"items":{"$ref":"#/components/schemas/CampaignLogEntryResponse"},"type":"array","title":"Logs"},"warnings":{"items":{"type":"string"},"type":"array","title":"Warnings"}},"type":"object","required":["id","name","workflow_id","workflow_name","state","source_type","source_id","total_rows","processed_rows","failed_rows","created_at","started_at","completed_at","retry_config"],"title":"CampaignResponse"},"CampaignRunsResponse":{"properties":{"runs":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Runs"},"total_count":{"type":"integer","title":"Total Count"},"page":{"type":"integer","title":"Page"},"limit":{"type":"integer","title":"Limit"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["runs","total_count","page","limit","total_pages"],"title":"CampaignRunsResponse","description":"Paginated response for campaign workflow runs"},"CampaignSourceDownloadResponse":{"properties":{"download_url":{"type":"string","title":"Download Url"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["download_url","expires_in"],"title":"CampaignSourceDownloadResponse"},"CampaignTrafficStatsResponse":{"properties":{"total_attempts":{"type":"integer","title":"Total Attempts"},"variants":{"items":{"$ref":"#/components/schemas/TrafficVariantStats"},"type":"array","title":"Variants"}},"type":"object","required":["total_attempts","variants"],"title":"CampaignTrafficStatsResponse"},"CampaignsResponse":{"properties":{"campaigns":{"items":{"$ref":"#/components/schemas/CampaignResponse"},"type":"array","title":"Campaigns"}},"type":"object","required":["campaigns"],"title":"CampaignsResponse"},"ChunkResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"document_id":{"type":"integer","title":"Document Id"},"chunk_text":{"type":"string","title":"Chunk Text"},"contextualized_text":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Contextualized Text"},"chunk_index":{"type":"integer","title":"Chunk Index"},"chunk_metadata":{"additionalProperties":true,"type":"object","title":"Chunk Metadata"},"filename":{"type":"string","title":"Filename"},"document_uuid":{"type":"string","title":"Document Uuid"},"similarity":{"type":"number","title":"Similarity"}},"type":"object","required":["id","document_id","chunk_text","contextualized_text","chunk_index","chunk_metadata","filename","document_uuid","similarity"],"title":"ChunkResponseSchema","description":"Response schema for a document chunk."},"ChunkSearchRequestSchema":{"properties":{"query":{"type":"string","title":"Query","description":"Search query text"},"limit":{"type":"integer","maximum":50.0,"minimum":1.0,"title":"Limit","description":"Maximum number of results","default":5},"document_uuids":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Document Uuids","description":"Filter by specific document UUIDs"},"min_similarity":{"anyOf":[{"type":"number","maximum":1.0,"minimum":0.0},{"type":"null"}],"title":"Min Similarity","description":"Minimum similarity threshold"}},"type":"object","required":["query"],"title":"ChunkSearchRequestSchema","description":"Request schema for searching similar chunks."},"ChunkSearchResponseSchema":{"properties":{"chunks":{"items":{"$ref":"#/components/schemas/ChunkResponseSchema"},"type":"array","title":"Chunks"},"query":{"type":"string","title":"Query"},"total_results":{"type":"integer","title":"Total Results"}},"type":"object","required":["chunks","query","total_results"],"title":"ChunkSearchResponseSchema","description":"Response schema for chunk search results."},"CircuitBreakerConfigRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"failure_threshold":{"type":"number","maximum":1.0,"minimum":0.0,"title":"Failure Threshold","default":0.5},"window_seconds":{"type":"integer","maximum":600.0,"minimum":30.0,"title":"Window Seconds","default":120},"min_calls_in_window":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Min Calls In Window","default":5}},"type":"object","title":"CircuitBreakerConfigRequest"},"CircuitBreakerConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":false},"failure_threshold":{"type":"number","title":"Failure Threshold","default":0.5},"window_seconds":{"type":"integer","title":"Window Seconds","default":120},"min_calls_in_window":{"type":"integer","title":"Min Calls In Window","default":5}},"type":"object","title":"CircuitBreakerConfigResponse"},"CloudonixConfigurationRequest":{"properties":{"provider":{"type":"string","const":"cloudonix","title":"Provider","default":"cloudonix"},"bearer_token":{"type":"string","title":"Bearer Token","description":"Cloudonix API Bearer Token"},"domain_id":{"type":"string","title":"Domain Id","description":"Cloudonix domain name"},"application_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Name","description":"Cloudonix Voice Application name. The application's url is updated when inbound workflows are attached to numbers on this domain. If omitted, an application is auto-created on save and its name is stored on the configuration."}},"type":"object","required":["bearer_token","domain_id"],"title":"CloudonixConfigurationRequest","description":"Request schema for Cloudonix configuration."},"ContextDestinationMappingConfig":{"properties":{"rules":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContextDestinationRule"},"type":"array"},{"type":"null"}],"title":"Rules","description":"Ordered routing rules evaluated top to bottom; first match wins."},"context_path":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Context Path","description":"Deprecated single-rule context path. Use rules instead; accepted for backward compatibility."},"routes":{"anyOf":[{"items":{"$ref":"#/components/schemas/ContextDestinationRoute"},"type":"array"},{"type":"null"}],"title":"Routes","description":"Deprecated single-rule routes. Use rules instead; accepted for backward compatibility."},"fallback_destination":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Fallback Destination","description":"Optional provider-native destination or context template used when no rule matched."}},"type":"object","title":"ContextDestinationMappingConfig","description":"Resolve a transfer destination from gathered or initial context.\n\nRules are evaluated in order. The first rule whose context value matches\none of its routes wins; fallback_destination applies only when no rule\nmatched. Destinations may be provider-native values or context templates."},"ContextDestinationRoute":{"properties":{"context_value":{"type":"string","maxLength":255,"minLength":1,"title":"Context Value","description":"Context value that selects this destination."},"destination":{"type":"string","maxLength":255,"minLength":1,"title":"Destination","description":"VICIdial in-group, SIP endpoint, E.164 phone number, or context template used when this route matches."}},"type":"object","required":["context_value","destination"],"title":"ContextDestinationRoute","description":"Map one context value to a transfer destination."},"ContextDestinationRule":{"properties":{"context_path":{"type":"string","maxLength":255,"minLength":1,"title":"Context Path","description":"Context path used for routing. An unprefixed path checks gathered context first, then initial context; use initial_context. or gathered_context.* to select one explicitly."},"routes":{"items":{"$ref":"#/components/schemas/ContextDestinationRoute"},"type":"array","maxItems":100,"minItems":1,"title":"Routes"}},"type":"object","required":["context_path","routes"],"title":"ContextDestinationRule","description":"One context lookup with its value-to-destination routes."},"CreateAPIKeyRequest":{"properties":{"name":{"type":"string","title":"Name"}},"type":"object","required":["name"],"title":"CreateAPIKeyRequest"},"CreateAPIKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"key_prefix":{"type":"string","title":"Key Prefix"},"api_key":{"type":"string","title":"Api Key"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","key_prefix","api_key","created_at"],"title":"CreateAPIKeyResponse"},"CreateCampaignRequest":{"properties":{"name":{"type":"string","maxLength":255,"minLength":1,"title":"Name"},"workflow_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Workflow Id"},"traffic_split":{"anyOf":[{"$ref":"#/components/schemas/TrafficSplitRequest"},{"type":"null"}]},"source_type":{"type":"string","pattern":"^csv$","title":"Source Type"},"source_id":{"type":"string","title":"Source Id"},"telephony_configuration_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telephony Configuration Id"},"retry_config":{"anyOf":[{"$ref":"#/components/schemas/RetryConfigRequest"},{"type":"null"}]},"max_concurrency":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Concurrency"},"rate_limit_per_second":{"type":"integer","minimum":1.0,"title":"Rate Limit Per Second","default":1},"schedule_config":{"anyOf":[{"$ref":"#/components/schemas/ScheduleConfigRequest"},{"type":"null"}]},"circuit_breaker":{"anyOf":[{"$ref":"#/components/schemas/CircuitBreakerConfigRequest"},{"type":"null"}]}},"type":"object","required":["name","source_type","source_id"],"title":"CreateCampaignRequest"},"CreateCredentialRequest":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"credential_type":{"$ref":"#/components/schemas/WebhookCredentialType"},"credential_data":{"additionalProperties":true,"type":"object","title":"Credential Data"}},"type":"object","required":["name","credential_type","credential_data"],"title":"CreateCredentialRequest","description":"Request schema for creating a webhook credential."},"CreateFolderRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"CreateFolderRequest"},"CreateServiceKeyRequest":{"properties":{"name":{"type":"string","title":"Name"},"expires_in_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Days","default":90}},"type":"object","required":["name"],"title":"CreateServiceKeyRequest"},"CreateServiceKeyResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"service_key":{"type":"string","title":"Service Key"},"key_prefix":{"type":"string","title":"Key Prefix"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"}},"type":"object","required":["id","name","service_key","key_prefix"],"title":"CreateServiceKeyResponse"},"CreateTextChatSessionRequest":{"properties":{"request_id":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Request Id","description":"Client correlation ID for recovery if the creation response is lost."},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"initial_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Initial Context"},"annotations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Annotations"}},"type":"object","title":"CreateTextChatSessionRequest"},"CreateToolRequest":{"properties":{"name":{"type":"string","maxLength":255,"title":"Name","description":"Display name for the tool.","llm_hint":"Use a concise action-oriented name; this influences the function name shown to the agent."},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description","description":"Description shown to the agent when deciding whether to call it.","llm_hint":"State exactly when the agent should call the tool and what result it gets."},"category":{"type":"string","enum":["http_api","end_call","transfer_call","transfer_agent","calculator","native","integration","mcp"],"title":"Category","description":"Tool category. Must match definition.type.","default":"http_api"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon","description":"Lucide icon identifier.","default":"globe"},"icon_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Icon Color","description":"Hex color for the tool icon.","default":"#3B82F6"},"definition":{"oneOf":[{"$ref":"#/components/schemas/HttpApiToolDefinition"},{"$ref":"#/components/schemas/EndCallToolDefinition"},{"$ref":"#/components/schemas/TransferCallToolDefinition"},{"$ref":"#/components/schemas/TransferAgentToolDefinition"},{"$ref":"#/components/schemas/CalculatorToolDefinition"},{"$ref":"#/components/schemas/McpToolDefinition"}],"title":"Definition","description":"Typed tool definition.","discriminator":{"propertyName":"type","mapping":{"calculator":"#/components/schemas/CalculatorToolDefinition","end_call":"#/components/schemas/EndCallToolDefinition","http_api":"#/components/schemas/HttpApiToolDefinition","mcp":"#/components/schemas/McpToolDefinition","transfer_agent":"#/components/schemas/TransferAgentToolDefinition","transfer_call":"#/components/schemas/TransferCallToolDefinition"}}}},"type":"object","required":["name","definition"],"title":"CreateToolRequest","description":"Request schema for creating a reusable tool."},"CreateWorkflowRequest":{"properties":{"name":{"type":"string","title":"Name"},"workflow_definition":{"additionalProperties":true,"type":"object","title":"Workflow Definition"}},"type":"object","required":["name","workflow_definition"],"title":"CreateWorkflowRequest"},"CreateWorkflowRunRequest":{"properties":{"mode":{"type":"string","title":"Mode"},"name":{"type":"string","title":"Name"}},"type":"object","required":["mode","name"],"title":"CreateWorkflowRunRequest"},"CreateWorkflowRunResponse":{"properties":{"id":{"type":"integer","title":"Id"},"workflow_id":{"type":"integer","title":"Workflow Id"},"name":{"type":"string","title":"Name"},"mode":{"type":"string","title":"Mode"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"definition_id":{"type":"integer","title":"Definition Id"},"initial_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Initial Context"}},"type":"object","required":["id","workflow_id","name","mode","created_at","definition_id"],"title":"CreateWorkflowRunResponse"},"CreateWorkflowTemplateRequest":{"properties":{"call_type":{"type":"string","enum":["inbound","outbound"],"title":"Call Type"},"use_case":{"type":"string","title":"Use Case"},"activity_description":{"type":"string","title":"Activity Description"}},"type":"object","required":["call_type","use_case","activity_description"],"title":"CreateWorkflowTemplateRequest"},"CreatedByResponse":{"properties":{"id":{"type":"integer","title":"Id"},"provider_id":{"type":"string","title":"Provider Id"}},"type":"object","required":["id","provider_id"],"title":"CreatedByResponse","description":"Response schema for the user who created a tool."},"CredentialResponse":{"properties":{"uuid":{"type":"string","title":"Uuid"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"credential_type":{"type":"string","title":"Credential Type"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["uuid","name","description","credential_type","created_at","updated_at"],"title":"CredentialResponse","description":"Response schema for a webhook credential (never includes sensitive data)."},"CurrentUsageResponse":{"properties":{"period_start":{"type":"string","title":"Period Start"},"period_end":{"type":"string","title":"Period End"},"used_dograh_tokens":{"type":"number","title":"Used Dograh Tokens"},"total_duration_seconds":{"type":"integer","title":"Total Duration Seconds"},"used_amount_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Used Amount Usd"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"},"price_per_second_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Price Per Second Usd"}},"type":"object","required":["period_start","period_end","used_dograh_tokens","total_duration_seconds"],"title":"CurrentUsageResponse"},"DailyReportResponse":{"properties":{"date":{"type":"string","title":"Date"},"timezone":{"type":"string","title":"Timezone"},"workflow_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Id"},"metrics":{"additionalProperties":{"type":"integer"},"type":"object","title":"Metrics"},"disposition_distribution":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Disposition Distribution"},"call_duration_distribution":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Call Duration Distribution"}},"type":"object","required":["date","timezone","workflow_id","metrics","disposition_distribution","call_duration_distribution"],"title":"DailyReportResponse"},"DailyUsageBreakdownResponse":{"properties":{"breakdown":{"items":{"$ref":"#/components/schemas/DailyUsageItem"},"type":"array","title":"Breakdown"},"total_minutes":{"type":"number","title":"Total Minutes"},"total_cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Total Cost Usd"},"total_dograh_tokens":{"type":"number","title":"Total Dograh Tokens"},"currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Currency"}},"type":"object","required":["breakdown","total_minutes","total_dograh_tokens"],"title":"DailyUsageBreakdownResponse"},"DailyUsageItem":{"properties":{"date":{"type":"string","title":"Date"},"minutes":{"type":"number","title":"Minutes"},"cost_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Cost Usd"},"dograh_tokens":{"type":"number","title":"Dograh Tokens"},"call_count":{"type":"integer","title":"Call Count"}},"type":"object","required":["date","minutes","dograh_tokens","call_count"],"title":"DailyUsageItem"},"DefaultConfigurationsResponse":{"properties":{"llm":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Llm"},"tts":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Tts"},"stt":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Stt"},"embeddings":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Embeddings"},"realtime":{"additionalProperties":{"additionalProperties":true,"type":"object"},"type":"object","title":"Realtime"},"default_providers":{"additionalProperties":{"type":"string"},"type":"object","title":"Default Providers"},"workflow_configurations":{"$ref":"#/components/schemas/WorkflowConfigurationDefaults"},"default_call_dispositions":{"items":{"$ref":"#/components/schemas/CallDispositionOption"},"type":"array","title":"Default Call Dispositions","description":"Built-in suggestions for call-disposition extraction. They do not enable extraction until saved in workflow_configurations.call_dispositions."},"default_answer_classifier_prompt":{"type":"string","title":"Default Answer Classifier Prompt","description":"Built-in instructions for the voicemail/screening classifier. The editor starts from these when a workflow has saved none of its own; a workflow that has saved instructions keeps showing those."},"text_chat_inactivity_timeout_constraints":{"$ref":"#/components/schemas/TextChatInactivityTimeoutConstraints"},"widget_text_defaults":{"$ref":"#/components/schemas/WidgetTexts"}},"type":"object","required":["llm","tts","stt","embeddings","realtime","default_providers","workflow_configurations","default_call_dispositions","default_answer_classifier_prompt","text_chat_inactivity_timeout_constraints","widget_text_defaults"],"title":"DefaultConfigurationsResponse"},"DefaultModelConfigurationRequest":{"properties":{"model_configuration_uuid":{"type":"string","format":"uuid","title":"Model Configuration Uuid"}},"additionalProperties":false,"type":"object","required":["model_configuration_uuid"],"title":"DefaultModelConfigurationRequest"},"DefaultModelConfigurationResponse":{"properties":{"model_configuration_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Configuration Uuid"}},"additionalProperties":false,"type":"object","required":["model_configuration_uuid"],"title":"DefaultModelConfigurationResponse"},"DisplayOptions":{"properties":{"show":{"anyOf":[{"additionalProperties":{"items":{},"type":"array"},"type":"object"},{"type":"null"}],"title":"Show"},"hide":{"anyOf":[{"additionalProperties":{"items":{},"type":"array"},"type":"object"},{"type":"null"}],"title":"Hide"}},"additionalProperties":false,"type":"object","title":"DisplayOptions","description":"Conditional visibility rules.\n\nshow keys are AND-combined: this property is visible only when EVERY\nreferenced field's value matches one of the listed values.\n\nhide keys are OR-combined: this property is hidden when ANY referenced\nfield's value matches one of the listed values.\n\nExample:\n DisplayOptions(show={"extraction_enabled": [True]})\n DisplayOptions(show={"greeting_type": ["audio"]})"},"DispositionCodesResponse":{"properties":{"codes":{"items":{"type":"string"},"type":"array","title":"Codes","description":"Every code that can appear in gathered_context.mapped_call_disposition: the platform's built-in dispositions plus any custom mapped codes this organization's runs have produced."},"end_task_reason_codes":{"items":{"type":"string"},"type":"array","title":"End Task Reason Codes","description":"Disposition codes defined by Pipecat's EndTaskReason enum."},"system_codes":{"items":{"type":"string"},"type":"array","title":"System Codes","description":"Only the platform's built-in dispositions, without the custom codes this organization's runs have produced. This is the set a disposition mapping translates from, so the mapping editor seeds its rows here: codes also contains mapped codes, which are the targets of a mapping rather than its sources."}},"type":"object","required":["codes","end_task_reason_codes","system_codes"],"title":"DispositionCodesResponse","description":"Disposition codes selectable in org-wide run filters."},"DocumentContentResponseSchema":{"properties":{"document_uuid":{"type":"string","title":"Document Uuid"},"filename":{"type":"string","title":"Filename"},"retrieval_mode":{"type":"string","title":"Retrieval Mode"},"content":{"type":"string","title":"Content","description":"The stored file's text, as uploaded"},"file_hash":{"type":"string","title":"File Hash","description":"Version token; send it back as expected_file_hash when saving"}},"type":"object","required":["document_uuid","filename","retrieval_mode","content","file_hash"],"title":"DocumentContentResponseSchema","description":"Raw text of an editable (text or Markdown) document."},"DocumentContentUpdateRequestSchema":{"properties":{"content":{"type":"string","title":"Content","description":"New full text of the document"},"expected_file_hash":{"type":"string","title":"Expected File Hash","description":"file_hash returned when the content was loaded. The save is rejected if the document has changed since."}},"type":"object","required":["content","expected_file_hash"],"title":"DocumentContentUpdateRequestSchema","description":"Request schema for replacing an editable document's text."},"DocumentListResponseSchema":{"properties":{"documents":{"items":{"$ref":"#/components/schemas/DocumentResponseSchema"},"type":"array","title":"Documents"},"total":{"type":"integer","title":"Total"},"limit":{"type":"integer","title":"Limit"},"offset":{"type":"integer","title":"Offset"}},"type":"object","required":["documents","total","limit","offset"],"title":"DocumentListResponseSchema","description":"Response schema for list of documents."},"DocumentResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"document_uuid":{"type":"string","title":"Document Uuid"},"filename":{"type":"string","title":"Filename"},"file_size_bytes":{"type":"integer","title":"File Size Bytes"},"file_hash":{"type":"string","title":"File Hash"},"mime_type":{"type":"string","title":"Mime Type"},"processing_status":{"type":"string","title":"Processing Status"},"processing_error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Processing Error"},"total_chunks":{"type":"integer","title":"Total Chunks"},"retrieval_mode":{"type":"string","title":"Retrieval Mode","default":"chunked"},"custom_metadata":{"additionalProperties":true,"type":"object","title":"Custom Metadata"},"docling_metadata":{"additionalProperties":true,"type":"object","title":"Docling Metadata"},"source_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Source Url"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"organization_id":{"type":"integer","title":"Organization Id"},"created_by":{"type":"integer","title":"Created By"},"is_active":{"type":"boolean","title":"Is Active"},"has_live_content":{"type":"boolean","title":"Has Live Content","description":"Whether agents can currently retrieve this document's content. Stays true while an edited document is re-indexed or after its re-index fails, because the previous version keeps serving until a new one succeeds.","default":false}},"type":"object","required":["id","document_uuid","filename","file_size_bytes","file_hash","mime_type","processing_status","total_chunks","custom_metadata","docling_metadata","created_at","updated_at","organization_id","created_by","is_active"],"title":"DocumentResponseSchema","description":"Response schema for document metadata."},"DocumentUploadRequestSchema":{"properties":{"filename":{"type":"string","title":"Filename","description":"Name of the file to upload"},"mime_type":{"type":"string","title":"Mime Type","description":"MIME type of the file"},"custom_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Custom Metadata","description":"Optional custom metadata"}},"type":"object","required":["filename","mime_type"],"title":"DocumentUploadRequestSchema","description":"Request schema for initiating document upload."},"DocumentUploadResponseSchema":{"properties":{"upload_url":{"type":"string","title":"Upload Url","description":"Signed URL for uploading the file"},"document_uuid":{"type":"string","title":"Document Uuid","description":"Unique identifier for the document"},"s3_key":{"type":"string","title":"S3 Key","description":"S3 key where file should be uploaded"}},"type":"object","required":["upload_url","document_uuid","s3_key"],"title":"DocumentUploadResponseSchema","description":"Response schema containing upload URL and document metadata."},"DuplicateTemplateRequest":{"properties":{"template_id":{"type":"integer","title":"Template Id"},"workflow_name":{"type":"string","title":"Workflow Name"}},"type":"object","required":["template_id","workflow_name"],"title":"DuplicateTemplateRequest"},"EmbedConfigResponse":{"properties":{"workflow_id":{"type":"integer","title":"Workflow Id"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"texts":{"$ref":"#/components/schemas/WidgetTexts"},"theme":{"type":"string","title":"Theme"},"position":{"type":"string","title":"Position"},"button_text":{"type":"string","title":"Button Text"},"button_color":{"type":"string","title":"Button Color"},"size":{"type":"string","title":"Size"},"auto_start":{"type":"boolean","title":"Auto Start"},"turn_enabled":{"type":"boolean","title":"Turn Enabled"},"force_turn_relay":{"type":"boolean","title":"Force Turn Relay"}},"type":"object","required":["workflow_id","settings","texts","theme","position","button_text","button_color","size","auto_start","turn_enabled","force_turn_relay"],"title":"EmbedConfigResponse","description":"Response model for embed configuration"},"EmbedTokenRequest":{"properties":{"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"usage_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Limit"},"expires_in_days":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expires In Days","default":30}},"type":"object","title":"EmbedTokenRequest"},"EmbedTokenResponse":{"properties":{"id":{"type":"integer","title":"Id"},"token":{"type":"string","title":"Token"},"allowed_domains":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Allowed Domains"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"},"is_active":{"type":"boolean","title":"Is Active"},"usage_count":{"type":"integer","title":"Usage Count"},"usage_limit":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Limit"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"embed_script":{"type":"string","title":"Embed Script"}},"type":"object","required":["id","token","allowed_domains","settings","is_active","usage_count","usage_limit","expires_at","created_at","embed_script"],"title":"EmbedTokenResponse"},"EndCallConfig":{"properties":{"endCallReason":{"type":"boolean","title":"Endcallreason","description":"When enabled, the model must provide a reason for ending the call. The reason is set as call disposition and added to call tags.","default":false},"endCallReasonDescription":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Endcallreasondescription","description":"Description shown to the model for the reason parameter. Used only when endCallReason is enabled."}},"additionalProperties":false,"type":"object","title":"EndCallConfig","description":"Configuration for End Call tools."},"EndCallToolDefinition":{"properties":{"schema_version":{"type":"integer","title":"Schema Version","description":"Schema version.","default":1},"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolStartTextMessage"},{"$ref":"#/components/schemas/ToolStartAudioMessage"},{"$ref":"#/components/schemas/ToolDelayedTextMessage"},{"$ref":"#/components/schemas/ToolDelayedAudioMessage"}]},"type":"array","maxItems":220,"title":"Messages","description":"Configured speech. An empty list disables announcements. HTTP/MCP choose one start entry and one entry per delayed timing at random. End-call and transfer tools support one start entry only."},"type":{"type":"string","const":"end_call","title":"Type","description":"Tool type."},"config":{"$ref":"#/components/schemas/EndCallConfig","description":"End Call configuration."}},"type":"object","required":["type","config"],"title":"EndCallToolDefinition","description":"Tool definition for End Call tools."},"EndTextChatSessionRequest":{"properties":{"expected_revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Revision"}},"type":"object","title":"EndTextChatSessionRequest"},"ErrorCondition":{"properties":{"type":{"type":"string","const":"error","title":"Type","default":"error"}},"additionalProperties":false,"type":"object","title":"ErrorCondition"},"ExotelConfigurationRequest":{"properties":{"provider":{"type":"string","const":"exotel","title":"Provider","default":"exotel"},"account_sid":{"type":"string","title":"Account Sid","description":"Exotel Account SID"},"api_key":{"type":"string","title":"Api Key","description":"Exotel API Key"},"api_token":{"type":"string","title":"Api Token","description":"Exotel API Token"},"api_base_url":{"type":"string","title":"Api Base Url","description":"Exotel API base URL. Use https://api.in.exotel.com for India or https://api.exotel.com for other regions.","default":"https://api.in.exotel.com"},"from_numbers":{"items":{"type":"string"},"type":"array","title":"From Numbers"}},"type":"object","required":["account_sid","api_key","api_token"],"title":"ExotelConfigurationRequest"},"ExternalPBXFieldMapping":{"properties":{"context_path":{"type":"string","maxLength":255,"minLength":1,"title":"Context Path"},"destination_field":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9_]{0,63}$","title":"Destination Field"}},"type":"object","required":["context_path","destination_field"],"title":"ExternalPBXFieldMapping","description":"Map one gathered-context value to a provider-native field."},"FallbackPolicy_ServiceSelection_":{"properties":{"version":{"type":"integer","const":1,"title":"Version","default":1},"rules":{"items":{"$ref":"#/components/schemas/FallbackRule_ServiceSelection_"},"type":"array","maxItems":2,"title":"Rules"}},"additionalProperties":false,"type":"object","title":"FallbackPolicy[ServiceSelection]"},"FallbackRule_ServiceSelection_":{"properties":{"condition":{"oneOf":[{"$ref":"#/components/schemas/NoOutputCondition"},{"$ref":"#/components/schemas/ErrorCondition"}],"title":"Condition","discriminator":{"propertyName":"type","mapping":{"error":"#/components/schemas/ErrorCondition","no_output":"#/components/schemas/NoOutputCondition"}}},"target":{"$ref":"#/components/schemas/ServiceSelection"}},"additionalProperties":false,"type":"object","required":["condition","target"],"title":"FallbackRule[ServiceSelection]"},"FileDescriptor":{"properties":{"filename":{"type":"string","title":"Filename","description":"Original filename of the audio file"},"mime_type":{"type":"string","title":"Mime Type","description":"MIME type of the audio file","default":"audio/wav"},"file_size":{"type":"integer","maximum":5242880.0,"exclusiveMinimum":0.0,"title":"File Size","description":"File size in bytes (max 5MB)"}},"type":"object","required":["filename","file_size"],"title":"FileDescriptor","description":"Descriptor for a single file in a batch upload request."},"FileMetadataResponse":{"properties":{"key":{"type":"string","title":"Key"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata"}},"type":"object","required":["key","metadata"],"title":"FileMetadataResponse"},"FolderResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","created_at"],"title":"FolderResponse"},"GraphConstraints":{"properties":{"min_incoming":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Incoming"},"max_incoming":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Incoming"},"min_outgoing":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Outgoing"},"max_outgoing":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Outgoing"},"min_instances":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Instances"},"max_instances":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Instances"}},"additionalProperties":false,"type":"object","title":"GraphConstraints","description":"Per-node-type graph rules. WorkflowGraph enforces these at validation."},"HTTPValidationError":{"properties":{"detail":{"items":{"$ref":"#/components/schemas/ValidationError"},"type":"array","title":"Detail"}},"type":"object","title":"HTTPValidationError"},"HealthResponse":{"properties":{"status":{"type":"string","title":"Status"},"version":{"type":"string","title":"Version"},"backend_api_endpoint":{"type":"string","title":"Backend Api Endpoint"},"tunnel_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tunnel Url"},"deployment_mode":{"type":"string","title":"Deployment Mode"},"auth_provider":{"type":"string","title":"Auth Provider"},"turn_enabled":{"type":"boolean","title":"Turn Enabled"},"force_turn_relay":{"type":"boolean","title":"Force Turn Relay"},"signup_enabled":{"type":"boolean","title":"Signup Enabled"},"stack_project_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Project Id"},"stack_publishable_client_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Stack Publishable Client Key"}},"type":"object","required":["status","version","backend_api_endpoint","deployment_mode","auth_provider","turn_enabled","force_turn_relay","signup_enabled"],"title":"HealthResponse"},"HttpApiConfig":{"properties":{"method":{"type":"string","enum":["GET","POST","PUT","PATCH","DELETE"],"title":"Method","description":"HTTP method to use for the request.","llm_hint":"Use one of GET, POST, PUT, PATCH, DELETE."},"url":{"type":"string","title":"Url","description":"Target HTTP or HTTPS URL.","llm_hint":"Use the final endpoint URL. Authentication belongs in credential_uuid, not embedded in the URL."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Static headers to include with every request.","llm_hint":"Do not place secrets here. Store secrets in the UI credential manager and reference them with credential_uuid."},"credential_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential Uuid","description":"Reference to an external credential for request authentication.","llm_hint":"Use a credential_uuid returned by list_credentials. The MCP flow does not create credential secrets."},"parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolParameter"},"type":"array"},{"type":"null"}],"title":"Parameters","description":"Parameters the model must provide when calling this tool."},"preset_parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/PresetToolParameter"},"type":"array"},{"type":"null"}],"title":"Preset Parameters","description":"Parameters injected by Dograh from fixed values or workflow context templates."},"timeout_ms":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Timeout Ms","description":"Request timeout in milliseconds.","default":5000},"body_template":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Body Template","description":"Optional JSON body template for POST, PUT, and PATCH requests.","llm_hint":"Use {{parameter_name}} placeholders to position LLM and preset parameters anywhere in the body, including nested objects and arrays; also {{initial_context.}}. A value that is exactly one placeholder keeps the value's original JSON type. Omit this field to send all parameters as a flat top-level JSON object. Ignored for GET and DELETE."},"body_format":{"type":"string","enum":["json","form"],"title":"Body Format","description":"Encoding of the POST, PUT, and PATCH request body: 'json' sends application/json, 'form' sends application/x-www-form-urlencoded.","default":"json","llm_hint":"Use 'form' only for APIs that accept form-encoded bodies and reject JSON. In form mode, list values repeat the field name once per item and object values are sent as JSON strings."}},"additionalProperties":false,"type":"object","required":["method","url"],"title":"HttpApiConfig","description":"Configuration for HTTP API tools."},"HttpApiToolDefinition":{"properties":{"schema_version":{"type":"integer","title":"Schema Version","description":"Schema version.","default":1},"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolStartTextMessage"},{"$ref":"#/components/schemas/ToolStartAudioMessage"},{"$ref":"#/components/schemas/ToolDelayedTextMessage"},{"$ref":"#/components/schemas/ToolDelayedAudioMessage"}]},"type":"array","maxItems":220,"title":"Messages","description":"Configured speech. An empty list disables announcements. HTTP/MCP choose one start entry and one entry per delayed timing at random. End-call and transfer tools support one start entry only."},"type":{"type":"string","const":"http_api","title":"Type","description":"Tool type."},"config":{"$ref":"#/components/schemas/HttpApiConfig","description":"HTTP API configuration."}},"type":"object","required":["type","config"],"title":"HttpApiToolDefinition","description":"Tool definition for HTTP API tools."},"HttpTransferResolverConfig":{"properties":{"type":{"type":"string","const":"http","title":"Type","description":"Resolver type.","default":"http"},"url":{"type":"string","title":"Url","description":"HTTP or HTTPS endpoint for transfer resolution."},"headers":{"anyOf":[{"additionalProperties":{"type":"string"},"type":"object"},{"type":"null"}],"title":"Headers","description":"Static headers to include with every resolver request."},"credential_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential Uuid","description":"Reference to an external credential for resolver authentication."},"timeout_ms":{"type":"integer","maximum":5000.0,"minimum":500.0,"title":"Timeout Ms","description":"Resolver request timeout in milliseconds.","default":3000},"wait_message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Wait Message","description":"Optional short message played while Dograh resolves routing."},"parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolParameter"},"type":"array"},{"type":"null"}],"title":"Parameters","description":"Parameters the model may provide when calling this transfer tool."},"preset_parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/PresetToolParameter"},"type":"array"},{"type":"null"}],"title":"Preset Parameters","description":"Parameters injected by Dograh from fixed values or workflow context templates."}},"type":"object","required":["url"],"title":"HttpTransferResolverConfig","description":"HTTP endpoint used to resolve transfer destination at call time."},"ImpersonateRequest":{"properties":{"provider_user_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider User Id"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"}},"type":"object","title":"ImpersonateRequest","description":"Request payload for superadmin impersonation.\n\nprovider_user_id, user_id, or email may be supplied. If more\nthan one is provided, provider_user_id takes precedence, followed by\nuser_id and then email."},"ImpersonateResponse":{"properties":{"refresh_token":{"type":"string","title":"Refresh Token"},"access_token":{"type":"string","title":"Access Token"}},"type":"object","required":["refresh_token","access_token"],"title":"ImpersonateResponse"},"InitEmbedRequest":{"properties":{"token":{"type":"string","title":"Token"},"context_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Context Variables"}},"type":"object","required":["token"],"title":"InitEmbedRequest","description":"Request model for initializing an embed session"},"InitEmbedResponse":{"properties":{"session_token":{"type":"string","title":"Session Token"},"workflow_run_id":{"type":"integer","title":"Workflow Run Id"},"config":{"additionalProperties":true,"type":"object","title":"Config"},"widget_type":{"type":"string","title":"Widget Type","default":"voice"},"chat_session":{"anyOf":[{"$ref":"#/components/schemas/PublicEmbedChatSessionResponse"},{"type":"null"}]}},"type":"object","required":["session_token","workflow_run_id","config"],"title":"InitEmbedResponse","description":"Response model for embed initialization"},"InitiateCallRequest":{"properties":{"workflow_id":{"type":"integer","title":"Workflow Id"},"workflow_run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Run Id"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number"},"telephony_configuration_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telephony Configuration Id"},"from_phone_number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"From Phone Number Id"}},"type":"object","required":["workflow_id"],"title":"InitiateCallRequest"},"ItemKind":{"type":"string","enum":["node","edge","workflow"],"title":"ItemKind"},"LangfuseCredentialsRequest":{"properties":{"host":{"type":"string","title":"Host"},"public_key":{"type":"string","title":"Public Key"},"secret_key":{"type":"string","title":"Secret Key"},"project_id":{"type":"string","minLength":1,"title":"Project Id"},"traces_public":{"type":"boolean","title":"Traces Public","default":false}},"type":"object","required":["host","public_key","secret_key","project_id"],"title":"LangfuseCredentialsRequest"},"LangfuseCredentialsResponse":{"properties":{"host":{"type":"string","title":"Host","default":""},"public_key":{"type":"string","title":"Public Key","default":""},"secret_key":{"type":"string","title":"Secret Key","default":""},"project_id":{"type":"string","title":"Project Id","default":""},"traces_public":{"type":"boolean","title":"Traces Public","default":false},"configured":{"type":"boolean","title":"Configured","default":false}},"type":"object","title":"LangfuseCredentialsResponse"},"LastCampaignSettingsResponse":{"properties":{"retry_config":{"anyOf":[{"$ref":"#/components/schemas/RetryConfigResponse"},{"type":"null"}]},"max_concurrency":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Concurrency"},"rate_limit_per_second":{"type":"integer","title":"Rate Limit Per Second","default":1},"schedule_config":{"anyOf":[{"$ref":"#/components/schemas/ScheduleConfigResponse"},{"type":"null"}]},"circuit_breaker":{"anyOf":[{"$ref":"#/components/schemas/CircuitBreakerConfigResponse"},{"type":"null"}]}},"type":"object","title":"LastCampaignSettingsResponse"},"LoginRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"}},"type":"object","required":["email","password"],"title":"LoginRequest"},"MPSBillingAccountResponse":{"properties":{"id":{"type":"integer","title":"Id"},"organization_id":{"type":"integer","title":"Organization Id"},"billing_mode":{"type":"string","title":"Billing Mode"},"cached_balance_credits":{"type":"number","title":"Cached Balance Credits"},"currency":{"type":"string","title":"Currency"}},"type":"object","required":["id","organization_id","billing_mode","cached_balance_credits","currency"],"title":"MPSBillingAccountResponse"},"MPSBillingCreditsResponse":{"properties":{"total_credits_used":{"type":"number","title":"Total Credits Used","default":0.0},"remaining_credits":{"type":"number","title":"Remaining Credits","default":0.0},"total_quota":{"type":"number","title":"Total Quota","default":0.0},"account":{"anyOf":[{"$ref":"#/components/schemas/MPSBillingAccountResponse"},{"type":"null"}]},"ledger_entries":{"items":{"$ref":"#/components/schemas/MPSCreditLedgerEntryResponse"},"type":"array","title":"Ledger Entries"},"total_count":{"type":"integer","title":"Total Count","default":0},"page":{"type":"integer","title":"Page","default":1},"limit":{"type":"integer","title":"Limit","default":50},"total_pages":{"type":"integer","title":"Total Pages","default":0}},"type":"object","title":"MPSBillingCreditsResponse"},"MPSCreditLedgerEntryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"entry_type":{"type":"string","title":"Entry Type"},"origin":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Origin"},"credits_delta":{"type":"number","title":"Credits Delta"},"balance_after":{"type":"number","title":"Balance After"},"amount_minor":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Amount Minor"},"amount_currency":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Amount Currency"},"payment_order_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Payment Order Id"},"metric_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Metric Code"},"correlation_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Correlation Id"},"aggregation_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Aggregation Key"},"usage_event_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Usage Event Id"},"workflow_run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Run Id"},"workflow_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Id"},"billable_quantity":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Billable Quantity"},"quantity_unit":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Quantity Unit"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["id","entry_type","credits_delta","balance_after","created_at"],"title":"MPSCreditLedgerEntryResponse"},"MPSCreditPurchaseUrlResponse":{"properties":{"checkout_url":{"type":"string","title":"Checkout Url"}},"type":"object","required":["checkout_url"],"title":"MPSCreditPurchaseUrlResponse"},"McpRefreshResponse":{"properties":{"tool_uuid":{"type":"string","title":"Tool Uuid"},"discovered_tools":{"items":{},"type":"array","title":"Discovered Tools"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"}},"type":"object","required":["tool_uuid"],"title":"McpRefreshResponse","description":"Result of re-discovering an MCP server's tool catalog."},"McpToolConfig":{"properties":{"transport":{"type":"string","const":"streamable_http","title":"Transport","description":"MCP transport protocol.","default":"streamable_http"},"url":{"type":"string","title":"Url","description":"MCP server URL. Must use http:// or https://.","llm_hint":"Use the server's streamable HTTP MCP endpoint."},"credential_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Credential Uuid","description":"Reference to an external credential for MCP server auth.","llm_hint":"Use a credential_uuid returned by list_credentials. Credentials are created by the user in the UI."},"tools_filter":{"items":{"type":"string"},"type":"array","title":"Tools Filter","description":"Allowlist of MCP tool names to expose. Empty exposes all tools.","llm_hint":"Use exact MCP tool names from the remote server catalog when you need to restrict the exposed tools."},"timeout_secs":{"type":"integer","minimum":0.0,"title":"Timeout Secs","description":"Connection timeout in seconds.","default":30},"sse_read_timeout_secs":{"type":"integer","minimum":0.0,"title":"Sse Read Timeout Secs","description":"SSE read timeout in seconds.","default":300},"discovered_tools":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Discovered Tools","description":"Server-managed cache of the MCP server's tool catalog [{name, description}]. Populated best-effort by the backend.","llm_hint":"Do not author this field; the server fills it."}},"type":"object","required":["url"],"title":"McpToolConfig","description":"Configuration for a customer MCP server tool definition."},"McpToolDefinition":{"properties":{"schema_version":{"type":"integer","title":"Schema Version","description":"Schema version.","default":1},"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolStartTextMessage"},{"$ref":"#/components/schemas/ToolStartAudioMessage"},{"$ref":"#/components/schemas/ToolDelayedTextMessage"},{"$ref":"#/components/schemas/ToolDelayedAudioMessage"}]},"type":"array","maxItems":220,"title":"Messages","description":"Configured speech. An empty list disables announcements. HTTP/MCP choose one start entry and one entry per delayed timing at random. End-call and transfer tools support one start entry only."},"type":{"type":"string","const":"mcp","title":"Type","description":"Tool type."},"config":{"$ref":"#/components/schemas/McpToolConfig","description":"MCP server configuration."}},"type":"object","required":["type","config"],"title":"McpToolDefinition","description":"Persisted MCP tool definition."},"ModelConfigurationOverride":{"properties":{"model_configuration_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Model Configuration Uuid"},"mode":{"anyOf":[{"type":"string","enum":["pipeline","realtime"]},{"type":"null"}],"title":"Mode"},"llm":{"anyOf":[{"$ref":"#/components/schemas/ServiceOverride"},{"type":"null"}]},"llm_fallback":{"anyOf":[{"$ref":"#/components/schemas/FallbackPolicy_ServiceSelection_"},{"type":"null"}]},"stt":{"anyOf":[{"$ref":"#/components/schemas/ServiceOverride"},{"type":"null"}]},"tts":{"anyOf":[{"$ref":"#/components/schemas/ServiceOverride"},{"type":"null"}]},"realtime":{"anyOf":[{"$ref":"#/components/schemas/ServiceOverride"},{"type":"null"}]},"embeddings":{"anyOf":[{"$ref":"#/components/schemas/ServiceOverride"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"ModelConfigurationOverride"},"ModelConfigurationPreview":{"properties":{"configuration":{"additionalProperties":true,"type":"object","title":"Configuration"},"provenance":{"items":{"additionalProperties":true,"type":"object"},"type":"array","title":"Provenance"}},"additionalProperties":false,"type":"object","required":["configuration","provenance"],"title":"ModelConfigurationPreview"},"ModelConfigurationSpec":{"properties":{"version":{"type":"integer","const":3,"title":"Version","default":3},"mode":{"type":"string","enum":["pipeline","realtime"],"title":"Mode","default":"pipeline"},"llm":{"$ref":"#/components/schemas/ServiceSelection"},"llm_fallback":{"anyOf":[{"$ref":"#/components/schemas/FallbackPolicy_ServiceSelection_"},{"type":"null"}]},"stt":{"anyOf":[{"$ref":"#/components/schemas/ServiceSelection"},{"type":"null"}]},"tts":{"anyOf":[{"$ref":"#/components/schemas/ServiceSelection"},{"type":"null"}]},"realtime":{"anyOf":[{"$ref":"#/components/schemas/ServiceSelection"},{"type":"null"}]},"embeddings":{"anyOf":[{"$ref":"#/components/schemas/ServiceSelection"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["llm"],"title":"ModelConfigurationSpec"},"MoveWorkflowToFolderRequest":{"properties":{"folder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Folder Id"}},"type":"object","title":"MoveWorkflowToFolderRequest","description":"Move a workflow into a folder, or to "Uncategorized" when null."},"NamedModelConfigurationCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"configuration":{"$ref":"#/components/schemas/ModelConfigurationSpec"}},"additionalProperties":false,"type":"object","required":["name","configuration"],"title":"NamedModelConfigurationCreate"},"NamedModelConfigurationResponse":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid"},"name":{"type":"string","title":"Name"},"configuration":{"$ref":"#/components/schemas/ModelConfigurationSpec"},"revision":{"type":"integer","title":"Revision"},"is_active":{"type":"boolean","title":"Is Active"}},"additionalProperties":false,"type":"object","required":["uuid","name","configuration","revision","is_active"],"title":"NamedModelConfigurationResponse"},"NamedModelConfigurationUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Name"},"configuration":{"anyOf":[{"$ref":"#/components/schemas/ModelConfigurationSpec"},{"type":"null"}]},"revision":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Revision"}},"additionalProperties":false,"type":"object","title":"NamedModelConfigurationUpdate"},"NoOutputCondition":{"properties":{"type":{"type":"string","const":"no_output","title":"Type","default":"no_output"},"after_ms":{"type":"integer","maximum":10000.0,"minimum":100.0,"title":"After Ms","default":1500}},"additionalProperties":false,"type":"object","title":"NoOutputCondition"},"NodeCategory":{"type":"string","enum":["call_node","global_node","trigger","integration"],"title":"NodeCategory","description":"Drives grouping in the AddNodePanel UI."},"NodeExample":{"properties":{"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"data":{"additionalProperties":true,"type":"object","title":"Data"}},"additionalProperties":false,"type":"object","required":["name","data"],"title":"NodeExample","description":"A worked example LLMs can pattern-match. Keep small and realistic."},"NodeSpec":{"properties":{"name":{"type":"string","title":"Name"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","minLength":1,"title":"Description","description":"Human-facing explanation shown in AddNodePanel."},"llm_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Hint","description":"LLM-only guidance; omitted from the UI."},"docs_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Url","description":"Documentation URL shown in the node editor."},"category":{"$ref":"#/components/schemas/NodeCategory"},"icon":{"type":"string","title":"Icon"},"version":{"type":"string","title":"Version","default":"1.0.0"},"properties":{"items":{"$ref":"#/components/schemas/PropertySpec"},"type":"array","title":"Properties"},"examples":{"items":{"$ref":"#/components/schemas/NodeExample"},"type":"array","title":"Examples"},"graph_constraints":{"anyOf":[{"$ref":"#/components/schemas/GraphConstraints"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["name","display_name","description","category","icon","properties"],"title":"NodeSpec","description":"Single source of truth for a node type."},"NodeTypesResponse":{"properties":{"spec_version":{"type":"string","title":"Spec Version"},"node_types":{"items":{"$ref":"#/components/schemas/NodeSpec"},"type":"array","title":"Node Types"}},"type":"object","required":["spec_version","node_types"],"title":"NodeTypesResponse"},"NumberInputOptions":{"properties":{"fractional":{"type":"boolean","title":"Fractional","description":"Allow arbitrary fractional values via step='any'.","default":false}},"additionalProperties":false,"type":"object","title":"NumberInputOptions","description":"Renderer hints for numeric inputs."},"OnboardingState":{"properties":{"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"skipped":{"type":"boolean","title":"Skipped","default":false},"seen_tooltips":{"items":{"type":"string"},"type":"array","title":"Seen Tooltips"},"completed_actions":{"items":{"type":"string"},"type":"array","title":"Completed Actions"}},"type":"object","title":"OnboardingState","description":"Per-user onboarding state, stored under UserConfigurationKey.ONBOARDING.\n\nServer-authoritative replacement for the browser-localStorage onboarding\nstore, so the post-signup gate and one-time tooltips hold across devices."},"OnboardingStateUpdate":{"properties":{"completed_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Completed At"},"skipped":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Skipped"},"seen_tooltips":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Seen Tooltips"},"completed_actions":{"anyOf":[{"items":{"type":"string"},"type":"array"},{"type":"null"}],"title":"Completed Actions"}},"type":"object","title":"OnboardingStateUpdate","description":"Partial update merged into the stored state.\n\nScalars overwrite when supplied; list entries are unioned into the stored\nlists, so concurrent updates (e.g. two tabs marking different tooltips)\ndon't drop each other's items."},"OrganizationConcurrentCallsResponse":{"properties":{"organization_id":{"type":"integer","title":"Organization Id"},"active_calls":{"type":"integer","minimum":0.0,"title":"Active Calls","description":"Occupied concurrent call slots across all workers, including dialing/ringing reservations. Excludes expired slots."}},"type":"object","required":["organization_id","active_calls"],"title":"OrganizationConcurrentCallsResponse"},"OrganizationContextResponse":{"properties":{"organization_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"},"organization_provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Provider Id"},"model_services":{"$ref":"#/components/schemas/OrganizationModelServicesContext"}},"type":"object","required":["model_services"],"title":"OrganizationContextResponse"},"OrganizationModelServicesContext":{"properties":{"config_source":{"type":"string","enum":["organization_v3","empty"],"title":"Config Source"},"managed_service_version":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Managed Service Version"},"uses_managed_service_v2":{"type":"boolean","title":"Uses Managed Service V2"}},"type":"object","required":["config_source","uses_managed_service_v2"],"title":"OrganizationModelServicesContext"},"OrganizationPreferences":{"properties":{"call_events":{"anyOf":[{"$ref":"#/components/schemas/CallEventsSettings"},{"type":"null"}],"description":"Omit to keep the destination unchanged; null removes it."},"test_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Phone Number"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"external_pbx_integrations_enabled":{"type":"boolean","title":"External Pbx Integrations Enabled","default":false},"disposition_mapping_enabled":{"type":"boolean","title":"Disposition Mapping Enabled","default":false},"disposition_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Disposition Mapping","description":"Dograh disposition -> the code this organization uses for it. Applied when writing gathered_context.mapped_call_disposition, so webhooks, run filters, reports and external-PBX write-backs all read the organization's own vocabulary. Dispositions absent from the mapping pass through unchanged."}},"type":"object","title":"OrganizationPreferences"},"OrganizationPreferencesResponse":{"properties":{"call_events":{"$ref":"#/components/schemas/CallEventsSettings"},"test_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Phone Number"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"external_pbx_integrations_enabled":{"type":"boolean","title":"External Pbx Integrations Enabled","default":false},"disposition_mapping_enabled":{"type":"boolean","title":"Disposition Mapping Enabled","default":false},"disposition_mapping":{"additionalProperties":{"type":"string"},"type":"object","title":"Disposition Mapping","description":"Dograh disposition -> the code this organization uses for it. Applied when writing gathered_context.mapped_call_disposition, so webhooks, run filters, reports and external-PBX write-backs all read the organization's own vocabulary. Dispositions absent from the mapping pass through unchanged."}},"type":"object","required":["call_events"],"title":"OrganizationPreferencesResponse"},"PhoneNumberCreateRequest":{"properties":{"address":{"type":"string","maxLength":255,"minLength":1,"title":"Address"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code"},"label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Label"},"inbound_workflow_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inbound Workflow Id"},"telephony_trunk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telephony Trunk Id"},"is_active":{"type":"boolean","title":"Is Active","default":true},"is_default_caller_id":{"type":"boolean","title":"Is Default Caller Id","default":false},"extra_metadata":{"additionalProperties":true,"type":"object","title":"Extra Metadata"}},"type":"object","required":["address"],"title":"PhoneNumberCreateRequest","description":"Create a new phone number under a telephony configuration.\n\naddress_normalized and address_type are computed server-side from\naddress (and country_code if PSTN). address itself is stored\nverbatim for display."},"PhoneNumberListResponse":{"properties":{"phone_numbers":{"items":{"$ref":"#/components/schemas/PhoneNumberResponse"},"type":"array","title":"Phone Numbers"}},"type":"object","required":["phone_numbers"],"title":"PhoneNumberListResponse"},"PhoneNumberResponse":{"properties":{"id":{"type":"integer","title":"Id"},"telephony_configuration_id":{"type":"integer","title":"Telephony Configuration Id"},"address":{"type":"string","title":"Address"},"address_normalized":{"type":"string","title":"Address Normalized"},"address_type":{"type":"string","title":"Address Type"},"country_code":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Country Code"},"label":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Label"},"inbound_workflow_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inbound Workflow Id"},"inbound_workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inbound Workflow Name"},"telephony_trunk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telephony Trunk Id"},"is_active":{"type":"boolean","title":"Is Active"},"is_default_caller_id":{"type":"boolean","title":"Is Default Caller Id"},"extra_metadata":{"additionalProperties":true,"type":"object","title":"Extra Metadata"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"},"provider_sync":{"anyOf":[{"$ref":"#/components/schemas/ProviderSyncStatus"},{"type":"null"}]}},"type":"object","required":["id","telephony_configuration_id","address","address_normalized","address_type","is_active","is_default_caller_id","extra_metadata","created_at","updated_at"],"title":"PhoneNumberResponse"},"PhoneNumberSyncResponse":{"properties":{"created":{"items":{"$ref":"#/components/schemas/PhoneNumberResponse"},"type":"array","title":"Created"},"updated":{"items":{"$ref":"#/components/schemas/PhoneNumberResponse"},"type":"array","title":"Updated"},"skipped":{"items":{"$ref":"#/components/schemas/PhoneNumberSyncSkipped"},"type":"array","title":"Skipped"},"missing_at_provider":{"items":{"$ref":"#/components/schemas/PhoneNumberResponse"},"type":"array","title":"Missing At Provider"}},"type":"object","required":["created","updated","skipped","missing_at_provider"],"title":"PhoneNumberSyncResponse","description":"Outcome of importing the provider account's numbers into a configuration.\n\nRows are only ever added or refreshed. A number the provider no longer\nreports is listed under missing_at_provider for the operator to act\non; the sync never deactivates or deletes it, because a transient listing\ngap must not silence a live number."},"PhoneNumberSyncSkipped":{"properties":{"address":{"type":"string","title":"Address"},"reason":{"type":"string","title":"Reason"}},"type":"object","required":["address","reason"],"title":"PhoneNumberSyncSkipped","description":"A provider number the sync could not import, and why."},"PhoneNumberUpdateRequest":{"properties":{"label":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Label"},"inbound_workflow_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Inbound Workflow Id"},"clear_inbound_workflow":{"type":"boolean","title":"Clear Inbound Workflow","default":false},"telephony_trunk_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telephony Trunk Id"},"clear_trunk":{"type":"boolean","title":"Clear Trunk","default":false},"is_active":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Active"},"country_code":{"anyOf":[{"type":"string","maxLength":2,"minLength":2},{"type":"null"}],"title":"Country Code"},"extra_metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Extra Metadata"}},"type":"object","title":"PhoneNumberUpdateRequest","description":"Partial update. address is intentionally immutable \u2014 to change a\nnumber, delete the row and create a new one."},"PlivoConfigurationRequest":{"properties":{"provider":{"type":"string","const":"plivo","title":"Provider","default":"plivo"},"auth_id":{"type":"string","title":"Auth Id","description":"Plivo Auth ID"},"auth_token":{"type":"string","title":"Auth Token","description":"Plivo Auth Token"},"application_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Id","description":"Plivo Application ID. The application's answer_url is updated when inbound workflows are attached to numbers on this account. If omitted, an application is auto-created on save and its id is stored on the configuration."}},"type":"object","required":["auth_id","auth_token"],"title":"PlivoConfigurationRequest","description":"Request schema for Plivo configuration."},"PresetToolParameter":{"properties":{"name":{"type":"string","title":"Name","description":"Parameter name used as a key in the request body."},"type":{"type":"string","enum":["string","number","boolean","object","array"],"title":"Type","description":"JSON type for the resolved value.","llm_hint":"Allowed values are string, number, boolean, object, and array."},"value_template":{"type":"string","title":"Value Template","description":"Fixed value or template, e.g. {{initial_context.phone_number}}.","llm_hint":"Use {{initial_context.}} for call-start context and {{gathered_context.}} for values extracted during the call."},"required":{"type":"boolean","title":"Required","description":"Whether the parameter must resolve to a non-empty value.","default":true}},"type":"object","required":["name","type","value_template"],"title":"PresetToolParameter","description":"A parameter injected by Dograh at runtime."},"PresignedUploadUrlRequest":{"properties":{"file_name":{"type":"string","pattern":".\.csv$","title":"File Name","description":"CSV filename"},"file_size":{"type":"integer","maximum":10485760.0,"exclusiveMinimum":0.0,"title":"File Size","description":"File size in bytes (max 10MB)"},"content_type":{"type":"string","title":"Content Type","description":"File content type","default":"text/csv"}},"type":"object","required":["file_name","file_size"],"title":"PresignedUploadUrlRequest"},"PresignedUploadUrlResponse":{"properties":{"upload_url":{"type":"string","title":"Upload Url"},"file_key":{"type":"string","title":"File Key"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["upload_url","file_key","expires_in"],"title":"PresignedUploadUrlResponse"},"ProcessDocumentRequestSchema":{"properties":{"document_uuid":{"type":"string","title":"Document Uuid","description":"Document UUID to process"},"s3_key":{"type":"string","title":"S3 Key","description":"S3 key of the uploaded file"},"retrieval_mode":{"type":"string","title":"Retrieval Mode","description":"Retrieval mode: 'chunked' for vector search or 'full_document' for full text retrieval","default":"chunked"}},"type":"object","required":["document_uuid","s3_key"],"title":"ProcessDocumentRequestSchema","description":"Request schema for triggering document processing."},"PropertyLayoutOptions":{"properties":{"column_span":{"anyOf":[{"type":"integer","maximum":12.0,"minimum":1.0},{"type":"null"}],"title":"Column Span","description":"Number of columns to occupy in the editor's 12-column grid."}},"additionalProperties":false,"type":"object","title":"PropertyLayoutOptions","description":"Renderer layout hints for a property in the node editor."},"PropertyOption":{"properties":{"value":{"anyOf":[{"type":"string"},{"type":"integer"},{"type":"boolean"},{"type":"number"}],"title":"Value"},"label":{"type":"string","title":"Label"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"}},"additionalProperties":false,"type":"object","required":["value","label"],"title":"PropertyOption","description":"An option in an options or multi_options dropdown."},"PropertyRendererOptions":{"properties":{"layout":{"anyOf":[{"$ref":"#/components/schemas/PropertyLayoutOptions"},{"type":"null"}]},"number_input":{"anyOf":[{"$ref":"#/components/schemas/NumberInputOptions"},{"type":"null"}]}},"additionalProperties":false,"type":"object","title":"PropertyRendererOptions","description":"Typed renderer metadata for node properties.\n\nAdd new renderer behavior here instead of using free-form property metadata."},"PropertySpec":{"properties":{"name":{"type":"string","title":"Name"},"type":{"$ref":"#/components/schemas/PropertyType"},"display_name":{"type":"string","title":"Display Name"},"description":{"type":"string","minLength":1,"title":"Description","description":"Human-facing explanation shown in the UI."},"llm_hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Llm Hint","description":"LLM-only guidance; omitted from the UI."},"default":{"title":"Default"},"required":{"type":"boolean","title":"Required","default":false},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"display_options":{"anyOf":[{"$ref":"#/components/schemas/DisplayOptions"},{"type":"null"}]},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/PropertyOption"},"type":"array"},{"type":"null"}],"title":"Options"},"properties":{"anyOf":[{"items":{"$ref":"#/components/schemas/PropertySpec"},"type":"array"},{"type":"null"}],"title":"Properties"},"min_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Min Value"},"max_value":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Max Value"},"min_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Min Length"},"max_length":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Max Length"},"pattern":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Pattern"},"editor":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Editor"},"renderer_options":{"anyOf":[{"$ref":"#/components/schemas/PropertyRendererOptions"},{"type":"null"}]}},"additionalProperties":false,"type":"object","required":["name","type","display_name","description"],"title":"PropertySpec","description":"Single field on a node.\n\ndescription is HUMAN-FACING \u2014 shown under the field in the edit\ndialog. Keep it concise and explain what the field does.\n\nllm_hint is LLM-FACING \u2014 appears only in the get_node_type MCP\nresponse and in SDK schema output. Use it for catalog tool references\n(e.g., "Use list_recordings"), array shape, expected value idioms,\nor anything that would be noise in the UI. Optional; omit when the\ndescription already suffices for both audiences."},"PropertyType":{"type":"string","enum":["string","number","boolean","options","multi_options","fixed_collection","json","tool_refs","document_refs","recording_ref","credential_ref","mention_textarea","url"],"title":"PropertyType","description":"Bounded vocabulary of property types the renderer dispatches on.\n\nAdding a value here requires a matching arm in the frontend\n switch and (where relevant) the SDK codegen template."},"ProviderConnectionCreate":{"properties":{"name":{"type":"string","maxLength":128,"minLength":1,"title":"Name"},"provider":{"type":"string","maxLength":64,"minLength":1,"title":"Provider"},"credentials":{"additionalProperties":true,"type":"object","title":"Credentials"},"connection_settings":{"additionalProperties":true,"type":"object","title":"Connection Settings"}},"additionalProperties":false,"type":"object","required":["name","provider"],"title":"ProviderConnectionCreate"},"ProviderConnectionResponse":{"properties":{"uuid":{"type":"string","format":"uuid","title":"Uuid"},"name":{"type":"string","title":"Name"},"provider":{"type":"string","title":"Provider"},"connection_settings":{"additionalProperties":true,"type":"object","title":"Connection Settings"},"configured_credentials":{"items":{"type":"string"},"type":"array","title":"Configured Credentials"},"revision":{"type":"integer","title":"Revision"},"is_active":{"type":"boolean","title":"Is Active"}},"additionalProperties":false,"type":"object","required":["uuid","name","provider","connection_settings","configured_credentials","revision","is_active"],"title":"ProviderConnectionResponse"},"ProviderConnectionUpdate":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":128,"minLength":1},{"type":"null"}],"title":"Name"},"credentials":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Credentials"},"connection_settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Connection Settings"},"revision":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Revision"}},"additionalProperties":false,"type":"object","title":"ProviderConnectionUpdate"},"ProviderSetupChecklist":{"properties":{"ready_for_outbound":{"type":"boolean","title":"Ready For Outbound"},"outbound_blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Blocked Reason"},"steps":{"items":{"$ref":"#/components/schemas/SetupStep"},"type":"array","title":"Steps"},"docs_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Url"}},"type":"object","required":["ready_for_outbound","outbound_blocked_reason","steps"],"title":"ProviderSetupChecklist","description":"A configuration's setup progress, as computed by its provider.\n\nready_for_outboundis derived rather than reported independently so a\nprovider cannot claim readiness while leaving a blocking step incomplete."},"ProviderSyncStatus":{"properties":{"ok":{"type":"boolean","title":"Ok"},"message":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Message"}},"type":"object","required":["ok"],"title":"ProviderSyncStatus","description":"Result of pushing a phone-number change to the upstream provider.\n\nReturned alongside create/update responses when the route attempted to\nsync inbound webhook configuration.ok=False is a warning, not a\nfatal error \u2014 the DB write succeeded."},"PublicEmbedChatEndRequest":{"properties":{"expected_revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Revision"}},"type":"object","title":"PublicEmbedChatEndRequest"},"PublicEmbedChatMessage":{"properties":{"text":{"type":"string","title":"Text"},"created_at":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created At"}},"type":"object","required":["text"],"title":"PublicEmbedChatMessage"},"PublicEmbedChatMessageRequest":{"properties":{"text":{"type":"string","maxLength":4000,"minLength":1,"title":"Text"},"expected_revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Revision"}},"type":"object","required":["text"],"title":"PublicEmbedChatMessageRequest"},"PublicEmbedChatMessageStreamEvent":{"properties":{"type":{"type":"string","const":"message","title":"Type","default":"message"},"turn_id":{"type":"string","title":"Turn Id"},"index":{"type":"integer","title":"Index"},"message":{"$ref":"#/components/schemas/PublicEmbedChatMessage"}},"type":"object","required":["turn_id","index","message"],"title":"PublicEmbedChatMessageStreamEvent"},"PublicEmbedChatSessionResponse":{"properties":{"revision":{"type":"integer","title":"Revision"},"state":{"type":"string","title":"State"},"is_completed":{"type":"boolean","title":"Is Completed"},"turns":{"items":{"$ref":"#/components/schemas/PublicEmbedChatTurn"},"type":"array","title":"Turns"}},"type":"object","required":["revision","state","is_completed","turns"],"title":"PublicEmbedChatSessionResponse"},"PublicEmbedChatSessionStreamEvent":{"properties":{"type":{"type":"string","enum":["session","complete"],"title":"Type"},"session":{"$ref":"#/components/schemas/PublicEmbedChatSessionResponse"},"session_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Session Token"},"workflow_run_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Run Id"}},"type":"object","required":["type","session"],"title":"PublicEmbedChatSessionStreamEvent"},"PublicEmbedChatStreamError":{"properties":{"type":{"type":"string","const":"error","title":"Type","default":"error"},"message":{"type":"string","title":"Message","default":"Assistant failed to respond"}},"type":"object","title":"PublicEmbedChatStreamError"},"PublicEmbedChatTurn":{"properties":{"id":{"type":"string","title":"Id"},"status":{"type":"string","title":"Status"},"user_message":{"anyOf":[{"$ref":"#/components/schemas/PublicEmbedChatMessage"},{"type":"null"}]},"assistant_message":{"anyOf":[{"$ref":"#/components/schemas/PublicEmbedChatMessage"},{"type":"null"}]},"assistant_messages":{"anyOf":[{"items":{"$ref":"#/components/schemas/PublicEmbedChatMessage"},"type":"array"},{"type":"null"}],"title":"Assistant Messages"}},"type":"object","required":["id","status"],"title":"PublicEmbedChatTurn"},"PublishWorkflowRequest":{"properties":{"version_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Version Name"},"change_description":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Change Description"}},"additionalProperties":false,"type":"object","title":"PublishWorkflowRequest"},"RecordingCreateRequestSchema":{"properties":{"recording_id":{"type":"string","title":"Recording Id","description":"Short recording ID from upload step"},"tts_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tts Provider","description":"TTS provider (e.g. elevenlabs)"},"tts_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tts Model","description":"TTS model name"},"tts_voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tts Voice Id","description":"TTS voice identifier"},"transcript":{"type":"string","title":"Transcript","description":"User-provided transcript of the recording"},"storage_key":{"type":"string","title":"Storage Key","description":"Storage key from upload step"},"metadata":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Metadata","description":"Optional metadata (file_size, duration, etc.)"}},"type":"object","required":["recording_id","transcript","storage_key"],"title":"RecordingCreateRequestSchema","description":"Request schema for creating a recording record after upload."},"RecordingListResponseSchema":{"properties":{"recordings":{"items":{"$ref":"#/components/schemas/RecordingResponseSchema"},"type":"array","title":"Recordings"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["recordings","total"],"title":"RecordingListResponseSchema","description":"Response schema for list of recordings."},"RecordingResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"recording_id":{"type":"string","title":"Recording Id"},"workflow_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Id"},"organization_id":{"type":"integer","title":"Organization Id"},"tts_provider":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tts Provider"},"tts_model":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tts Model"},"tts_voice_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Tts Voice Id"},"transcript":{"type":"string","title":"Transcript"},"storage_key":{"type":"string","title":"Storage Key"},"storage_backend":{"type":"string","title":"Storage Backend"},"metadata":{"additionalProperties":true,"type":"object","title":"Metadata"},"created_by":{"type":"integer","title":"Created By"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_active":{"type":"boolean","title":"Is Active"}},"type":"object","required":["id","recording_id","organization_id","transcript","storage_key","storage_backend","metadata","created_by","created_at","is_active"],"title":"RecordingResponseSchema","description":"Response schema for a single recording."},"RecordingUpdateRequestSchema":{"properties":{"recording_id":{"type":"string","maxLength":64,"minLength":1,"pattern":"^[a-zA-Z0-9_-]+$","title":"Recording Id","description":"New descriptive recording ID (letters, numbers, hyphens, underscores only)"}},"type":"object","required":["recording_id"],"title":"RecordingUpdateRequestSchema","description":"Request schema for updating a recording's ID."},"RecordingUploadResponseSchema":{"properties":{"upload_url":{"type":"string","title":"Upload Url","description":"Presigned URL for uploading the audio"},"recording_id":{"type":"string","title":"Recording Id","description":"Short unique recording ID"},"storage_key":{"type":"string","title":"Storage Key","description":"Storage key where file will be uploaded"}},"type":"object","required":["upload_url","recording_id","storage_key"],"title":"RecordingUploadResponseSchema","description":"Response schema with presigned upload URL."},"RedialCampaignRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name","description":"Name for the redial campaign"},"retry_on_voicemail":{"type":"boolean","title":"Retry On Voicemail","default":true},"retry_on_no_answer":{"type":"boolean","title":"Retry On No Answer","default":true},"retry_on_busy":{"type":"boolean","title":"Retry On Busy","default":true},"retry_config":{"anyOf":[{"$ref":"#/components/schemas/RetryConfigRequest"},{"type":"null"}]}},"type":"object","title":"RedialCampaignRequest"},"RetryConfigRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"max_retries":{"type":"integer","maximum":10.0,"minimum":0.0,"title":"Max Retries","default":2},"retry_delay_seconds":{"type":"integer","maximum":3600.0,"minimum":30.0,"title":"Retry Delay Seconds","default":120},"retry_on_busy":{"type":"boolean","title":"Retry On Busy","default":true},"retry_on_no_answer":{"type":"boolean","title":"Retry On No Answer","default":true},"retry_on_voicemail":{"type":"boolean","title":"Retry On Voicemail","default":true}},"type":"object","title":"RetryConfigRequest"},"RetryConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"max_retries":{"type":"integer","title":"Max Retries"},"retry_delay_seconds":{"type":"integer","title":"Retry Delay Seconds"},"retry_on_busy":{"type":"boolean","title":"Retry On Busy"},"retry_on_no_answer":{"type":"boolean","title":"Retry On No Answer"},"retry_on_voicemail":{"type":"boolean","title":"Retry On Voicemail"}},"type":"object","required":["enabled","max_retries","retry_delay_seconds","retry_on_busy","retry_on_no_answer","retry_on_voicemail"],"title":"RetryConfigResponse"},"RewindTextChatSessionRequest":{"properties":{"cursor_turn_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Cursor Turn Id"},"expected_revision":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Expected Revision"}},"type":"object","title":"RewindTextChatSessionRequest"},"S3SignedUrlResponse":{"properties":{"url":{"type":"string","title":"Url"},"expires_in":{"type":"integer","title":"Expires In"}},"type":"object","required":["url","expires_in"],"title":"S3SignedUrlResponse"},"SIPConnectivityDetails":{"properties":{"provider_display_name":{"type":"string","title":"Provider Display Name"},"regions":{"items":{"$ref":"#/components/schemas/SIPRegionDetails"},"type":"array","title":"Regions"}},"type":"object","required":["provider_display_name","regions"],"title":"SIPConnectivityDetails","description":"Provider-supplied SIP connection details displayed to customers."},"SIPRegionDetails":{"properties":{"region":{"type":"string","title":"Region"},"inbound_transports":{"items":{"$ref":"#/components/schemas/SIPTransportDetails"},"type":"array","title":"Inbound Transports"},"outbound_origin_ip":{"type":"string","title":"Outbound Origin Ip"}},"type":"object","required":["region","inbound_transports","outbound_origin_ip"],"title":"SIPRegionDetails","description":"Inbound and outbound SIP details for one provider region."},"SIPTransportDetails":{"properties":{"transport":{"type":"string","title":"Transport"},"hostname":{"type":"string","title":"Hostname"},"port":{"type":"integer","title":"Port"},"uri":{"type":"string","title":"Uri"}},"type":"object","required":["transport","hostname","port","uri"],"title":"SIPTransportDetails","description":"Connection details for one supported inbound SIP transport."},"ScheduleConfigRequest":{"properties":{"enabled":{"type":"boolean","title":"Enabled","default":true},"timezone":{"type":"string","title":"Timezone","default":"UTC"},"slots":{"items":{"$ref":"#/components/schemas/TimeSlotRequest"},"type":"array","maxItems":50,"minItems":1,"title":"Slots"}},"type":"object","required":["slots"],"title":"ScheduleConfigRequest"},"ScheduleConfigResponse":{"properties":{"enabled":{"type":"boolean","title":"Enabled"},"timezone":{"type":"string","title":"Timezone"},"slots":{"items":{"$ref":"#/components/schemas/TimeSlotResponse"},"type":"array","title":"Slots"}},"type":"object","required":["enabled","timezone","slots"],"title":"ScheduleConfigResponse"},"ServiceKeyResponse":{"properties":{"name":{"type":"string","title":"Name"},"id":{"type":"integer","title":"Id"},"key_prefix":{"type":"string","title":"Key Prefix"},"is_active":{"type":"boolean","title":"Is Active"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Last Used At"},"expires_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Expires At"},"archived_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Archived At"},"created_by":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Created By"}},"type":"object","required":["name","id","key_prefix","is_active","created_at"],"title":"ServiceKeyResponse"},"ServiceOverride":{"properties":{"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"provider_connection_uuid":{"anyOf":[{"type":"string","format":"uuid"},{"type":"null"}],"title":"Provider Connection Uuid"}},"additionalProperties":false,"type":"object","title":"ServiceOverride"},"ServiceSelection":{"properties":{"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"provider_connection_uuid":{"type":"string","format":"uuid","title":"Provider Connection Uuid"}},"additionalProperties":false,"type":"object","required":["provider_connection_uuid"],"title":"ServiceSelection"},"SetupStep":{"properties":{"key":{"type":"string","title":"Key"},"title":{"type":"string","title":"Title"},"description":{"type":"string","title":"Description"},"complete":{"type":"boolean","title":"Complete"},"blocks_outbound":{"type":"boolean","title":"Blocks Outbound","default":false}},"type":"object","required":["key","title","description","complete"],"title":"SetupStep","description":"One thing the customer must do before a configuration can carry calls.\n\nblocks_outboundseparates \"not done yet\" from \"outbound calls will\nfail\". Inbound-only steps are reported so the checklist is complete\nwithout making them gate the Phone Call button."},"SignupRequest":{"properties":{"email":{"type":"string","format":"email","title":"Email"},"password":{"type":"string","title":"Password"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"}},"type":"object","required":["email","password"],"title":"SignupRequest"},"SuperuserWorkflowRunResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"workflow_id":{"type":"integer","title":"Workflow Id"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"user_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"User Id"},"organization_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"},"organization_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Organization Name"},"mode":{"type":"string","title":"Mode"},"is_completed":{"type":"boolean","title":"Is Completed"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"transcript_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Url"},"usage_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage Info"},"cost_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cost Info"},"initial_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Initial Context"},"gathered_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gathered Context"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","name","workflow_id","workflow_name","user_id","organization_id","organization_name","mode","is_completed","recording_url","transcript_url","usage_info","cost_info","initial_context","gathered_context","created_at"],"title":"SuperuserWorkflowRunResponse"},"SuperuserWorkflowRunsListResponse":{"properties":{"workflow_runs":{"items":{"$ref":"#/components/schemas/SuperuserWorkflowRunResponse"},"type":"array","title":"Workflow Runs"},"total_count":{"type":"integer","title":"Total Count"},"page":{"type":"integer","title":"Page"},"limit":{"type":"integer","title":"Limit"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["workflow_runs","total_count","page","limit","total_pages"],"title":"SuperuserWorkflowRunsListResponse"},"TTSCacheEntry":{"properties":{"id":{"type":"string","title":"Id"},"text_preview":{"type":"string","title":"Text Preview"},"provider":{"type":"string","title":"Provider"},"model":{"type":"string","title":"Model"},"voice_id":{"type":"string","title":"Voice Id"},"duration_seconds":{"type":"number","minimum":0.0,"title":"Duration Seconds"},"hit_count":{"type":"integer","minimum":0.0,"title":"Hit Count","description":"Synthesis requests served from this entry; excludes previews"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"last_used_at":{"type":"string","format":"date-time","title":"Last Used At"}},"type":"object","required":["id","text_preview","provider","model","voice_id","duration_seconds","hit_count","created_at","last_used_at"],"title":"TTSCacheEntry"},"TTSCacheInvalidation":{"properties":{"removed":{"type":"integer","title":"Removed"}},"type":"object","required":["removed"],"title":"TTSCacheInvalidation"},"TTSCacheList":{"properties":{"entries":{"items":{"$ref":"#/components/schemas/TTSCacheEntry"},"type":"array","title":"Entries"},"total":{"type":"integer","title":"Total"}},"type":"object","required":["entries","total"],"title":"TTSCacheList"},"TelephonyConfigWarningsResponse":{"properties":{"telnyx_missing_webhook_public_key_count":{"type":"integer","title":"Telnyx Missing Webhook Public Key Count"},"vonage_missing_signature_secret_count":{"type":"integer","title":"Vonage Missing Signature Secret Count"}},"type":"object","required":["telnyx_missing_webhook_public_key_count","vonage_missing_signature_secret_count"],"title":"TelephonyConfigWarningsResponse","description":"Aggregated telephony-configuration warning counts for the user's org.\n\nDrives the page banner and nav badge that nudge customers to finish\noptional-but-recommended configuration steps. Shape is a flat dict so\nnew warning types can be added without breaking the client."},"TelephonyConfigurationCreateRequest":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"is_default_outbound":{"type":"boolean","title":"Is Default Outbound","default":false},"config":{"oneOf":[{"$ref":"#/components/schemas/ARIConfigurationRequest"},{"$ref":"#/components/schemas/CloudonixConfigurationRequest"},{"$ref":"#/components/schemas/ExotelConfigurationRequest"},{"$ref":"#/components/schemas/PlivoConfigurationRequest"},{"$ref":"#/components/schemas/TelnyxConfigurationRequest"},{"$ref":"#/components/schemas/TwilioConfigurationRequest"},{"$ref":"#/components/schemas/VobizConfigurationRequest"},{"$ref":"#/components/schemas/VonageConfigurationRequest"},{"$ref":"#/components/schemas/WhatsAppConfigurationRequest"}],"title":"Config","discriminator":{"propertyName":"provider","mapping":{"ari":"#/components/schemas/ARIConfigurationRequest","cloudonix":"#/components/schemas/CloudonixConfigurationRequest","exotel":"#/components/schemas/ExotelConfigurationRequest","plivo":"#/components/schemas/PlivoConfigurationRequest","telnyx":"#/components/schemas/TelnyxConfigurationRequest","twilio":"#/components/schemas/TwilioConfigurationRequest","vobiz":"#/components/schemas/VobizConfigurationRequest","vonage":"#/components/schemas/VonageConfigurationRequest","whatsapp":"#/components/schemas/WhatsAppConfigurationRequest"}}}},"type":"object","required":["name","config"],"title":"TelephonyConfigurationCreateRequest","description":"Body forPOST /telephony-configs.\n\nconfig carries the provider-specific credential fields (the same\ndiscriminated union used by the legacy single-config endpoint). Any\nfrom_numberson the inner config are ignored \u2014 phone numbers are\nmanaged via the dedicated phone-numbers endpoints."},"TelephonyConfigurationDetail":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"provider":{"type":"string","title":"Provider"},"connectivity":{"type":"string","enum":["api","sip"],"title":"Connectivity","default":"api"},"is_default_outbound":{"type":"boolean","title":"Is Default Outbound"},"inactive":{"type":"boolean","title":"Inactive","default":false},"inactive_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Inactive Since"},"inactive_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inactive Reason"},"credentials":{"additionalProperties":true,"type":"object","title":"Credentials"},"sip_connectivity":{"anyOf":[{"$ref":"#/components/schemas/SIPConnectivityDetails"},{"type":"null"}]},"supports_outbound":{"type":"boolean","title":"Supports Outbound","default":true},"setup_checklist":{"anyOf":[{"$ref":"#/components/schemas/ProviderSetupChecklist"},{"type":"null"}]},"supports_trunks":{"type":"boolean","title":"Supports Trunks","default":false},"trunks":{"items":{"$ref":"#/components/schemas/TrunkResponse"},"type":"array","title":"Trunks"},"supports_phone_number_sync":{"type":"boolean","title":"Supports Phone Number Sync","default":false},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","provider","is_default_outbound","credentials","created_at","updated_at"],"title":"TelephonyConfigurationDetail","description":"Body ofGET /telephony-configs/{id}\u2014 credentials are masked."},"TelephonyConfigurationListItem":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"provider":{"type":"string","title":"Provider"},"connectivity":{"type":"string","enum":["api","sip"],"title":"Connectivity","default":"api"},"is_default_outbound":{"type":"boolean","title":"Is Default Outbound"},"inactive":{"type":"boolean","title":"Inactive","default":false},"inactive_since":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Inactive Since"},"inactive_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Inactive Reason"},"phone_number_count":{"type":"integer","title":"Phone Number Count","default":0},"supports_outbound":{"type":"boolean","title":"Supports Outbound","default":true},"is_ready_for_outbound":{"type":"boolean","title":"Is Ready For Outbound","default":true},"outbound_blocked_reason":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Outbound Blocked Reason"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","provider","is_default_outbound","created_at","updated_at"],"title":"TelephonyConfigurationListItem","description":"One row inGET /telephony-configs."},"TelephonyConfigurationListResponse":{"properties":{"configurations":{"items":{"$ref":"#/components/schemas/TelephonyConfigurationListItem"},"type":"array","title":"Configurations"}},"type":"object","required":["configurations"],"title":"TelephonyConfigurationListResponse"},"TelephonyConfigurationUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Name"},"config":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/ARIConfigurationRequest"},{"$ref":"#/components/schemas/CloudonixConfigurationRequest"},{"$ref":"#/components/schemas/ExotelConfigurationRequest"},{"$ref":"#/components/schemas/PlivoConfigurationRequest"},{"$ref":"#/components/schemas/TelnyxConfigurationRequest"},{"$ref":"#/components/schemas/TwilioConfigurationRequest"},{"$ref":"#/components/schemas/VobizConfigurationRequest"},{"$ref":"#/components/schemas/VonageConfigurationRequest"},{"$ref":"#/components/schemas/WhatsAppConfigurationRequest"}],"discriminator":{"propertyName":"provider","mapping":{"ari":"#/components/schemas/ARIConfigurationRequest","cloudonix":"#/components/schemas/CloudonixConfigurationRequest","exotel":"#/components/schemas/ExotelConfigurationRequest","plivo":"#/components/schemas/PlivoConfigurationRequest","telnyx":"#/components/schemas/TelnyxConfigurationRequest","twilio":"#/components/schemas/TwilioConfigurationRequest","vobiz":"#/components/schemas/VobizConfigurationRequest","vonage":"#/components/schemas/VonageConfigurationRequest","whatsapp":"#/components/schemas/WhatsAppConfigurationRequest"}}},{"type":"null"}],"title":"Config"}},"type":"object","title":"TelephonyConfigurationUpdateRequest","description":"Body for PUT /telephony-configs/{id}. Partial update."},"TelephonyProviderMetadata":{"properties":{"provider":{"type":"string","title":"Provider"},"display_name":{"type":"string","title":"Display Name"},"connectivity":{"type":"string","enum":["api","sip"],"title":"Connectivity","default":"api"},"supports_outbound":{"type":"boolean","title":"Supports Outbound","default":true},"fields":{"items":{"$ref":"#/components/schemas/TelephonyProviderUIField"},"type":"array","title":"Fields"},"docs_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Docs Url"}},"type":"object","required":["provider","display_name","fields"],"title":"TelephonyProviderMetadata","description":"UI form metadata for a single telephony provider."},"TelephonyProviderUICondition":{"properties":{"field":{"type":"string","title":"Field"},"equals":{"title":"Equals"}},"type":"object","required":["field","equals"],"title":"TelephonyProviderUICondition"},"TelephonyProviderUIField":{"properties":{"name":{"type":"string","title":"Name"},"label":{"type":"string","title":"Label"},"type":{"type":"string","title":"Type"},"required":{"type":"boolean","title":"Required"},"sensitive":{"type":"boolean","title":"Sensitive"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"placeholder":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Placeholder"},"options":{"anyOf":[{"items":{"$ref":"#/components/schemas/TelephonyProviderUIOption"},"type":"array"},{"type":"null"}],"title":"Options"},"visible_when":{"anyOf":[{"$ref":"#/components/schemas/TelephonyProviderUICondition"},{"type":"null"}]},"section":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Section"}},"type":"object","required":["name","label","type","required","sensitive"],"title":"TelephonyProviderUIField","description":"One form field on a telephony provider's configuration UI."},"TelephonyProviderUIOption":{"properties":{"value":{"type":"string","title":"Value"},"label":{"type":"string","title":"Label"}},"type":"object","required":["value","label"],"title":"TelephonyProviderUIOption"},"TelephonyProvidersMetadataResponse":{"properties":{"providers":{"items":{"$ref":"#/components/schemas/TelephonyProviderMetadata"},"type":"array","title":"Providers"}},"type":"object","required":["providers"],"title":"TelephonyProvidersMetadataResponse","description":"List of UI form definitions used by the telephony-config screen."},"TelnyxConfigurationRequest":{"properties":{"provider":{"type":"string","const":"telnyx","title":"Provider","default":"telnyx"},"api_key":{"type":"string","title":"Api Key","description":"Telnyx API Key"},"connection_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Connection Id","description":"Telnyx Call Control Application ID (connection_id). If omitted, a Call Control Application is auto-created on save and its id is stored on the configuration."},"webhook_public_key":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Webhook Public Key","description":"Webhook public key from Mission Control Portal \u2192 Keys & Credentials \u2192 Public Key. Used to verify Telnyx webhook signatures."}},"type":"object","required":["api_key"],"title":"TelnyxConfigurationRequest","description":"Request schema for Telnyx configuration."},"TextChatInactivityTimeoutConstraints":{"properties":{"default_seconds":{"type":"integer","title":"Default Seconds","default":1800},"minimum_seconds":{"type":"integer","title":"Minimum Seconds","default":60},"maximum_seconds":{"type":"integer","title":"Maximum Seconds","default":10500}},"type":"object","title":"TextChatInactivityTimeoutConstraints","description":"Backend-owned timeout metadata consumed by generated API clients."},"TextChatSessionStreamEvent":{"properties":{"type":{"type":"string","enum":["session","complete"],"title":"Type"},"session":{"$ref":"#/components/schemas/WorkflowRunTextSessionResponse"}},"type":"object","required":["type","session"],"title":"TextChatSessionStreamEvent"},"TextChatStreamError":{"properties":{"type":{"type":"string","const":"error","title":"Type"},"message":{"type":"string","title":"Message"}},"type":"object","required":["type","message"],"title":"TextChatStreamError"},"TextChatTurnEvent":{"properties":{"type":{"type":"string","title":"Type"},"created_at":{"type":"string","title":"Created At"},"payload":{"additionalProperties":true,"type":"object","title":"Payload"}},"type":"object","required":["type","created_at","payload"],"title":"TextChatTurnEvent"},"TextChatTurnStreamEvent":{"properties":{"type":{"type":"string","const":"turn_event","title":"Type"},"turn_id":{"type":"string","title":"Turn Id"},"event":{"$ref":"#/components/schemas/TextChatTurnEvent"}},"type":"object","required":["type","turn_id","event"],"title":"TextChatTurnStreamEvent"},"TimeSlotRequest":{"properties":{"day_of_week":{"type":"integer","maximum":6.0,"minimum":0.0,"title":"Day Of Week"},"start_time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"Start Time"},"end_time":{"type":"string","pattern":"^\\d{2}:\\d{2}$","title":"End Time"}},"type":"object","required":["day_of_week","start_time","end_time"],"title":"TimeSlotRequest"},"TimeSlotResponse":{"properties":{"day_of_week":{"type":"integer","title":"Day Of Week"},"start_time":{"type":"string","title":"Start Time"},"end_time":{"type":"string","title":"End Time"}},"type":"object","required":["day_of_week","start_time","end_time"],"title":"TimeSlotResponse"},"ToolDelayedAudioMessage":{"properties":{"type":{"type":"string","const":"audio","title":"Type"},"recording_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Recording Id"},"event":{"type":"string","const":"delayed","title":"Event"},"after_ms":{"type":"integer","maximum":120000.0,"exclusiveMinimum":0.0,"title":"After Ms"}},"additionalProperties":false,"type":"object","required":["type","recording_id","event","after_ms"],"title":"ToolDelayedAudioMessage"},"ToolDelayedTextMessage":{"properties":{"type":{"type":"string","const":"text","title":"Type"},"text":{"type":"string","minLength":1,"title":"Text"},"event":{"type":"string","const":"delayed","title":"Event"},"after_ms":{"type":"integer","maximum":120000.0,"exclusiveMinimum":0.0,"title":"After Ms"}},"additionalProperties":false,"type":"object","required":["type","text","event","after_ms"],"title":"ToolDelayedTextMessage"},"ToolParameter":{"properties":{"name":{"type":"string","title":"Name","description":"Parameter name used as a key in the tool request body.","llm_hint":"Use a stable snake_case name the agent can naturally fill."},"type":{"type":"string","enum":["string","number","boolean","object","array"],"title":"Type","description":"JSON type for the parameter value.","llm_hint":"Allowed values are string, number, boolean, object, and array."},"description":{"type":"string","title":"Description","description":"Description shown to the model for this parameter.","llm_hint":"Write this as an instruction to the agent: what value to provide and when."},"required":{"type":"boolean","title":"Required","description":"Whether this parameter is required when the tool is called.","default":true}},"type":"object","required":["name","type","description"],"title":"ToolParameter","description":"A parameter that the tool accepts from the model at call time."},"ToolResponse":{"properties":{"id":{"type":"integer","title":"Id"},"tool_uuid":{"type":"string","title":"Tool Uuid"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"category":{"type":"string","title":"Category"},"icon":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon"},"icon_color":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Icon Color"},"status":{"type":"string","title":"Status"},"definition":{"additionalProperties":true,"type":"object","title":"Definition"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"},"created_by":{"anyOf":[{"$ref":"#/components/schemas/CreatedByResponse"},{"type":"null"}]}},"type":"object","required":["id","tool_uuid","name","description","category","icon","icon_color","status","definition","created_at","updated_at"],"title":"ToolResponse","description":"Response schema for a reusable tool."},"ToolStartAudioMessage":{"properties":{"type":{"type":"string","const":"audio","title":"Type"},"recording_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Recording Id"},"event":{"type":"string","const":"start","title":"Event"}},"additionalProperties":false,"type":"object","required":["type","recording_id","event"],"title":"ToolStartAudioMessage"},"ToolStartTextMessage":{"properties":{"type":{"type":"string","const":"text","title":"Type"},"text":{"type":"string","minLength":1,"title":"Text"},"event":{"type":"string","const":"start","title":"Event"}},"additionalProperties":false,"type":"object","required":["type","text","event"],"title":"ToolStartTextMessage"},"ToolTestRequest":{"properties":{"llm_params":{"additionalProperties":true,"type":"object","title":"Llm Params","description":"Values for parameters normally supplied by the model."},"preset_params":{"additionalProperties":true,"type":"object","title":"Preset Params","description":"Resolved values for parameters normally supplied from presets."}},"type":"object","title":"ToolTestRequest","description":"Request body for testing an HTTP API tool outside a live call."},"ToolTestResponse":{"properties":{"status":{"type":"string","title":"Status"},"status_code":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Status Code"},"data":{"anyOf":[{},{"type":"null"}],"title":"Data"},"error":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Error"},"hint":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Hint"},"request_method":{"type":"string","title":"Request Method"},"request_url":{"type":"string","title":"Request Url"},"request_headers":{"additionalProperties":{"type":"string"},"type":"object","title":"Request Headers"},"request_body":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request Body"},"request_params":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Request Params"},"duration_ms":{"type":"integer","title":"Duration Ms"}},"type":"object","required":["status","request_method","request_url","duration_ms"],"title":"ToolTestResponse","description":"Result of testing an HTTP API tool."},"TrafficDefinitionStats":{"properties":{"definition_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Definition Id"},"version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"},"attempts":{"type":"integer","title":"Attempts"}},"type":"object","required":["definition_id","version_number","attempts"],"title":"TrafficDefinitionStats"},"TrafficSplitRequest":{"properties":{"variants":{"items":{"$ref":"#/components/schemas/TrafficVariantRequest"},"type":"array","maxItems":5,"minItems":1,"title":"Variants"}},"type":"object","required":["variants"],"title":"TrafficSplitRequest"},"TrafficSplitResponse":{"properties":{"revision":{"type":"integer","title":"Revision"},"variants":{"items":{"$ref":"#/components/schemas/TrafficVariantResponse"},"type":"array","title":"Variants"}},"type":"object","required":["revision","variants"],"title":"TrafficSplitResponse"},"TrafficVariantRequest":{"properties":{"workflow_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Workflow Id"},"workflow_definition_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Workflow Definition Id"},"weight":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Weight"}},"type":"object","required":["workflow_id","weight"],"title":"TrafficVariantRequest"},"TrafficVariantResponse":{"properties":{"workflow_id":{"type":"integer","exclusiveMinimum":0.0,"title":"Workflow Id"},"workflow_definition_id":{"anyOf":[{"type":"integer","exclusiveMinimum":0.0},{"type":"null"}],"title":"Workflow Definition Id"},"weight":{"type":"integer","maximum":100.0,"minimum":1.0,"title":"Weight"},"id":{"type":"string","title":"Id"},"workflow_name":{"type":"string","title":"Workflow Name"},"version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"}},"type":"object","required":["workflow_id","weight","id","workflow_name"],"title":"TrafficVariantResponse"},"TrafficVariantStats":{"properties":{"id":{"type":"string","title":"Id"},"workflow_id":{"type":"integer","title":"Workflow Id"},"workflow_name":{"type":"string","title":"Workflow Name"},"workflow_definition_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Workflow Definition Id"},"version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"},"target_weight":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Target Weight"},"attempts":{"type":"integer","title":"Attempts","default":0},"completed":{"type":"integer","title":"Completed","default":0},"actual_percentage":{"type":"number","title":"Actual Percentage","default":0},"states":{"additionalProperties":{"type":"integer"},"type":"object","title":"States"},"outcomes":{"additionalProperties":{"type":"integer"},"type":"object","title":"Outcomes"},"definitions":{"items":{"$ref":"#/components/schemas/TrafficDefinitionStats"},"type":"array","title":"Definitions"}},"type":"object","required":["id","workflow_id","workflow_name","workflow_definition_id","version_number","target_weight"],"title":"TrafficVariantStats"},"TransferAgentConfig":{"properties":{"workflow_id":{"type":"integer","title":"Workflow Id","description":"Id of the Dograh agent to transfer to. Must be in the same organization, and must not be a speech-to-speech agent.","llm_hint":"Name the tool after this agent, e.g. 'Transfer to Billing', and describe when to use it -- that is what the model routes on."},"greeting_mode":{"type":"string","enum":["start_greeting","continue","introduce_and_continue"],"title":"Greeting Mode","description":"How the destination agent opens. 'start_greeting' plays its Start Call greeting and waits for the caller. 'continue' skips the greeting and opens with a reply generated from the handover note. 'introduce_and_continue' speaks the introduction in the destination's own voice and then opens with a generated reply, so the caller hears who picked up without having to repeat themselves.","default":"start_greeting"},"introduction":{"anyOf":[{"type":"string","maxLength":500},{"type":"null"}],"title":"Introduction","description":"What the destination agent says as it takes over, in its own voice, before its first generated reply. Required with greeting_mode 'introduce_and_continue' and not accepted otherwise. Supports template variables."}},"additionalProperties":false,"type":"object","required":["workflow_id"],"title":"TransferAgentConfig","description":"Configuration for Transfer Agent tools.\n\nOne tool, one destination. An agent that can hand the caller to several\nplaces gets several of these tools, and the model chooses between them the\nway it chooses between any other tools -- by their names and descriptions.\nThat keeps the routing decision in the one place the model already reasons\nabout, and leaves nothing to configure here but where the call goes.\n\nMost of how a handoff sounds is fixed: the caller hears a ringer while the\nnext agent is prepared. The handover line is configurable because it is\ncaller-facing and Dograh runs in more than one language, and so is how the\nnext agent opens: an agent that greets callers on its own number should\nnot re-introduce itself mid-conversation, and one that only ever answers\nhandoffs needs a line of its own before it picks the conversation up."},"TransferAgentToolDefinition":{"properties":{"schema_version":{"type":"integer","title":"Schema Version","description":"Schema version.","default":1},"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolStartTextMessage"},{"$ref":"#/components/schemas/ToolStartAudioMessage"},{"$ref":"#/components/schemas/ToolDelayedTextMessage"},{"$ref":"#/components/schemas/ToolDelayedAudioMessage"}]},"type":"array","maxItems":220,"title":"Messages","description":"One start text message, with template variables supported. Omit to use the default handover line, or send an empty list for a silent handoff."},"type":{"type":"string","const":"transfer_agent","title":"Type","description":"Tool type."},"config":{"$ref":"#/components/schemas/TransferAgentConfig","description":"Transfer Agent configuration."}},"type":"object","required":["type","config"],"title":"TransferAgentToolDefinition","description":"Tool definition for Transfer Agent tools."},"TransferCallConfig":{"properties":{"introduction_enabled":{"type":"boolean","title":"Introduction Enabled","description":"Play a generated introduction in the agent's voice to both parties before connecting them. Supported for Twilio calls with a TTS provider. Realtime speech-to-speech agents and synthesis failures skip the introduction.","default":false},"introduction_prompt":{"type":"string","maxLength":2000,"title":"Introduction Prompt","description":"Instructions for the transfer introduction, including language.","default":"Briefly introduce this caller to the person receiving the transfer. Include their reason for calling, essential details, and any explicit language preference. Use the caller's preferred language. Keep it to one sentence, at most 25 words. Do not invent details."},"destination_source":{"type":"string","enum":["static","dynamic","context_mapping"],"title":"Destination Source","description":"Whether the destination is static/template, resolved by HTTP, or selected by ordered gathered/initial-context mapping rules.","default":"static"},"destination":{"type":"string","title":"Destination","description":"Phone number, SIP endpoint, or template to transfer the call to, e.g. +1234567890, PJSIP/1234, or {{initial_context.transfer_destination}}.","default":""},"timeout":{"type":"integer","maximum":120.0,"minimum":5.0,"title":"Timeout","description":"Maximum seconds to wait for the destination to answer.","default":30},"call_disposition":{"anyOf":[{"type":"string","maxLength":64},{"type":"null"}],"title":"Call Disposition","description":"Optional disposition to record after a successful transfer. When omitted, Dograh records its provider-specific transfer default."},"parameters":{"anyOf":[{"items":{"$ref":"#/components/schemas/ToolParameter"},"type":"array"},{"type":"null"}],"title":"Parameters","description":"Parameters the model may provide when calling this transfer tool, for example state, department, or transfer reason."},"resolver":{"anyOf":[{"$ref":"#/components/schemas/HttpTransferResolverConfig"},{"type":"null"}],"description":"Optional resolver that determines transfer routing at call time."},"context_mapping":{"anyOf":[{"$ref":"#/components/schemas/ContextDestinationMappingConfig"},{"type":"null"}],"description":"Optional ordered context-to-destination routing rules."}},"additionalProperties":false,"type":"object","title":"TransferCallConfig","description":"Configuration for Transfer Call tools."},"TransferCallToolDefinition":{"properties":{"schema_version":{"type":"integer","title":"Schema Version","description":"Schema version.","default":1},"messages":{"items":{"anyOf":[{"$ref":"#/components/schemas/ToolStartTextMessage"},{"$ref":"#/components/schemas/ToolStartAudioMessage"},{"$ref":"#/components/schemas/ToolDelayedTextMessage"},{"$ref":"#/components/schemas/ToolDelayedAudioMessage"}]},"type":"array","maxItems":220,"title":"Messages","description":"Configured speech. An empty list disables announcements. HTTP/MCP choose one start entry and one entry per delayed timing at random. End-call and transfer tools support one start entry only."},"type":{"type":"string","const":"transfer_call","title":"Type","description":"Tool type."},"config":{"$ref":"#/components/schemas/TransferCallConfig","description":"Transfer Call configuration."}},"type":"object","required":["type","config"],"title":"TransferCallToolDefinition","description":"Tool definition for Transfer Call tools."},"TriggerCallRequest":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"initial_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Initial Context"},"telephony_configuration_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Telephony Configuration Id"},"from_phone_number_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"From Phone Number Id"},"model_overrides":{"anyOf":[{"$ref":"#/components/schemas/ModelConfigurationOverride"},{"type":"null"}]}},"type":"object","required":["phone_number"],"title":"TriggerCallRequest","description":"Request model for triggering a call via API"},"TriggerCallResponse":{"properties":{"status":{"type":"string","title":"Status"},"workflow_run_id":{"type":"integer","title":"Workflow Run Id"},"workflow_run_name":{"type":"string","title":"Workflow Run Name"}},"type":"object","required":["status","workflow_run_id","workflow_run_name"],"title":"TriggerCallResponse","description":"Response model for successful call initiation"},"TrunkCreateRequest":{"properties":{"name":{"type":"string","maxLength":64,"minLength":1,"title":"Name"},"enabled":{"type":"boolean","title":"Enabled","default":true},"settings":{"additionalProperties":true,"type":"object","title":"Settings"}},"type":"object","required":["name"],"title":"TrunkCreateRequest"},"TrunkListResponse":{"properties":{"trunks":{"items":{"$ref":"#/components/schemas/TrunkResponse"},"type":"array","title":"Trunks"}},"type":"object","required":["trunks"],"title":"TrunkListResponse"},"TrunkResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"enabled":{"type":"boolean","title":"Enabled"},"settings":{"additionalProperties":true,"type":"object","title":"Settings"},"phone_number_count":{"type":"integer","title":"Phone Number Count","default":0},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"type":"string","format":"date-time","title":"Updated At"}},"type":"object","required":["id","name","enabled","settings","created_at","updated_at"],"title":"TrunkResponse","description":"One carrier path on a configuration.\n\nsettings is the provider's own trunk schema (validated on write against\nProviderSpec.trunk_settings_cls). The provider-side identifier is\nDograh's bookkeeping and is not exposed."},"TrunkUpdateRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":64,"minLength":1},{"type":"null"}],"title":"Name"},"enabled":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Enabled"},"settings":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Settings"}},"type":"object","title":"TrunkUpdateRequest","description":"Partial update \u2014 omitted fields keep their stored value."},"TurnCredentialsResponse":{"properties":{"username":{"type":"string","title":"Username"},"password":{"type":"string","title":"Password"},"ttl":{"type":"integer","title":"Ttl"},"uris":{"items":{"type":"string"},"type":"array","title":"Uris"}},"type":"object","required":["username","password","ttl","uris"],"title":"TurnCredentialsResponse","description":"Response model for TURN credentials."},"TwilioConfigurationRequest":{"properties":{"provider":{"type":"string","const":"twilio","title":"Provider","default":"twilio"},"account_sid":{"type":"string","title":"Account Sid","description":"Twilio Account SID"},"auth_token":{"type":"string","title":"Auth Token","description":"Twilio Auth Token"}},"type":"object","required":["account_sid","auth_token"],"title":"TwilioConfigurationRequest","description":"Request schema for Twilio configuration."},"UpdateCampaignRequest":{"properties":{"traffic_split":{"anyOf":[{"$ref":"#/components/schemas/TrafficSplitRequest"},{"type":"null"}]},"name":{"anyOf":[{"type":"string","maxLength":255,"minLength":1},{"type":"null"}],"title":"Name"},"retry_config":{"anyOf":[{"$ref":"#/components/schemas/RetryConfigRequest"},{"type":"null"}]},"max_concurrency":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Max Concurrency"},"rate_limit_per_second":{"anyOf":[{"type":"integer","minimum":1.0},{"type":"null"}],"title":"Rate Limit Per Second"},"schedule_config":{"anyOf":[{"$ref":"#/components/schemas/ScheduleConfigRequest"},{"type":"null"}]},"circuit_breaker":{"anyOf":[{"$ref":"#/components/schemas/CircuitBreakerConfigRequest"},{"type":"null"}]}},"type":"object","title":"UpdateCampaignRequest"},"UpdateCredentialRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"credential_type":{"anyOf":[{"$ref":"#/components/schemas/WebhookCredentialType"},{"type":"null"}]},"credential_data":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Credential Data"}},"type":"object","title":"UpdateCredentialRequest","description":"Request schema for updating a webhook credential."},"UpdateFolderRequest":{"properties":{"name":{"type":"string","maxLength":100,"minLength":1,"title":"Name"}},"type":"object","required":["name"],"title":"UpdateFolderRequest"},"UpdateToolRequest":{"properties":{"name":{"anyOf":[{"type":"string","maxLength":255},{"type":"null"}],"title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"icon":{"anyOf":[{"type":"string","maxLength":50},{"type":"null"}],"title":"Icon"},"icon_color":{"anyOf":[{"type":"string","maxLength":7},{"type":"null"}],"title":"Icon Color"},"definition":{"anyOf":[{"oneOf":[{"$ref":"#/components/schemas/HttpApiToolDefinition"},{"$ref":"#/components/schemas/EndCallToolDefinition"},{"$ref":"#/components/schemas/TransferCallToolDefinition"},{"$ref":"#/components/schemas/TransferAgentToolDefinition"},{"$ref":"#/components/schemas/CalculatorToolDefinition"},{"$ref":"#/components/schemas/McpToolDefinition"}],"discriminator":{"propertyName":"type","mapping":{"calculator":"#/components/schemas/CalculatorToolDefinition","end_call":"#/components/schemas/EndCallToolDefinition","http_api":"#/components/schemas/HttpApiToolDefinition","mcp":"#/components/schemas/McpToolDefinition","transfer_agent":"#/components/schemas/TransferAgentToolDefinition","transfer_call":"#/components/schemas/TransferCallToolDefinition"}}},{"type":"null"}],"title":"Definition"},"status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Status"}},"type":"object","title":"UpdateToolRequest","description":"Request schema for updating a reusable tool."},"UpdateWorkflowRequest":{"properties":{"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"workflow_definition":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Workflow Definition"},"template_context_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Context Variables"},"workflow_configurations":{"anyOf":[{"$ref":"#/components/schemas/WorkflowConfigurationDefaults"},{"type":"null"}]}},"type":"object","title":"UpdateWorkflowRequest"},"UpdateWorkflowStatusRequest":{"properties":{"status":{"type":"string","title":"Status"}},"type":"object","required":["status"],"title":"UpdateWorkflowStatusRequest"},"UpdateWorkflowVersionMetadataRequest":{"properties":{"version_name":{"anyOf":[{"type":"string","maxLength":100,"minLength":1},{"type":"null"}],"title":"Version Name"},"change_description":{"anyOf":[{"type":"string","maxLength":500,"minLength":1},{"type":"null"}],"title":"Change Description"}},"additionalProperties":false,"type":"object","title":"UpdateWorkflowVersionMetadataRequest","description":"Omitted fields are preserved; null clears a release note."},"UsageHistoryResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/WorkflowRunUsageResponse"},"type":"array","title":"Runs"},"total_dograh_tokens":{"type":"number","title":"Total Dograh Tokens"},"total_duration_seconds":{"type":"integer","title":"Total Duration Seconds"},"total_count":{"type":"integer","title":"Total Count"},"page":{"type":"integer","title":"Page"},"limit":{"type":"integer","title":"Limit"},"total_pages":{"type":"integer","title":"Total Pages"}},"type":"object","required":["runs","total_dograh_tokens","total_duration_seconds","total_count","page","limit","total_pages"],"title":"UsageHistoryResponse"},"UserConfigurationRequestResponseSchema":{"properties":{"llm":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Llm"},"tts":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Tts"},"stt":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Stt"},"embeddings":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Embeddings"},"realtime":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"string"},{"type":"number"},{"items":{"type":"string"},"type":"array"},{"type":"null"}]},"type":"object"},{"type":"null"}],"title":"Realtime"},"is_realtime":{"anyOf":[{"type":"boolean"},{"type":"null"}],"title":"Is Realtime"},"test_phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Test Phone Number"},"timezone":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Timezone"},"organization_pricing":{"anyOf":[{"additionalProperties":{"anyOf":[{"type":"number"},{"type":"string"},{"type":"boolean"}]},"type":"object"},{"type":"null"}],"title":"Organization Pricing"}},"type":"object","title":"UserConfigurationRequestResponseSchema"},"UserResponse":{"properties":{"id":{"type":"integer","title":"Id"},"email":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Email"},"name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Name"},"organization_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Organization Id"},"provider_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Provider Id"}},"type":"object","required":["id","email"],"title":"UserResponse"},"ValidateWorkflowResponse":{"properties":{"is_valid":{"type":"boolean","title":"Is Valid"},"errors":{"items":{"$ref":"#/components/schemas/WorkflowError"},"type":"array","title":"Errors"}},"type":"object","required":["is_valid","errors"],"title":"ValidateWorkflowResponse"},"ValidationError":{"properties":{"loc":{"items":{"anyOf":[{"type":"string"},{"type":"integer"}]},"type":"array","title":"Location"},"msg":{"type":"string","title":"Message"},"type":{"type":"string","title":"Error Type"},"input":{"title":"Input"},"ctx":{"type":"object","title":"Context"}},"type":"object","required":["loc","msg","type"],"title":"ValidationError"},"VicidialAgentAPIConfiguration":{"properties":{"url":{"type":"string","minLength":1,"title":"Url","description":"Full URL to agc/api.php"},"username":{"type":"string","minLength":1,"title":"Username","description":"VICIdial agent API user"},"password":{"type":"string","minLength":1,"title":"Password","description":"VICIdial agent API password"},"source":{"type":"string","title":"Source","description":"VICIdial API source tag","default":"dograh"}},"type":"object","required":["url","username","password"],"title":"VicidialAgentAPIConfiguration","description":"VICIdial remote-agent call-control API configuration."},"VicidialExternalPBXConfiguration":{"properties":{"type":{"type":"string","const":"vicidial","title":"Type","default":"vicidial"},"agent_api":{"$ref":"#/components/schemas/VicidialAgentAPIConfiguration"},"non_agent_api":{"anyOf":[{"$ref":"#/components/schemas/VicidialNonAgentAPIConfiguration"},{"type":"null"}]},"timeout_seconds":{"type":"integer","maximum":30.0,"minimum":1.0,"title":"Timeout Seconds","default":8}},"type":"object","required":["agent_api"],"title":"VicidialExternalPBXConfiguration","description":"External-PBX configuration used by the VICIdial strategy adapter."},"VicidialNonAgentAPIConfiguration":{"properties":{"url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Url","description":"Full non_agent_api.php URL"},"username":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Username","description":"Non-agent API user"},"password":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Password","description":"Non-agent API password"},"source":{"type":"string","title":"Source","description":"Non-agent API source tag","default":"dograh"}},"type":"object","title":"VicidialNonAgentAPIConfiguration","description":"Optional VICIdial non-agent API configuration for lead updates."},"VobizConfigurationRequest":{"properties":{"provider":{"type":"string","const":"vobiz","title":"Provider","default":"vobiz"},"auth_id":{"type":"string","title":"Auth Id","description":"Vobiz Account ID (e.g., MA_SYQRLN1K)"},"auth_token":{"type":"string","title":"Auth Token","description":"Vobiz Auth Token"},"application_id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Application Id","description":"Vobiz Application ID. The application's answer_url is updated when inbound workflows are attached to numbers on this account. If omitted, an application is auto-created on save and its id is stored on the configuration."}},"type":"object","required":["auth_id","auth_token"],"title":"VobizConfigurationRequest","description":"Request schema for Vobiz configuration."},"VoiceFacets":{"properties":{"genders":{"items":{"type":"string"},"type":"array","title":"Genders"},"accents":{"items":{"type":"string"},"type":"array","title":"Accents"},"languages":{"items":{"type":"string"},"type":"array","title":"Languages"}},"type":"object","title":"VoiceFacets","description":"Distinct selector values across a provider's full voice catalog."},"VoiceInfo":{"properties":{"voice_id":{"type":"string","title":"Voice Id"},"name":{"type":"string","title":"Name"},"description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Description"},"accent":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Accent"},"gender":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Gender"},"language":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Language"},"preview_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Preview Url"}},"type":"object","required":["voice_id","name"],"title":"VoiceInfo"},"VoicesResponse":{"properties":{"provider":{"type":"string","title":"Provider"},"voices":{"items":{"$ref":"#/components/schemas/VoiceInfo"},"type":"array","title":"Voices"},"facets":{"anyOf":[{"$ref":"#/components/schemas/VoiceFacets"},{"type":"null"}]}},"type":"object","required":["provider","voices"],"title":"VoicesResponse"},"VonageConfigurationRequest":{"properties":{"provider":{"type":"string","const":"vonage","title":"Provider","default":"vonage"},"api_key":{"type":"string","title":"Api Key","description":"Vonage API Key"},"api_secret":{"type":"string","title":"Api Secret","description":"Vonage API Secret"},"application_id":{"type":"string","title":"Application Id","description":"Vonage Application ID"},"private_key":{"type":"string","title":"Private Key","description":"Private key for JWT generation"},"signature_secret":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Signature Secret","description":"Vonage signature secret used to verify signed webhooks"}},"type":"object","required":["api_key","api_secret","application_id","private_key"],"title":"VonageConfigurationRequest","description":"Request schema for Vonage configuration."},"WebhookCredentialType":{"type":"string","enum":["none","api_key","bearer_token","basic_auth","custom_header"],"title":"WebhookCredentialType","description":"Webhook credential authentication types"},"WhatsAppConfigurationRequest":{"properties":{"provider":{"type":"string","const":"whatsapp","title":"Provider","default":"whatsapp"},"access_token":{"type":"string","minLength":1,"title":"Access Token","description":"System user access token from Meta"},"waba_id":{"type":"string","minLength":1,"title":"Waba Id","description":"WhatsApp Business Account ID from the app's API Setup page"},"app_secret":{"type":"string","minLength":1,"title":"App Secret","description":"App secret used to verify webhook signatures"}},"type":"object","required":["access_token","waba_id","app_secret"],"title":"WhatsAppConfigurationRequest","description":"Credentials for one WhatsApp Business Account on the Cloud API.\n\nThe account, not a single number, is the unit of configuration: its\nnumbers are imported from Meta rather than typed in. The webhook verify\ntoken is deliberately not declared here: it is minted by the provider's\nsave hook and carried forward on update, never read from a request (see\npreprocess_credentials_on_save`` in the package)."},"WidgetTexts":{"properties":{"endChatText":{"type":"string","title":"Endchattext","default":"End chat"},"endChatConfirmText":{"type":"string","title":"Endchatconfirmtext","default":"End this chat?"},"endChatCancelText":{"type":"string","title":"Endchatcanceltext","default":"Cancel"},"endingChatText":{"type":"string","title":"Endingchattext","default":"Ending\u2026"},"conversationEndedText":{"type":"string","title":"Conversationendedtext","default":"Conversation ended."},"startNewChatText":{"type":"string","title":"Startnewchattext","default":"Start new chat"},"chatRetryText":{"type":"string","title":"Chatretrytext","default":"Retry"},"chatInputPlaceholder":{"type":"string","title":"Chatinputplaceholder","default":"Type a message\u2026"},"sendMessageLabel":{"type":"string","title":"Sendmessagelabel","default":"Send message"},"closeChatLabel":{"type":"string","title":"Closechatlabel","default":"Close chat"},"voiceConnectingText":{"type":"string","title":"Voiceconnectingtext","default":"Connecting\u2026"},"voiceEndCallText":{"type":"string","title":"Voiceendcalltext","default":"End Call"},"voiceRetryText":{"type":"string","title":"Voiceretrytext","default":"Retry"},"voiceReadyTitle":{"type":"string","title":"Voicereadytitle","default":"Ready to Connect"},"voiceConnectingSubtext":{"type":"string","title":"Voiceconnectingsubtext","default":"Please wait while we establish the connection"},"voiceConnectedTitle":{"type":"string","title":"Voiceconnectedtitle","default":"Connected"},"voiceConnectedSubtext":{"type":"string","title":"Voiceconnectedsubtext","default":"Your voice call is now active"},"voiceCallEndedTitle":{"type":"string","title":"Voicecallendedtitle","default":"Call ended"},"voiceCallEndedSubtext":{"type":"string","title":"Voicecallendedsubtext","default":"Click below to start a new call"},"voiceConnectionFailedTitle":{"type":"string","title":"Voiceconnectionfailedtitle","default":"Connection failed"},"voiceConnectionFailedSubtext":{"type":"string","title":"Voiceconnectionfailedsubtext","default":"Please check your microphone and try again"},"voiceConnectionLostTitle":{"type":"string","title":"Voiceconnectionlosttitle","default":"Connection lost"},"voiceConnectionLostSubtext":{"type":"string","title":"Voiceconnectionlostsubtext","default":"The call has been disconnected"}},"type":"object","title":"WidgetTexts","description":"Every visitor-facing string the embed widget can render."},"WorkflowConfigurationDefaults":{"properties":{"model_configuration_override":{"anyOf":[{"$ref":"#/components/schemas/ModelConfigurationOverride"},{"type":"null"}]},"ambient_noise_configuration":{"$ref":"#/components/schemas/AmbientNoiseConfigurationDefaults"},"max_call_duration":{"type":"integer","maximum":1200.0,"exclusiveMinimum":0.0,"title":"Max Call Duration","default":300},"max_user_idle_timeout":{"type":"number","title":"Max User Idle Timeout","default":10.0},"smart_turn_stop_secs":{"type":"number","title":"Smart Turn Stop Secs","default":2.0},"turn_start_strategy":{"type":"string","enum":["default","min_words"],"title":"Turn Start Strategy","default":"min_words"},"turn_start_min_words":{"type":"integer","minimum":1.0,"title":"Turn Start Min Words","default":2},"turn_stop_strategy":{"type":"string","enum":["transcription","turn_analyzer"],"title":"Turn Stop Strategy","default":"transcription"},"dictionary":{"type":"string","title":"Dictionary","default":""},"context_compaction_enabled":{"type":"boolean","title":"Context Compaction Enabled","default":false},"tts_cache_enabled":{"type":"boolean","title":"Tts Cache Enabled","description":"Reuse generated speech for repeated phrases. Supports MiniMax TTS.","default":false},"call_dispositions":{"items":{"$ref":"#/components/schemas/CallDispositionOption"},"type":"array","maxItems":50,"title":"Call Dispositions","description":"Allowed business outcomes for terminal call classification. Each entry defines the exact stored code and the criteria for selecting it."},"text_chat_inactivity_timeout_seconds":{"type":"integer","maximum":10500.0,"minimum":60.0,"title":"Text Chat Inactivity Timeout Seconds","default":1800},"external_pbx_field_mappings":{"items":{"$ref":"#/components/schemas/ExternalPBXFieldMapping"},"type":"array","maxItems":100,"title":"External Pbx Field Mappings"},"external_pbx_lead_headers":{"items":{"type":"string","pattern":"^[A-Za-z][A-Za-z0-9]{0,63}$"},"type":"array","maxItems":50,"title":"External Pbx Lead Headers"}},"additionalProperties":true,"type":"object","title":"WorkflowConfigurationDefaults"},"WorkflowCountResponse":{"properties":{"total":{"type":"integer","title":"Total"},"active":{"type":"integer","title":"Active"},"archived":{"type":"integer","title":"Archived"}},"type":"object","required":["total","active","archived"],"title":"WorkflowCountResponse","description":"Response for workflow count endpoint."},"WorkflowError":{"properties":{"kind":{"$ref":"#/components/schemas/ItemKind"},"id":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Id"},"field":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Field"},"message":{"type":"string","title":"Message"}},"type":"object","required":["kind","id","field","message"],"title":"WorkflowError"},"WorkflowListResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"total_runs":{"type":"integer","title":"Total Runs"},"folder_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Folder Id"},"workflow_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Uuid"}},"type":"object","required":["id","name","status","created_at","total_runs"],"title":"WorkflowListResponse","description":"Lightweight response for workflow listings (excludes large fields)."},"WorkflowOption":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"WorkflowOption"},"WorkflowResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"workflow_definition":{"additionalProperties":true,"type":"object","title":"Workflow Definition"},"current_definition_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Current Definition Id"},"template_context_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Context Variables"},"call_disposition_codes":{"anyOf":[{"$ref":"#/components/schemas/CallDispositionCodes"},{"type":"null"}]},"total_runs":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Total Runs"},"workflow_configurations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Workflow Configurations"},"version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"},"version_status":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Status"},"workflow_uuid":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Uuid"}},"type":"object","required":["id","name","status","created_at","workflow_definition","current_definition_id"],"title":"WorkflowResponse"},"WorkflowRunDetail":{"properties":{"phone_number":{"type":"string","title":"Phone Number"},"disposition":{"type":"string","title":"Disposition"},"duration_seconds":{"type":"number","title":"Duration Seconds"},"workflow_id":{"type":"integer","title":"Workflow Id"},"run_id":{"type":"integer","title":"Run Id"},"workflow_name":{"type":"string","title":"Workflow Name"},"created_at":{"type":"string","title":"Created At"}},"type":"object","required":["phone_number","disposition","duration_seconds","workflow_id","run_id","workflow_name","created_at"],"title":"WorkflowRunDetail"},"WorkflowRunResponseSchema":{"properties":{"id":{"type":"integer","title":"Id"},"workflow_id":{"type":"integer","title":"Workflow Id"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"},"name":{"type":"string","title":"Name"},"mode":{"type":"string","title":"Mode"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"is_completed":{"type":"boolean","title":"Is Completed"},"transcript_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Url"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"user_recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Recording Url"},"bot_recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Recording Url"},"transcript_public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Public Url"},"recording_public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Public Url"},"user_recording_public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Recording Public Url"},"bot_recording_public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Recording Public Url"},"public_access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Access Token"},"cost_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Cost Info"},"usage_info":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Usage Info"},"definition_id":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Definition Id"},"initial_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Initial Context"},"gathered_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gathered Context"},"call_type":{"$ref":"#/components/schemas/CallType"},"logs":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Logs"},"annotations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Annotations"}},"type":"object","required":["id","workflow_id","name","mode","created_at","is_completed","transcript_url","recording_url","cost_info","definition_id","call_type"],"title":"WorkflowRunResponseSchema"},"WorkflowRunTextSessionResponse":{"properties":{"workflow_run_id":{"type":"integer","title":"Workflow Run Id"},"workflow_id":{"type":"integer","title":"Workflow Id"},"name":{"type":"string","title":"Name"},"mode":{"type":"string","title":"Mode"},"state":{"type":"string","title":"State"},"is_completed":{"type":"boolean","title":"Is Completed"},"revision":{"type":"integer","title":"Revision"},"initial_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Initial Context"},"gathered_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gathered Context"},"annotations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Annotations"},"session_data":{"additionalProperties":true,"type":"object","title":"Session Data"},"checkpoint":{"additionalProperties":true,"type":"object","title":"Checkpoint"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"updated_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Updated At"}},"type":"object","required":["workflow_run_id","workflow_id","name","mode","state","is_completed","revision","session_data","checkpoint","created_at"],"title":"WorkflowRunTextSessionResponse"},"WorkflowRunUsageResponse":{"properties":{"id":{"type":"integer","title":"Id"},"workflow_id":{"type":"integer","title":"Workflow Id"},"workflow_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Workflow Name"},"name":{"type":"string","title":"Name"},"created_at":{"type":"string","title":"Created At"},"dograh_token_usage":{"type":"number","title":"Dograh Token Usage"},"call_duration_seconds":{"type":"integer","title":"Call Duration Seconds"},"recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Url"},"transcript_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Url"},"user_recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Recording Url"},"bot_recording_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Recording Url"},"recording_public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Recording Public Url"},"transcript_public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Transcript Public Url"},"user_recording_public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"User Recording Public Url"},"bot_recording_public_url":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Bot Recording Public Url"},"public_access_token":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Public Access Token"},"phone_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Phone Number","description":"Deprecated. Use caller_number and called_number instead.","deprecated":true},"caller_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Caller Number"},"called_number":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Called Number"},"call_type":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Call Type"},"mode":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Mode"},"disposition":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Disposition"},"initial_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Initial Context"},"gathered_context":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Gathered Context"},"charge_usd":{"anyOf":[{"type":"number"},{"type":"null"}],"title":"Charge Usd"}},"type":"object","required":["id","workflow_id","workflow_name","name","created_at","dograh_token_usage","call_duration_seconds"],"title":"WorkflowRunUsageResponse"},"WorkflowRunsResponse":{"properties":{"runs":{"items":{"$ref":"#/components/schemas/WorkflowRunResponseSchema"},"type":"array","title":"Runs"},"total_count":{"type":"integer","title":"Total Count"},"page":{"type":"integer","title":"Page"},"limit":{"type":"integer","title":"Limit"},"total_pages":{"type":"integer","title":"Total Pages"},"applied_filters":{"anyOf":[{"items":{"additionalProperties":true,"type":"object"},"type":"array"},{"type":"null"}],"title":"Applied Filters"}},"type":"object","required":["runs","total_count","page","limit","total_pages"],"title":"WorkflowRunsResponse"},"WorkflowSummaryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"name":{"type":"string","title":"Name"}},"type":"object","required":["id","name"],"title":"WorkflowSummaryResponse"},"WorkflowTemplateResponse":{"properties":{"id":{"type":"integer","title":"Id"},"template_name":{"type":"string","title":"Template Name"},"template_description":{"type":"string","title":"Template Description"},"template_json":{"additionalProperties":true,"type":"object","title":"Template Json"},"created_at":{"type":"string","format":"date-time","title":"Created At"}},"type":"object","required":["id","template_name","template_description","template_json","created_at"],"title":"WorkflowTemplateResponse"},"WorkflowVersionMetadataResponse":{"properties":{"id":{"type":"integer","title":"Id"},"version_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Name"},"change_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Description"}},"type":"object","required":["id","version_name","change_description"],"title":"WorkflowVersionMetadataResponse"},"WorkflowVersionResponse":{"properties":{"id":{"type":"integer","title":"Id"},"version_number":{"type":"integer","title":"Version Number"},"status":{"type":"string","title":"Status"},"created_at":{"type":"string","format":"date-time","title":"Created At"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"},"version_name":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Version Name"},"change_description":{"anyOf":[{"type":"string"},{"type":"null"}],"title":"Change Description"},"workflow_json":{"additionalProperties":true,"type":"object","title":"Workflow Json"},"workflow_configurations":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Workflow Configurations"},"template_context_variables":{"anyOf":[{"additionalProperties":true,"type":"object"},{"type":"null"}],"title":"Template Context Variables"}},"type":"object","required":["id","version_number","status","created_at","workflow_json"],"title":"WorkflowVersionResponse"},"WorkflowVersionSummaryResponse":{"properties":{"id":{"type":"integer","title":"Id"},"version_number":{"anyOf":[{"type":"integer"},{"type":"null"}],"title":"Version Number"},"status":{"type":"string","title":"Status"},"published_at":{"anyOf":[{"type":"string","format":"date-time"},{"type":"null"}],"title":"Published At"}},"type":"object","required":["id","version_number","status","published_at"],"title":"WorkflowVersionSummaryResponse"}}}}
Api Reference Runs (`docs/api-reference/runs.mdx`)
title: "Overview"
| Method | Endpoint | Quick Link |
|---|---|---|
POST |
/public/agent/{uuid} |
Trigger an outbound agent run by API Trigger node |
POST |
/public/agent/workflow/{workflow_uuid} |
Trigger an outbound agent run by Agent UUID |
GET |
/workflow/{workflow_id}/runs/{run_id} |
Retrieve agent run details |
GET |
/public/download/workflow/{token}/{artifact_type} |
Download recordings and transcripts |
POST |
/telephony/inbound/{workflow_id} |
Inbound run webhook |
Choose the right public run route
Dograh exposes two public outbound agent run route families. They are not
interchangeable, even though both path parameters look like UUIDs.
| Use this when | Production route | Test route | Identifier you pass |
|---|---|---|---|
| You added an API Trigger node to the workflow and want to execute that trigger | /public/agent/{uuid} |
/public/agent/test/{uuid} |
The trigger UUID (trigger_path) from the API Trigger node |
| You want to execute the workflow by its stable Agent UUID instead of a trigger node | /public/agent/workflow/{workflow_uuid} |
/public/agent/test/workflow/{workflow_uuid} |
The workflow UUID from the agent's Agent UUID field |
Once Dograh resolves the target agent, both route families behave the same:
- They accept the same request body
- They return the same response shape
- They validate the same
X-API-Keyorganization boundary - They use the same telephony configuration selection rules
If you specifically need the API Trigger route, see Trigger an outbound agent run by API Trigger node. To execute by Agent UUID, see Trigger an outbound agent run by Agent UUID.
Using initial context
initial_context passes runtime data into the agent at run time. Values are available as template variables in your agent's prompt using double-brace syntax.
{
"initial_context": {
"customer_name": "Jane",
"appointment_date": "March 15"
}
}Your agent prompt can then reference {{customer_name}} and {{appointment_date}} and they will be substituted when the run starts.
Run status values
| Status | Description |
|---|---|
pending |
Run queued but not yet connected |
in_progress |
Run is live |
completed |
Run ended normally |
failed |
Run failed before or during execution |
Api Reference Telephony Configs (`docs/api-reference/telephony-configs.mdx`)
title: "Overview"
A telephony configuration binds an organization to a telephony provider (Twilio, Vonage, Plivo, Telnyx, etc.) along with the credentials needed to place and receive calls. Each configuration owns a set of phone numbers; campaigns and inbound routing pin to a specific configuration.
One configuration in your organization can be marked as the default outbound — campaigns and ad-hoc calls that omit telephony_configuration_id fall back to it.
| Method | Endpoint | Quick Link |
|---|---|---|
GET |
/organizations/telephony-providers/metadata |
List supported providers |
GET |
/organizations/telephony-configs |
List configurations |
POST |
/organizations/telephony-configs |
Create a configuration |
GET |
/organizations/telephony-configs/{config_id} |
Get a configuration |
PUT |
/organizations/telephony-configs/{config_id} |
Update a configuration |
DELETE |
/organizations/telephony-configs/{config_id} |
Delete a configuration |
POST |
/organizations/telephony-configs/{config_id}/set-default-outbound |
Set as default outbound |
Phone numbers
Phone numbers are nested under a configuration:
| Method | Endpoint | Quick Link |
|---|---|---|
GET |
/organizations/telephony-configs/{config_id}/phone-numbers |
List phone numbers |
POST |
/organizations/telephony-configs/{config_id}/phone-numbers |
Add a phone number |
GET |
/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id} |
Get a phone number |
PUT |
/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id} |
Update a phone number |
DELETE |
/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id} |
Delete a phone number |
POST |
/organizations/telephony-configs/{config_id}/phone-numbers/{phone_number_id}/set-default-caller |
Set as default caller |
Sensitive credentials
Provider credentials (API keys, auth tokens, etc.) are masked in GET responses. When updating a configuration, you can re-submit the masked value as-is — Dograh detects the mask and preserves the original secret.
Configurations Agent Uuid (`docs/configurations/agent-uuid.mdx`)
title: "Agent UUID"
The Agent UUID is the workflow's stable identifier. In API routes and payloads you may also see it called workflow_uuid.
Unlike numeric workflow IDs, the Agent UUID is portable across environments and does not change when you publish new versions of the same workflow.
Where to find it
You can copy the Agent UUID from two places in the dashboard.
From the workflow editor
- Open your agent in the workflow editor
- Click the ⋮ menu in the top-right of the header
- Click Copy Agent UUID
From the agent's Settings page
- Open the agent and go to Settings
- Scroll to the Agent UUID section
- Click the UUID code block, or use Copy UUID
Where you use it
Use the Agent UUID for workflow-level routes such as:
POST /api/v1/public/agent/workflow/{workflow_uuid}POST /api/v1/public/agent/test/workflow/{workflow_uuid}wss://<your-host>/api/v1/agent-stream/{provider}/{agent_uuid}
- Use the Agent UUID for workflow-level routes like
/public/agent/workflow/{workflow_uuid} - Use the API Trigger node UUID for trigger routes like
/public/agent/{uuid} - The API Trigger node path can be edited if you want something more descriptive
- The Agent UUID is generated by Dograh and cannot be changed
See API Trigger for trigger-node URLs.
Configurations Api Keys (`docs/configurations/api-keys.mdx`)
title: "API Keys and Service Keys"
The option to create the Keys are in https://app.dograh.com/api-keys if you are using hosted version, or http://localhost:3010/api-keys if you are using the self hosted version.
API Keys
API keys can be used to trigger a voice agent from an external system, like n8n or programatically from your other workflows. In order to generate that, you can go to /api-keys and create a new key.
Please note that you must copy and keep the API key secretly, since this is the only time that you would be able to copy it. If you lose it, you can always delete that, if its not being used anywhere, and create a new API key.
Service Keys
Service Keys are the keys which you generate to be used in Model Configurations. In order to generate that, you can go to /api-keys and create a new key.
Configurations Call Events (`docs/configurations/call-events.mdx`)
title: "Call events"
You need an existing BigQuery table with the schema below and a Google identity
that can read its schema and insert rows. Call event export is disabled until
you configure it in Settings → Call events.
- Select BigQuery as the destination.
- Enter the table as
project.dataset.table. - Choose a service account and enter its email and PEM private key. On a
self-hosted installation, you can instead select Deployment identity to
use the Google credentials configured on your Dograh server. - Select Test connection to check authentication and table compatibility.
This reads table metadata without inserting events; successful exports also
require write permission. - Enable Export call events and select Save.
Each organization has its own destination and credentials. Saved private keys
are masked in the UI. Keep the masked value to retain your existing key, or
replace it to rotate the key.
BigQuery schema
Use these scalar columns with nullable fields; ts and event can also be
required. The adapter does not create or migrate tables.
| Column | Type |
|---|---|
ts |
TIMESTAMP |
event |
STRING |
run_id, org_id, workflow_id, turn |
INTEGER |
severity |
STRING |
value_ms |
FLOAT |
node_id, node_name |
STRING |
detail |
JSON (STRING also supported) |
You receive one row per diagnostic event. ts is when the event happened, anddetail contains JSON, stored as a native JSON value or serialized text according
to the column type. Events cover speech, accepted user turns,
mute state, tool execution, silence warnings, stage latencies, pipeline errors
and the final call summary. The transcription event records character counts
and empty/finalized flags; it does not contain transcript text or audio.
Delivery behavior
Events are sent after a call finishes, with their original timestamps.
Capture and export are separate from the real-time feedback logs.
Dograh stores the destination settings in its organization configuration;
event payloads are not persisted in Postgres or Redis.
Exports use bounded retries for retryable row and HTTP errors. BigQuery's
insertion IDs provide best-effort deduplication; duplicates can still occur.
Capture and pending export queues are bounded, and unsent events can be lost
on a process crash, queue overflow or exhausted retries. There is no durable
replay queue in this version. Export failures and dropped-event counts appear
in the API worker logs.
Table changes apply to new calls. An active call's batch is discarded if its
destination is changed or disabled before export, so it cannot accidentally
land in a different table. Credentials are read again before each delivery
attempt to support rotation. Requests already sent to BigQuery cannot be
recalled when you disable export.
Configurations Inference Providers (`docs/configurations/inference-providers.mdx`)
title: "Model Configurations"
Provider connections and model configurations
Use Providers in the sidebar to connect provider accounts, and Models to create named model configurations. Providers lists each added connection in its own row. You can connect multiple accounts for the same provider and reuse them across configurations.
| Item | What it contains |
|---|---|
| Provider Connection | A provider account's credentials and connection settings, such as an endpoint, cloud project, or region. |
| Named Model Configuration | A reusable choice of connections and model settings, such as the LLM model, temperature, and TTS voice. |
| Organization Default | The named setup agents inherit when they have no model override. |
Connections and configurations belong to your organization. Dograh provisions an initial Dograh connection and default setup during signup. You can add more Dograh connections with different Service Keys, or connect external providers.
When you upgrade an existing deployment, the database migration converts your organization's saved model settings into connections and an Organization default configuration, and gives each agent that had its own model settings a named configuration of its own. Agents without their own settings keep inheriting the default.
Add a provider connection
You need the credentials and any connection settings required by your provider. To create a Dograh Service Key, see API Keys and Service Keys.
- Open Providers in the sidebar and click Add Provider to open the connection editor page.
- Choose the provider and name the connection so you can distinguish its account or environment.
- Enter its credentials and any required connection settings, then save. Where key pools are supported, use Add API Key to enter each key in its own row.
Click Edit on a provider row to open its editor page. Use All provider connections to return to the list.
You choose which services use the connection when editing a named model configuration in Models.
You can repeat these steps for multiple accounts at the same provider. Editing a connection lets you keep or replace configured credentials; saved secrets are not returned to the browser. Model settings reference the connection instead of copying its key.
Saving a new connection, replacing credentials, or changing connection settings runs the provider's available credential checks before saving. Every API key in a pool is checked. A rejected key leaves the existing connection unchanged. Renaming a connection does not repeat provider checks. The checks vary by provider; some validate field structure or token format rather than making a live request.
A provider's realtime and standard services may require separate connection types, even when they accept the same key. The available roles come from the provider definitions.
Create a named configuration
- Open Models in the sidebar, click Add Configuration, and give it a name.
- Choose Realtime, Dograh, or BYOK mode. In BYOK and Realtime, each service has its own tab where you select a provider connection. To connect a new account without leaving the page, choose Add a provider at the end of a provider list.
- Adjust the available settings, then save.
- Click Make org default on its row in Named Model Configurations if agents should inherit it. The current default has an Org default badge.
| Mode | Provider selection |
|---|---|
| Dograh | One Dograh connection manages LLM, STT, TTS, and embeddings. You can select the LLM model and adjust temperature, voice, speed, language, and language hints. |
| BYOK | Separate compatible external connections for LLM, STT/transcriber, and TTS/voice. |
| Realtime | An external realtime speech-to-speech connection and a separate external LLM for tasks such as extraction and QA. |
In BYOK and Realtime modes, you can also select an external embedding connection on the Embedding tab. Its model must match the indexes of the knowledge-base documents you use. Changing the configuration does not rebuild existing indexes. Dograh mode manages embeddings automatically and has no separate embedding controls. Dograh connections are selected only through Dograh mode in the editor.
Use Duplicate to create a variation, or Copy UUID to reference a saved configuration or connection from your API integration. Names are labels; UUIDs identify references.
Creating, editing, and duplicating model configurations opens a dedicated page. Use All model configurations to return to the list. In Dograh mode, choose the managed tier under LLM model, and click Voice to browse, filter, and play voice samples before selecting Use this voice. For Dograh's Flux-supported languages and Deepgram Flux multilingual, select Language hints with the language checkboxes. Model and language dropdowns offer Enter Custom Value where the provider supports it.
In BYOK mode, ElevenLabs, Cartesia, and Deepgram voices load using the selected provider connection's saved API key. Rime uses its public voice catalog, and Sarvam offers model-specific speaker lists. Voice choices refresh when you change the connection, model, or language. If a catalog cannot load, you can retry or enter a voice ID manually.
Saving a named model configuration checks its structure and supported settings without repeating provider credential checks. A run's final configuration is validated before billing and quota authorization.
For one run, all selected Dograh services must share a service key. You can keep multiple Dograh connections in the catalog and use them in different configurations.
Configure an individual agent
- Open the agent's Settings and its model configuration section.
- Inherit the organization default or select a named configuration.
- Save and publish the agent.
Create and edit configurations in Models. For a variation, duplicate a named configuration there and select it in your workflow. Override individual fields such as temperature or voice through the API trigger for a single run.
If an existing workflow has custom model settings, they remain in use until you explicitly select and save a named configuration or the organization default. Workflow settings show that existing override without offering individual field editing.
A named selection follows edits to that configuration for future runs. A run that has already started keeps its saved settings and credential selection.
Override a single run
The effective order is organization default, published workflow override (or draft for test calls), API trigger override, then pre-call data fetch override. The pre-call data fetch runs once the call is connected, so it can only change the services the agent owns: llm, llm_fallback, and tts. The mode, stt, realtime, and embeddings are fixed by the first three layers.
An override can select a named configuration by UUID, select a provider connection for a service, or change a field such as temperature or voice. Selecting a different named configuration replaces earlier model-setting patches; that override's own explicit fields then apply. Changing to a connection for the same provider preserves model settings. Changing provider starts that service from the new provider's defaults plus your explicit settings.
See API Trigger for request examples and Pre-call Data Fetch for response examples. Overrides do not edit your saved configurations.
Archive unused setups
Archive a named configuration or connection when you no longer need it. Dograh rejects archiving references still needed by a default, active configuration, workflow, or pending campaign. Change those references first. Started runs keep their resolved model settings and load the connection's current credentials. Credential updates replace the stored values; previous credentials are not retained.
Expand Archived at the bottom of Models or Providers to see archived items and select Restore to use them again. Restoring preserves the item's UUID and settings without changing your org default. If a model configuration uses archived provider connections, restore those providers first. Archived items do not appear in configuration selectors.