When a user ends the call from Upsales, your app gets a POST request with a JSON body to the following endpoint
/hangup
Your app endpoint must use HTTPS and answer with status 200 or 201.
The request's body.data contains the id of the call to end. This is the id of the phone call Upsales created and sent to your app in the /call request (body.data.id).
"data": {
"callId": 123
}
The body also contains the information you need to know which user to hang up for: "user" (with the user's id in "user.id"), "config" and, for apps that users configure themselves, "userConfig".
To tell Upsales that a call was ended on your end, see Phone: Hangup webhook.