Skip to content
Discord

Assistants

An assistant is v1’s agent: prompt, voice identity, telephony bindings, call settings, knowledge base and post-call analysis plan. All endpoints are workspace-scoped — send the workspace header.

variant.typeUse for
customRecommended for everything you author. You write agent.systemPrompt and declare variables in variant.config.inputSchema.
abandoned_cartA built-in Shopify cart-recovery flow. Configure variant.config.abandoned_cart.
POST /v1/admin/assistant/create
FieldTypeRequiredNotes
namestringyesMax 40 characters. Unique per workspace.
variant.typeenumyescustom | abandoned_cart
variant.config.inputSchemaarraynoVariables the prompt references. See variables.
agent.identityobjectyes{ name, gender, voice }gender is male or female, voice is a slug from the voice gallery.
agent.systemPromptstringnoThe instructions. Supports {{placeholders}}.
agent.firstMessagestringnoSpoken on connect. If empty, a greeting is generated from the identity and ICP language.
agent.endMessagestringnoSpoken just before hanging up.
agent.toolsstring[]noAPI tool _id values the assistant may call.
telephony.inbound / .outboundstringnoTelephony number _ids.
icpContextobjectnoSee ICP context.
callSettingsobjectnoSee call settings.
analysisPlanobjectnoSee analysis plan.
knowledgeBaseobjectnoSee Knowledge Base.
preCallobjectnoSee pre-call enrichment.
curl -X POST https://api.voice-agents.miraiminds.co/v1/admin/assistant/create \
  -H "x-public-key: pk_1234567890abcdef1234567890abcdef" \
  -H "x-private-key: sk_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
  -H "workspace: 6690a1b2c3d4e5f600000002" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Order Update Assistant",
    "variant": {
      "type": "custom",
      "config": {
        "inputSchema": [
          { "name": "customerName", "type": "string", "isRequired": true },
          { "name": "orderId", "type": "string", "isRequired": true },
          { "name": "deliveryDate", "type": "string", "isRequired": false }
        ]
      }
    },
    "agent": {
      "identity": { "name": "priya", "gender": "female", "voice": "priya" },
      "systemPrompt": "You are Priya from Acme. Greet {{customerName}} and confirm order {{orderId}}. If a delivery date is available, mention it: expected {{deliveryDate}}.",
      "firstMessage": "Hi {{customerName}}, this is Priya from Acme.",
      "endMessage": "Thank you for your time. Have a great day!"
    },
    "icpContext": { "language": "hinglish" },
    "callSettings": {
      "slots": [{ "startTime": "09:00", "endTime": "21:00" }],
      "maxCallDuration": 200,
      "concurrentCallCount": 5,
      "retryProtocol": {
        "maxAttemptsNoPickup": 2,
        "maxAttemptsLowEngagement": 1,
        "reAttemptPeriod": 300,
        "maxRescheduleCount": 1
      }
    }
  }'

200 OK — the created assistant under data.

StatusCause
400Validation error
409An assistant with this name already exists in the workspace

Declare each variable in variant.config.inputSchema, reference it in agent.systemPrompt / agent.firstMessage as {{name}}, and supply its value per call. Nested values use dot paths: {{customer.firstName}}.

{
  "inputSchema": [
    { "name": "customerName", "type": "string", "isRequired": true },
    { "name": "orderId", "type": "string", "isRequired": true }
  ]
}

type is one of string, number, boolean, object, array; nested shapes use fields. A placeholder with no matching value is left in the prompt verbatim — the assistant will read the braces aloud. Always send every required variable.

Shapes tone, vocabulary and pace.

