You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Once you have the `controlUrl`, you can inject a message into the live call using a POST request. This can be done by sending a JSON payload to the `controlUrl`.
62
+
Once you have the `controlUrl`, you can use various control features during a live call. Here are all the available control options:
63
63
64
-
### Example: Injecting a Message
64
+
### 1. Say Message
65
+
Makes the assistant say a specific message during the call.
65
66
66
67
```bash
67
68
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control'
68
69
-H 'content-type: application/json'
69
70
--data-raw '{
70
71
"type": "say",
71
-
"message": "Welcome to Vapi, this message was injected during the call."
72
+
"content": "Welcome to Vapi, this message was injected during the call.",
73
+
"endCallAfterSpoken": false
72
74
}'
75
+
```
76
+
77
+
### 2. Add Message to Conversation
78
+
Adds a message to the conversation history and optionally triggers a response.
79
+
80
+
```bash
81
+
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control'
82
+
-H 'content-type: application/json'
83
+
--data-raw '{
84
+
"type": "add-message",
85
+
"message": {
86
+
"role": "system",
87
+
"content": "New message added to conversation"
88
+
},
89
+
"triggerResponseEnabled": true
90
+
}'
91
+
```
92
+
93
+
### 3. Assistant Control
94
+
Control the assistant's behavior during the call.
95
+
96
+
```bash
97
+
curl -X POST 'https://aws-us-west-2-production1-phone-call-websocket.vapi.ai/7420f27a-30fd-4f49-a995-5549ae7cc00d/control'
0 commit comments