Vapi · Schema

UserMessage

AIVoiceAgentsRealtimeCPaaS

Properties

Name Type Description
role string The role of the user in the conversation.
message string The message content from the user.
time number The timestamp when the message was sent.
endTime number The timestamp when the message ended.
secondsFromStart number The number of seconds from the start of the conversation.
duration number The duration of the message in seconds.
isFiltered boolean Indicates if the message was filtered for security reasons.
detectedThreats array List of detected security threats if the message was filtered.
originalMessage string The original message before filtering (only included if content was filtered).
metadata object The metadata associated with the message. Currently used to store the transcriber's word level confidence.
speakerLabel string Stable speaker label for diarized user speakers (e.g., "Speaker 1").
View JSON Schema on GitHub

JSON Schema

vapi-usermessage-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/UserMessage",
  "title": "UserMessage",
  "type": "object",
  "properties": {
    "role": {
      "type": "string",
      "description": "The role of the user in the conversation."
    },
    "message": {
      "type": "string",
      "description": "The message content from the user."
    },
    "time": {
      "type": "number",
      "description": "The timestamp when the message was sent."
    },
    "endTime": {
      "type": "number",
      "description": "The timestamp when the message ended."
    },
    "secondsFromStart": {
      "type": "number",
      "description": "The number of seconds from the start of the conversation."
    },
    "duration": {
      "type": "number",
      "description": "The duration of the message in seconds."
    },
    "isFiltered": {
      "type": "boolean",
      "description": "Indicates if the message was filtered for security reasons."
    },
    "detectedThreats": {
      "description": "List of detected security threats if the message was filtered.",
      "type": "array",
      "items": {
        "type": "string"
      }
    },
    "originalMessage": {
      "type": "string",
      "description": "The original message before filtering (only included if content was filtered)."
    },
    "metadata": {
      "type": "object",
      "description": "The metadata associated with the message. Currently used to store the transcriber's word level confidence."
    },
    "speakerLabel": {
      "type": "string",
      "description": "Stable speaker label for diarized user speakers (e.g., \"Speaker 1\")."
    }
  },
  "required": [
    "role",
    "message",
    "time",
    "endTime",
    "secondsFromStart"
  ]
}