Last updated on Jun 27
2 min read
Voice API
Overview
The Voice API allows you to connect Samespace to your existing systems. You can seamlessly transfer data from your CRM or access real-time agent and team statistics from Samespace.
Click-to-Call API
Samespace offers a server-side REST API that enables you to initiate a call from within your existing system. The API sends a call event to the Samespace dock and automatically dials the number mapped to a custom entity in Salesforce.
Content-Type: application/json
{
"username":"username@cloud_id",
"number":"448442430000",
"callerId": "+445346543434", //optional
"custom":{"name": "Alex", "phone":”+1 646 810 7016”,... },
}
Data Fields
- username: It is Samespace username. The user can keep this as the email ID of the agent to ensure parity between Samespace and Salesforce.
- cluster_id: Region ID where the samespace instance is hosted.
- cloud_id: Unique domain of Samespace
- Number: Phone Number that needs to be dialled when clicked on Salesforce custom entity
- Custom: Any custom payload that you want to send to samespace dock. Authentication will happen via the cluster-ID and the username of the agent
- Error Codes: In case the agent is not logged in, the following error code is generated
{
"success": false,
"message": "Cant make call! Not logged In"
}
Callback API
Allow your customers to request a call back and save time. An easy to use API to enable callback functionality.
POST URL: https://cluster_id.samespace.com/apiv1/team/make_call
Content-Type: application/json
{
"space_id": "alpha",
"team_name": "helpdesk",
"number" : "919769XXXXXX",
"attributes": {
"name": "Tom",
"email": "[email protected]"
},
}
Data Fields
- space_id: Unique domain of Samespace
- team_name: Samespace team name
- number: Phone number on which the callback has to be made
- attributes: The details you would like your agent to see, example name, email, company and more
Reset Token API
The Reset Token API allows you to dynamically retrieve the authentication token.
POST URL: https://cluster_id.samespace.com/router/api/v2/token/reset
{
"cloud_id": "leap",
"auth_token": "538d1ae0-3e9f-11ea-9d9c-394a26b437b0"
}
Authentication: It will happen via the auth_token, cluster_id and cloud_id.