Skip to Content
CallMitraDocs
API referenceAgents

Import an agent from another platform

Creates a **draft** agent from JSON exported from another platform. Review it, then publish with publishAgent. Fields that have no equivalent, and values that had to be approximated, are listed in `warnings` instead of failing the import. | Our field | Vapi | Retell | Bland | | --- | --- | --- | --- | | name | `name` | `agent_name` | `name` | | system prompt | system entries of `model.messages` | `llm.general_prompt` | `task` (or `prompt`) | | greeting | `firstMessage` | `llm.begin_message` | `first_sentence` | | language model | `model.model` | `llm.model` | `model` (Bland tiers map to the default) | | temperature | `model.temperature` | `llm.model_temperature` | `temperature` | | voice | `voice.provider` + `voice.voiceId` | `voice_id` | `voice` | | transcriber | `transcriber.provider` | - | - | | language | `transcriber.language` | `language` | `language` | | speaking speed | `voice.speed` | `voice_speed` | - | | call time limit | `maxDurationSeconds` | `max_call_duration_ms` | `max_duration` (minutes) | | background sound | `backgroundSound` | `ambient_sound` | `background_track` | | recording | `recordingEnabled` | - | `record` | A voice or language that is not available here is replaced: first by a voice with the same id or name, then by the language's default voice, with a warning. Tools, knowledge bases, webhooks and multi-state flows are not imported. `callmitra` copies another workspace's agent config (signing secrets are not copied).

POST
/api/v1/agents/import

Creates a draft agent from JSON exported from another platform. Review it, then publish with publishAgent. Fields that have no equivalent, and values that had to be approximated, are listed in warnings instead of failing the import.

Our fieldVapiRetellBland
namenameagent_namename
system promptsystem entries of model.messagesllm.general_prompttask (or prompt)
greetingfirstMessagellm.begin_messagefirst_sentence
language modelmodel.modelllm.modelmodel (Bland tiers map to the default)
temperaturemodel.temperaturellm.model_temperaturetemperature
voicevoice.provider + voice.voiceIdvoice_idvoice
transcribertranscriber.provider--
languagetranscriber.languagelanguagelanguage
speaking speedvoice.speedvoice_speed-
call time limitmaxDurationSecondsmax_call_duration_msmax_duration (minutes)
background soundbackgroundSoundambient_soundbackground_track
recordingrecordingEnabled-record

A voice or language that is not available here is replaced: first by a voice with the same id or name, then by the language's default voice, with a warning. Tools, knowledge bases, webhooks and multi-state flows are not imported. callmitra copies another workspace's agent config (signing secrets are not copied).

Authorization

headerX-API-Key<token>

Create in the console: Settings → API & webhooks.

Header Parameters

Idempotency-Key?string

Any unique string up to 255 characters. Retrying with the same key and body within 24 hours returns the first result instead of acting twice.

Lengthlength <= 255

Request Body

application/json
  1. body

An agent exported from another platform.

config*

The exported JSON: a Vapi assistant, a Retell agent (with its LLM as llm), a Bland call or agent configuration, or a Call Mitra agent from getAgent.

source*Source

Platform the JSON comes from.

Value in"vapi""retell""bland""callmitra"

Response Body

OK

application/json
  1. response

The new draft agent and what could not be carried over.

agent*

An AI agent: its live configuration, draft, status and numbers.

success?Success

Always true on success.

Defaulttrue
warnings?array<>
[key: string]?any
Example Request
curl -X POST 'https://api.callmitra.ai/api/v1/agents/import' \  -H 'Content-Type: application/json' \  -d '{  "config": {    "firstMessage": "Hi, this is Riley from Acme Realty. Is now a good time?",    "model": {      "messages": [        {          "content": "You qualify home-buyer leads.",          "role": "system"        }      ],      "model": "gpt-4o",      "provider": "openai"    },    "name": "Riley",    "transcriber": {      "language": "en",      "provider": "deepgram"    },    "voice": {      "provider": "11labs",      "voiceId": "burt"    }  },  "source": "vapi"}'
Example Response
{  "agent": {    "id": "3f0c2a9e-6a51-4c6e-9a3e-2d1b7c4e8f10",    "name": "Riley",    "status": "draft"  },  "success": true,  "warnings": [    {      "field": "language",      "message": "Language 'en' is not available; using en-IN."    },    {      "field": "voice",      "message": "Voice '11labs/burt' is not available; using sarvam voice 'shubh'."    }  ]}