FieldValues
languagehinglish, english, hindi, telugu, tamil, kannada, malayalam, gujarati, punjabi, odia, marathi
targetAgeGroupsgen_z, millennials, gen_x, boomers
locationTiersmetro_urban, tier1, tier2, tier3, rural
targetAudiencemale, female, children
FieldTypeNotes
slotsarrayRequired. At least one { startTime, endTime } in HH:MM, in the workspace timezone. Calls run only inside these windows.
maxCallDurationnumberSeconds.
concurrentCallCountnumberMaximum 10.
retryProtocolobjectSee below. Required.
{
  "retryProtocol": {
    "maxAttemptsNoPickup": 2,
    "maxAttemptsLowEngagement": 1,
    "reAttemptPeriod": 300,
    "maxRescheduleCount": 1
  }
}
FieldDefaultMeaning
maxAttemptsNoPickup2Rang, nobody answered — retry this many times.
maxAttemptsLowEngagement1Answered but cut immediately — retry this many times.
reAttemptPeriod300Seconds between attempts.
maxRescheduleCount1Callbacks the customer can request. Maximum 5.

slots is v1’s calling-window enforcement. Set it to your compliant window — see India calling rules.

Post-call AI evaluation. Results arrive on the end-of-call event.

FieldWhat it does
successCriteriaPlanA prompt that must return true or false. Write explicit, enumerated conditions.
summaryPlanA prompt producing a plain-English summary. Tell it what to cover.
callInsightPlanStructured fields extracted from the call.
{
  "analysisPlan": {
    "successCriteriaPlan": "Return true ONLY if the customer explicitly confirmed the order AND agreed to the total price AND chose a payment method. Return false if they were 'just checking' or asked for more discount after the final price.",
    "summaryPlan": "Summarize: (1) the customer issue, (2) the resolution, (3) sentiment, (4) follow-up needed."
  }
}

Vague success criteria produce vague booleans. Enumerate the conditions and state the false cases explicitly.

If preCall.apiPlan.url is set, we call your endpoint before the call connects (inbound or outbound) and merge the returned data into the call’s variables, so your {{placeholders}} can use it — greeting an inbound caller by name, for example.

We send number and assistantId as query parameters for method: get, or as a JSON body for method: post. Keep the endpoint fast: it sits in front of the call.

GET /v1/admin/assistant/get/{assistantId}
curl https://api.voice-agents.miraiminds.co/v1/admin/assistant/get/68c128a658cd7d0668bce78d \
  -H "x-public-key: pk_1234567890abcdef1234567890abcdef" \
  -H "x-private-key: sk_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
  -H "workspace: 6690a1b2c3d4e5f600000002"

200 with the assistant under data; 404 if it is not in this workspace.

GET /v1/admin/assistant/list

Returns every assistant in the workspace under data.

PUT /v1/admin/assistant/update/{assistantId}

Send the fields you want to change.

curl -X PUT https://api.voice-agents.miraiminds.co/v1/admin/assistant/update/68c128a658cd7d0668bce78d \
  -H "x-public-key: pk_1234567890abcdef1234567890abcdef" \
  -H "x-private-key: sk_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef" \
  -H "workspace: 6690a1b2c3d4e5f600000002" \
  -H "Content-Type: application/json" \
  -d '{ "callSettings": { "maxCallDuration": 180, "concurrentCallCount": 3 } }'
StatusCause
400The assistant is archived and cannot be updated
404Not found
409Another assistant already has that name

There is no delete. Archive the workspace or organization instead.

GET /v1/admin/voice-gallery

The catalogue of available voices. The slug is what goes in agent.identity.voice — and in v2’s voice.voice_id.

curl https://api.voice-agents.miraiminds.co/v1/admin/voice-gallery \
  -H "x-public-key: pk_1234567890abcdef1234567890abcdef" \
  -H "x-private-key: sk_1234567890abcdef1234567890abcdef1234567890abcdef1234567890abcdef"
200 OK
{
  "status_code": 200,
  "message": "Voices fetched successfully.",
  "data": [
    {
      "_id": "6690a1b2c3d4e5f600000301",
      "slug": "priya",
      "sampleAudio": "https://cdn.miraiminds.co/voices/priya.wav"
    }
  ]
}

Listen to sampleAudio before you pick. Voice choice moves answer-through rates more than prompt wording does.