Skip to main content

Documentation Index

Fetch the complete documentation index at: https://docs.medera.info/llms.txt

Use this file to discover all available pages before exploring further.

1. Configure the deployment

Use the Agent Builder Canvas to create or clone the Grace — Patient Intake Agent template. Pick:
  • intake_template_id
  • screeners (default ["phq-9", "gad-7", "audit-c", "c-ssrs"])
  • routing_matrix
  • crisis_escalation_tree_id
  • workflow_modules (e.g. ["general_intake"])
  • language (default en-US)
Publish the workflow and the canvas auto-deploys to sandbox.

2. Initialize the agent for the org

curl -X POST https://api.medera.ai/api/onboarding/initialize-organization \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "org_name": "Acme Clinic",
    "org_type": "behavioral_health",
    "initial_agents": ["intake"],
    "voice_settings": { "language": "en-US", "tone": "warm" }
  }'

3. Start an intake call

curl -X POST https://api.medera.ai/api/intake-calls \
  -H "Authorization: Bearer $TOKEN" \
  -d '{
    "patient_id": "pat_abc",
    "phone_number": "+15555550100",
    "deployment_id": "dep_abc"
  }'

4. Subscribe to real-time updates

const ws = new WebSocket(`wss://api.medera.ai/ws/call/${callId}?token=${jwt}`);
ws.on('message', (msg) => {
  const event = JSON.parse(msg);
  // event.type: call-started | utterance-processed | task-extracted | call-ended
});

5. Receive webhook events

If your tenant has a webhook URL configured, you’ll receive signed outbound webhooks:
POST <your_webhook_url>
Medera-Signature: sha256=<hmac>
{
  "event": "intake.summary.ready",
  "call_id": "...",
  "summary": { "screeners": {...}, "icd10_candidates": [...] }
}
See Vapi Webhooks.