---
title: "Prepare in-app phone conversation test session"
method: POST
path: "/v3/ai-agents/{agent_id}/conversation-test-session"
tags: ["v3", "ai-agents"]
---

# Prepare in-app phone conversation test session

`POST /v3/ai-agents/{agent_id}/conversation-test-session`

## Request

- Base URL: `https://api.mentium.io` (the document declares no server; this is the origin it was published from)
- URL: `https://api.mentium.io/v3/ai-agents/{agent_id}/conversation-test-session`
- Auth: HTTP bearer

Returns a short-lived ElevenLabs signed websocket URL and runtime conversation overrides derived from the latest UI settings.

## Path parameters

- `agent_id` string, uuid, required

## Headers

- `mentium-workspace-id` string, nullable

## Request body

- AIAgentConversationTestRequest: Request payload to prepare an authenticated in-app voice test session.
  - `model` string, nullable: LLM model override
  - `system_prompt_template` string, nullable: System prompt override
  - `type_config` AIAgentConversationTestTypeConfig: Runtime phone settings from UI used for voice test sessions.
    - `voice_id` string, nullable: ElevenLabs voice ID
    - `first_message` string, nullable: First message override
    - `gemini_voice_settings` object, nullable: Gemini Live voice settings override
    - `openai_realtime_settings` AIAgentConversationTestOpenAIRealtimeSettings: Subset of OpenAI voice settings allowed for browser voice-test sessions. Free-form rather than enumerated: the valid voices and reasoning efforts depend on which model is selected (gpt-live has its own voices and accepts "none"), so the values are validated against that model server-side by the same code that validates a saved agent.
      - `model` string, nullable: OpenAI voice model: a gpt-realtime-* or gpt-live-* model
      - `backend_model` string, nullable: gpt-live only: the Responses model that runs the agent's tools
      - `voice` string, nullable: Voice name, validated against the model
      - `reasoning_effort` string, nullable: Reasoning effort, validated against the model
      - `background_sound` string, nullable: gpt-live only: the room played under the voice, e.g. office
    - `voice_settings` AIAgentConversationTestTtsSettings: Subset of phone agent TTS settings allowed for per-conversation override.
      - `stability` number, nullable: Voice stability
      - `similarity_boost` number, nullable: Voice similarity boost
      - `speed` number, nullable: Speech speed
  - `include_conversation_id` boolean: Whether ElevenLabs should include a conversation_id in the signed URL
  - `environment` 'production' | 'staging', nullable: Optional ElevenLabs environment override

## Response `200`

Successful Response

- AIAgentConversationTestResponse: Response payload for in-app voice test bootstrap.
  - `signed_url` string, required: Temporary signed websocket URL
  - `provider` 'elevenlabs' | 'gemini' | 'openai': Voice provider used for this test session
  - `transport` 'elevenlabs_signed_url' | 'mentium_browser_ws': Browser transport to use for this test session
  - `conversation_config_override` object, nullable: Conversation override payload to send on websocket initiation

## Other responses

- `422`: Validation Error

---

[API](https://skmtc.dev/mentium/apis/mentium-api.md) - [All operations](https://skmtc.dev/mentium/apis/mentium-api/llms.txt) - [OpenAPI document](https://skmtc.dev/mentium/apis/mentium-api/revisions/b4ed8e59432e?raw)
