Skip to main content

Hang Up Call

When you want to hang up a call from outside of uContact, this API is used, allowing for a more complete integration.

You can check the Postman Collection to test in your instance.

All data enclosed in "{{ }}" are values that will be replaced with the client's own data and/or the corresponding instance.

Request Information

Method Resource
POST /Integra/resources/Agents/HangupPhone

Request Header

Option Value
Content-Type application/x-www-form-urlencoded
Authorization Basic {{Token}}

Request Body

Parameter Type Required Description

phone

Number (Integer) Yes Agent's phone number/extension


HTTP Request

Code Examples

You can copy the following code examples and replace the "{{variable}}" with the correct data.

HTTP
POST /Integra/resources/Agents/HangupPhone HTTP/1.1
Host: {{instance}}.ucontactcloud.com
Authorization: Basic {{Token}}
Content-Type: application/x-www-form-urlencoded
Content-Length: 10

phone={{AgentPhone}}
cURL
JavaScript
JQuery
C#
Java
OkHttpClient client = new OkHttpClient().newBuilder()
  .build();
MediaType mediaType = MediaType.parse("application/x-www-form-urlencoded");
RequestBody body = RequestBody.create(mediaType, "phone={{AgentPhone}}");
Request request = new Request.Builder()
  .url("https://{{Instance}}.ucontactcloud.com/Integra/resources/Agents/HangupPhone")
  .method("POST", body)
  .addHeader("Authorization", "Basic {{Token}}")
  .addHeader("Content-Type", "application/x-www-form-urlencoded")
  .build();
Response response = client.newCall(request).execute();
Python
import http.client

conn = http.client.HTTPSConnection("{{Instance}}.ucontactcloud.com")
payload = 'phone={{AgentPhone}}'
headers = {
  'Authorization': 'Basic {{Token}}',
  'Content-Type': 'application/x-www-form-urlencoded'
}
conn.request("POST", "/Integra/resources/Agents/HangupPhone", payload, headers)
res = conn.getresponse()
data = res.read()
print(data.decode("utf-8"))



HTTP Response

Successful Response

Error Response

0