> ## Documentation Index
> Fetch the complete documentation index at: https://intervyo.ai/docs/llms.txt
> Use this file to discover all available pages before exploring further.

# Training, step by step

> Set up a coaching program where people practice and improve — agent, template, retake-friendly stages, and enrolling your team.

Training is about **helping people get better**, not filtering them out. So the
setup looks a little different from hiring: friendlier agent, retakes allowed,
and feedback turned all the way up.

<Note>
  You need an API key (`iv_live_...`) from **Developer → API Keys**. Use it in
  the `x-api-key` header and replace `<slug>` with your team slug.
</Note>

## Step 1 — Create a coaching agent

A kind, encouraging interviewer that gives lots of feedback.

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/interviewers?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Sales Coach",
    "persona": "Sam, a friendly sales enablement coach.",
    "useCase": "training",
    "evaluationDimensions": [
      { "name": "Discovery",          "description": "Finds the buyer pain", "weight": 50 },
      { "name": "Objection Handling", "description": "Reframes pushback",     "weight": 50 }
    ],
    "interaction": { "tone": "friendly", "difficulty": "adaptive", "probingDepth": "medium" },
    "output": { "includeImprovementFeedback": true }
  }'
```

👉 Save the `id` as `AGENT_ID`.

## Step 2 — Describe the program

Set `use_case` to `training` and pick the *ready / needs practice* outcome.

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/roles?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "template_name": "Q3 Sales Enablement",
    "use_case": "training",
    "description": "Discovery and objection-handling practice for AEs.",
    "objective": "Help reps run a confident discovery call.",
    "success_outcome": "ready_needs_training",
    "default_session_mode": "roleplay_simulation"
  }'
```

👉 Save the `id` as `TEMPLATE_ID`.

## Step 3 — Add practice drills (with retakes)

Each drill is a stage. Turn on `allow_retake` so people can try again.

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/rounds?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "role_id": "TEMPLATE_ID",
    "type": "discovery",
    "stage_name": "Discovery Drill",
    "stage_type": "roleplay_simulation",
    "stage_order": 0,
    "allow_retake": true,
    "pass_threshold": 70,
    "interviewer_id": "AGENT_ID"
  }'
```

Repeat with `stage_order: 1` for an "Objection Drill".

## Step 4 — Add your team members

Each rep is a participant. Have a lot of them? Use bulk import.

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/participants/bulk?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "participants": [
      { "name": "Carlos Reyes", "email": "carlos@yourco.com", "external_id": "workday-44120", "role_id": "TEMPLATE_ID" },
      { "name": "Dana Lee",     "email": "dana@yourco.com",   "external_id": "workday-44121", "role_id": "TEMPLATE_ID" }
    ]
  }'
```

## Step 5 — Start the practice

Schedule a session for each rep, pointing at the drill stage.

```bash theme={null}
curl -X POST "https://www.intervyo.ai/api/v1/sessions?accountSlug=<slug>" \
  -H "x-api-key: iv_live_your_key_here" \
  -H "Content-Type: application/json" \
  -d '{
    "candidate_id": "PARTICIPANT_ID",
    "role_id": "TEMPLATE_ID",
    "stage": "discovery"
  }'
```

## Step 6 — Review progress

Look at scores over time. Because retakes are on, reps can keep practicing and
you can watch the numbers climb.

<Card title="List a person's sessions" icon="list" href="/api-reference/participants/get-participants-id-sessions">
  `GET /api/v1/participants/{id}/sessions` shows every attempt and score.
</Card>

<Tip>
  Keep the agent's `tone` friendly. People practice more when the coach is
  encouraging, and the improvement feedback is what makes training stick.
</Tip>
