When a user clicks a phone number in Upsales, the phone widget fires up, Upsales creates a phone call record and your app gets a request to the following endpoint
/call
The request is a POST with a JSON body, and your app's endpoint must use HTTPS. The body has the same fields as every app request (see Request body). Use user to find out which user is making the call.
The requests body.data is the phone call Upsales just created, in the same format as the phoneCall object in Upsales API:
"data": {
"id": 450,
"phoneNumber": "+1 555 8772537",
"client": { "id": 123, "name": "Company name" },
"contact": { "id": 345, "name": "Contact name" },
"user": { "id": 1, "name": "User name" },
"status": 0,
"durationInS": 0,
"related": [],
...
}
-
id: the ID of the phone call. Use it when you update the call through Upsales API. -
phoneNumber: the number to call. -
clientandcontact: the company and contact the number belongs to, ornullif there is none. -
user: the user making the call. -
date: when the call was started. -
type: the ID of your app. -
related: a list of activities, appointments, orders or opportunities linked to the call, each withid,typeandname.
Use this request to initiate the phone call. Respond within 30 seconds with status 200 or 201 and a JSON body. If your app responds with any other status or does not respond in time, Upsales deletes the phone call record and the user sees the message "Could not make call. Verify connection to the integration".