---
title: "Generate Coaching Feedback"
method: POST
path: "/coaching/{session_id}"
tags: ["coaching"]
---

# Generate Coaching Feedback

`POST /coaching/{session_id}`

## Request

- Base URL: `https://dev.whispa.net` (the document declares no server; this is the origin it was published from)
- URL: `https://dev.whispa.net/coaching/{session_id}`
- Auth: one of:
  - OAuth 2
    - Password
    - Token URL: `auth/bearer/login`
  - API key in cookie `access_token`

Generate coaching feedback for a completed call session and store it.

Coaching is generated when:
1. Call was answered by a human (answered_by == 'human')
2. The scenario has a coaching prompt configured

## Path parameters

- `session_id` string, uuid, required

## Request body

- CoachingRequest: Request to generate coaching feedback.
  - `transcript` TranscriptEntry[], required: Conversation transcript
    - `speaker` string, required: Speaker identifier (e.g., 'agent', 'customer')
    - `text` string, required: The spoken text
    - `start_time` number, nullable: Seconds from call start (positions timeline markers)
  - `scenario` string, nullable: Optional fallback when the call has no persisted scenario

## Response `200`

Successful Response

- CoachingResponse: Response containing coaching feedback.
  - `success` boolean, required: Whether feedback generation succeeded
  - `session_id` string, required: Session ID
  - `feedback` CoachingFeedback: Structured coaching feedback with three evaluation dimensions.
    - `dimension_1` FeedbackDimension, required: Feedback for a specific dimension. `extra="ignore"` allows historical rows that still carry a numeric `score` field to deserialize cleanly — the value is dropped on read.
      - `title` string, required: Title of this dimension
      - `positive_feedback` string[], required: The single most important thing the agent did well in this dimension (one item; one sentence, max ~15 words)
      - `improvements` string[], required: The single most impactful, actionable improvement for this dimension (one item; one sentence, max ~20 words, starting with a verb; a second only for a separate compliance-critical issue)
    - `dimension_2` FeedbackDimension, required: Feedback for a specific dimension. `extra="ignore"` allows historical rows that still carry a numeric `score` field to deserialize cleanly — the value is dropped on read.
      - `title` string, required: Title of this dimension
      - `positive_feedback` string[], required: The single most important thing the agent did well in this dimension (one item; one sentence, max ~15 words)
      - `improvements` string[], required: The single most impactful, actionable improvement for this dimension (one item; one sentence, max ~20 words, starting with a verb; a second only for a separate compliance-critical issue)
    - `dimension_3` FeedbackDimension, required: Feedback for a specific dimension. `extra="ignore"` allows historical rows that still carry a numeric `score` field to deserialize cleanly — the value is dropped on read.
      - `title` string, required: Title of this dimension
      - `positive_feedback` string[], required: The single most important thing the agent did well in this dimension (one item; one sentence, max ~15 words)
      - `improvements` string[], required: The single most impactful, actionable improvement for this dimension (one item; one sentence, max ~20 words, starting with a verb; a second only for a separate compliance-critical issue)
  - `reason` string, nullable: Reason when coaching is not applicable

## Other responses

- `422`: Validation Error

---

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