> For clean Markdown of any page, append .md to the page URL. > For a complete documentation index, see https://docs.conversive.ai/api-sdk-docs/call-action/llms.txt. > For AI client integration (Claude Code, Cursor, etc.), connect to the MCP server at https://docs.conversive.ai/_mcp/server. # Call Action POST https://app.beconversive.com/contact-center/v1/calls/{call_id}/action Content-Type: application/json Perform a real-time control action on an active call. Use this to mute or unmute the agent, put the call on hold, resume it, or hang up. Reference: https://docs.conversive.ai/api-sdk-docs/call-action ## Authentication - `Authorization` header (bearer token, required) — Bearer authentication of the form `Bearer `, where token is your auth token. ## Request ### Path parameters - `call_id` (string, required) — The call UUID returned by `POST /calls/initiate`. ### Body (application/json) This endpoint expects an object. - `action` (enum, required) — The action to perform. `mute` — mutes the agent's audio track. `unmute` — unmutes the agent's audio track. `hold` — puts the call on hold. `unhold` — resumes a held call. `hangup` — disconnects all call participants. - Allowed values: `mute`, `unmute`, `hold`, `unhold`, `hangup` - `room_name` (string, required) — The LiveKit room name returned in the `POST /calls/initiate` response. ## Response ### 200 Action performed successfully. - `msg` (string, optional) — Confirmation message for the action performed. ## Errors ### 400 Bad Request Error Missing `room_name`, invalid action value, or LiveKit operation failed. - `any` ### 401 Unauthorized Error Unauthorized — missing or invalid JWT. - `any` ## Examples ### callAction_example **Response** ```json { "msg": "hold done" } ``` **SDK Code** ```python callAction_example import requests url = "https://app.beconversive.com/contact-center/v1/calls/call_id/action" headers = {"Authorization": "Bearer "} response = requests.post(url, headers=headers) print(response.json()) ``` ```javascript callAction_example const url = 'https://app.beconversive.com/contact-center/v1/calls/call_id/action'; const options = {method: 'POST', headers: {Authorization: 'Bearer '}}; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go callAction_example package main import ( "fmt" "net/http" "io" ) func main() { url := "https://app.beconversive.com/contact-center/v1/calls/call_id/action" req, _ := http.NewRequest("POST", url, nil) req.Header.Add("Authorization", "Bearer ") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby callAction_example require 'uri' require 'net/http' url = URI("https://app.beconversive.com/contact-center/v1/calls/call_id/action") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' response = http.request(request) puts response.read_body ``` ```java callAction_example import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://app.beconversive.com/contact-center/v1/calls/call_id/action") .header("Authorization", "Bearer ") .asString(); ``` ```php callAction_example request('POST', 'https://app.beconversive.com/contact-center/v1/calls/call_id/action', [ 'headers' => [ 'Authorization' => 'Bearer ', ], ]); echo $response->getBody(); ``` ```csharp callAction_example using RestSharp; var client = new RestClient("https://app.beconversive.com/contact-center/v1/calls/call_id/action"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); IRestResponse response = client.Execute(request); ``` ```swift callAction_example import Foundation let headers = ["Authorization": "Bearer "] let request = NSMutableURLRequest(url: NSURL(string: "https://app.beconversive.com/contact-center/v1/calls/call_id/action")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Hold **Request** ```json { "action": "hold", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" } ``` **Response** ```json { "msg": "hold done" } ``` **SDK Code** ```python Hold import requests url = "https://app.beconversive.com/contact-center/v1/calls/call_id/action" payload = { "action": "hold", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Hold const url = 'https://app.beconversive.com/contact-center/v1/calls/call_id/action'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"action":"hold","room_name":"cc_outbound_550e8400-e29b-41d4-a716-446655440000"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Hold package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.beconversive.com/contact-center/v1/calls/call_id/action" payload := strings.NewReader("{\n \"action\": \"hold\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Hold require 'uri' require 'net/http' url = URI("https://app.beconversive.com/contact-center/v1/calls/call_id/action") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"action\": \"hold\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}" response = http.request(request) puts response.read_body ``` ```java Hold import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://app.beconversive.com/contact-center/v1/calls/call_id/action") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"action\": \"hold\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}") .asString(); ``` ```php Hold request('POST', 'https://app.beconversive.com/contact-center/v1/calls/call_id/action', [ 'body' => '{ "action": "hold", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Hold using RestSharp; var client = new RestClient("https://app.beconversive.com/contact-center/v1/calls/call_id/action"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"action\": \"hold\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Hold import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "action": "hold", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://app.beconversive.com/contact-center/v1/calls/call_id/action")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Mute **Request** ```json { "action": "mute", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" } ``` **Response** ```json { "msg": "hold done" } ``` **SDK Code** ```python Mute import requests url = "https://app.beconversive.com/contact-center/v1/calls/call_id/action" payload = { "action": "mute", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Mute const url = 'https://app.beconversive.com/contact-center/v1/calls/call_id/action'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"action":"mute","room_name":"cc_outbound_550e8400-e29b-41d4-a716-446655440000"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Mute package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.beconversive.com/contact-center/v1/calls/call_id/action" payload := strings.NewReader("{\n \"action\": \"mute\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Mute require 'uri' require 'net/http' url = URI("https://app.beconversive.com/contact-center/v1/calls/call_id/action") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"action\": \"mute\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}" response = http.request(request) puts response.read_body ``` ```java Mute import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://app.beconversive.com/contact-center/v1/calls/call_id/action") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"action\": \"mute\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}") .asString(); ``` ```php Mute request('POST', 'https://app.beconversive.com/contact-center/v1/calls/call_id/action', [ 'body' => '{ "action": "mute", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Mute using RestSharp; var client = new RestClient("https://app.beconversive.com/contact-center/v1/calls/call_id/action"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"action\": \"mute\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Mute import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "action": "mute", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://app.beconversive.com/contact-center/v1/calls/call_id/action")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ``` ### Hangup **Request** ```json { "action": "hangup", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" } ``` **Response** ```json { "msg": "hold done" } ``` **SDK Code** ```python Hangup import requests url = "https://app.beconversive.com/contact-center/v1/calls/call_id/action" payload = { "action": "hangup", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" } headers = { "Authorization": "Bearer ", "Content-Type": "application/json" } response = requests.post(url, json=payload, headers=headers) print(response.json()) ``` ```javascript Hangup const url = 'https://app.beconversive.com/contact-center/v1/calls/call_id/action'; const options = { method: 'POST', headers: {Authorization: 'Bearer ', 'Content-Type': 'application/json'}, body: '{"action":"hangup","room_name":"cc_outbound_550e8400-e29b-41d4-a716-446655440000"}' }; try { const response = await fetch(url, options); const data = await response.json(); console.log(data); } catch (error) { console.error(error); } ``` ```go Hangup package main import ( "fmt" "strings" "net/http" "io" ) func main() { url := "https://app.beconversive.com/contact-center/v1/calls/call_id/action" payload := strings.NewReader("{\n \"action\": \"hangup\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}") req, _ := http.NewRequest("POST", url, payload) req.Header.Add("Authorization", "Bearer ") req.Header.Add("Content-Type", "application/json") res, _ := http.DefaultClient.Do(req) defer res.Body.Close() body, _ := io.ReadAll(res.Body) fmt.Println(res) fmt.Println(string(body)) } ``` ```ruby Hangup require 'uri' require 'net/http' url = URI("https://app.beconversive.com/contact-center/v1/calls/call_id/action") http = Net::HTTP.new(url.host, url.port) http.use_ssl = true request = Net::HTTP::Post.new(url) request["Authorization"] = 'Bearer ' request["Content-Type"] = 'application/json' request.body = "{\n \"action\": \"hangup\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}" response = http.request(request) puts response.read_body ``` ```java Hangup import com.mashape.unirest.http.HttpResponse; import com.mashape.unirest.http.Unirest; HttpResponse response = Unirest.post("https://app.beconversive.com/contact-center/v1/calls/call_id/action") .header("Authorization", "Bearer ") .header("Content-Type", "application/json") .body("{\n \"action\": \"hangup\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}") .asString(); ``` ```php Hangup request('POST', 'https://app.beconversive.com/contact-center/v1/calls/call_id/action', [ 'body' => '{ "action": "hangup", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" }', 'headers' => [ 'Authorization' => 'Bearer ', 'Content-Type' => 'application/json', ], ]); echo $response->getBody(); ``` ```csharp Hangup using RestSharp; var client = new RestClient("https://app.beconversive.com/contact-center/v1/calls/call_id/action"); var request = new RestRequest(Method.POST); request.AddHeader("Authorization", "Bearer "); request.AddHeader("Content-Type", "application/json"); request.AddParameter("application/json", "{\n \"action\": \"hangup\",\n \"room_name\": \"cc_outbound_550e8400-e29b-41d4-a716-446655440000\"\n}", ParameterType.RequestBody); IRestResponse response = client.Execute(request); ``` ```swift Hangup import Foundation let headers = [ "Authorization": "Bearer ", "Content-Type": "application/json" ] let parameters = [ "action": "hangup", "room_name": "cc_outbound_550e8400-e29b-41d4-a716-446655440000" ] as [String : Any] let postData = JSONSerialization.data(withJSONObject: parameters, options: []) let request = NSMutableURLRequest(url: NSURL(string: "https://app.beconversive.com/contact-center/v1/calls/call_id/action")! as URL, cachePolicy: .useProtocolCachePolicy, timeoutInterval: 10.0) request.httpMethod = "POST" request.allHTTPHeaderFields = headers request.httpBody = postData as Data let session = URLSession.shared let dataTask = session.dataTask(with: request as URLRequest, completionHandler: { (data, response, error) -> Void in if (error != nil) { print(error as Any) } else { let httpResponse = response as? HTTPURLResponse print(httpResponse) } }) dataTask.resume() ```