Vapi · Schema

SessionCreatedHook

AIVoiceAgentsRealtimeCPaaS

Properties

Name Type Description
on string This is the event that triggers this hook
do array This is the set of actions to perform when the hook triggers.
name string Optional name for this hook instance. If no name is provided, the hook will be auto generated as UUID. @default UUID
View JSON Schema on GitHub

JSON Schema

vapi-sessioncreatedhook-schema.json Raw ↑
{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "$id": "#/components/schemas/SessionCreatedHook",
  "title": "SessionCreatedHook",
  "type": "object",
  "properties": {
    "on": {
      "type": "string",
      "description": "This is the event that triggers this hook",
      "enum": [
        "session.created"
      ],
      "maxLength": 1000
    },
    "do": {
      "type": "array",
      "description": "This is the set of actions to perform when the hook triggers.",
      "items": {
        "oneOf": [
          {
            "$ref": "#/components/schemas/ToolCallHookAction",
            "title": "ToolCallHookAction"
          }
        ]
      }
    },
    "name": {
      "type": "string",
      "description": "Optional name for this hook instance.\nIf no name is provided, the hook will be auto generated as UUID.\n\n@default UUID",
      "maxLength": 1000
    }
  },
  "required": [
    "on",
    "do"
  ]
}