Calls

To enable your users to make video calls, you can either redirect them to your call center, or pre-define a call request and redirect them to its URL, you can find your call center url in the dashboard -> Settings, it looks like: https://video.basma.ai/{username}

In the call center, the user will be asked to fill the custom fields, and select a service, before entering in the queue.

post
Create a Call Request (Schedule a Call)

https://video-api.basma.ai/vendor/call_requests/create
Create a call request, could be scheduled for later, or for now, the request will return a URL which you can redirect the customer to, to start the call. This endpoint must be called from the server-side only, in order to keep the vu_token secure and avoid exposing it.
Request
Response
Request
Body Parameters
make_it_ring
optional
boolean
if set to true, when the customer enters the link, the call will ring for all the agents in the Agent Phone, if set to false, it will not ring and the agent will have to join the call manually join the call from the Call Requests section of the dashboard, default value is false
custom_fields_values
optional
array
the values of the custom fields, as a JSON array of objects, each objects contains name and value parameters, name is the name of the custom field, while value, the value of it, example: [{"name": "mobile", "value": "973xxxxxxxx"}]
scheduled_time
required
boolean
The scheduled time of the call, as a unix timestamp in milliseconds, example: 1589670363000
send_sms
optional
boolean
Send SMS to the customer upon agent joining the call? default value is false
service_id
optional
integer
the ID of the service the call is related to
vu_token
required
string
your access_token, contact your account manager or support@basma.ai to get yours
Response
200: OK
The call has been created, the URL is ready
{
"success": true,
"data": {
"join_url": "https://video.basma.ai/{username}?token=2mjixd"
}
}
404: Not Found
Oops! something went wrong, make sure all the parameters have been passed properly.
{
"success": false,
"errors": []
}

This endpoint may be used to integrate basma.ai within your app, to enable the user to make a call while pre-setting the custom field values, or scheduling a call for an agent, or, for example, synchronizing the calls with your appointments system.