Update hangup schema configuration with PATCH merge semantics.
Editable parameters:
hangupUrl
schema
schema[].name
schema[].type
schema[].description
schema[].required
schema[].enumValues
schema[].children
How to recover current data:
- use
GET /api/v1/assistants/{assistantApiKey}/runtime/hangup/schema
Operational rules
- At least one between
hangupUrl and schema must be present in the bodysuit
- Omitted fields retain the current value
- Sending
schema completely replaces the current schema (it is not a merge)
- Sending
hangupUrl: null removes the URL webhook, disables the hangup tool and also automatically clears the schema
- Sending
schema: [] clears the scheme keeping the current URL
- On assistants
voice_to_voice, the backend updates pbxTools.hangupEndpoint.endpoint and pbxTools.hangupEndpoint.input_schema
How to build the schema body
The schema is an array of properties that define the fields of the sent JSON body
to hangupUrl at the end of the call. Each property has the following structure:
| Field |
Type |
Required |
Description |
name |
string |
yes |
Field name in JSON body |
type |
string |
yes |
Field Type: string, number, boolean, enum, object |
description |
string |
no |
Field Description (helps the LLM model understand what to enter) |
required |
boolean |
no |
If true, the field is required in the body hangup |
enumValues |
string[] |
only for enum |
List of allowed values (only if type: enum) |
children |
Property[] |
only for object |
Nested fields (only if type: object) |
Supported types and how to use them
string — free text field:
{ "name": "motivo", "type": "string", "description": "Motivo del termine della chiamata", "required": true }
number — numeric field:
{ "name": "durata_secondi", "type": "number", "description": "Durata della chiamata in secondi" }
boolean — boolean field:
{ "name": "cliente_soddisfatto", "type": "boolean", "description": "Il cliente si è dichiarato soddisfatto" }
enum — multiple choice field, requires enumValues:
{ "name": "esito", "type": "enum", "description": "Esito della chiamata", "required": true, "enumValues": ["positivo", "negativo", "richiamata"] }
object — nested field group, requires children:
{
"name": "dati_cliente",
"type": "object",
"description": "Dati raccolti durante la chiamata",
"children": [
{ "name": "nome", "type": "string", "description": "Nome del cliente" },
{ "name": "email", "type": "string", "description": "Email del cliente" }
]
}
Example of resulting JSON body
With the above scheme, the webhook will receive a body similar to:
{
"motivo": "Cliente ha chiesto informazioni sul prodotto X",
"esito": "positivo",
"cliente_soddisfatto": true,
"durata_secondi": 182,
"dati_cliente": {
"nome": "Mario Rossi",
"email": "mario@example.com"
}
}