Voice Tools

Post-Call Survey

Ask callers a survey question before ending the call — collect ratings, yes/no responses, or open-ended feedback.

Post-Call Survey

The Post-Call Survey tool prompts the caller with a survey question before ending the call. Responses are saved to the session for analytics. Supports rating scales, yes/no, and open-ended formats.

How It Works

Agent: "Before I let you go, I'd love your feedback. On a scale of 1 to 5, how would you rate your experience today?"
Caller: "I'd say 4 out of 5."
-> Agent calls record_survey_response with response="4 out of 5", rating=4
Agent: "Thank you for the feedback! Have a great day."

Configuration

{
  "postCallSurveyEnabled": true,
  "surveyQuestion": "On a scale of 1 to 5, how would you rate your experience today?",
  "surveyType": "rating"
}
SettingTypeDefaultDescription
postCallSurveyEnabledbooleanfalseEnable post-call survey
surveyQuestionstringThe survey question to ask
surveyTypestringratingResponse type: rating, yes_no, open_ended

Survey Types

TypeAgent Behavior
ratingAsks for a rating from 1 to 5 stars
yes_noAsks a yes or no question
open_endedAsks for open-ended feedback

LLM Tool

Tool name: record_survey_response

Parameters:
  response: string (the caller's survey answer)
  rating: integer (numeric rating, 0 if not applicable)

Returns: "Survey response recorded. Thank the caller and end the call."

Saved Data

Survey responses are saved to the voice_sessions table:

{
  "question": "On a scale of 1 to 5, how would you rate your experience today?",
  "type": "rating",
  "response": "4 out of 5",
  "rating": 4
}

Example — Create Agent with Post-Call Survey

curl -X POST https://api.thinnest.ai/v1/agents \
  -H "Authorization: Bearer $THINNESTAI_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "name": "Support Agent with Survey",
    "model": "gpt-4o-mini",
    "instructions": "You are a customer support agent. Before ending the call, ask the survey question and record the response. Do not skip the survey unless the caller refuses.",
    "voiceEnabled": true,
    "transcriber": { "provider": "deepgram", "model": "nova-2-conversationalai" },
    "voice": { "provider": "deepgram", "voiceId": "aura-2-thalia-en" },
    "postCallSurveyEnabled": true,
    "surveyQuestion": "On a scale of 1 to 5, how would you rate your experience today?",
    "surveyType": "rating"
  }'

On this page