c
SparkTG is a Cloud Telephony service provider. Cloud Telephony is an on-demand service to provide the robust telephony features, reliably to organisations providing products and services.
Capabilities are available over the network and accessed through standard mechanisms. Consumers should be able to login from anywhere and control their service.
The telecom resources are pooled to serve multiple consumers using a multi-tenant model, with different physical and virtual resources dynamically assigned and reassigned according to consumer demand. This reduces consumer’s cost of developing in-house telephony service and they pay only for the resource they use.
Telephony Ports can be rapidly and elastically provisioned, in some cases automatically, to quickly scale out and rapidly released to quickly scale in.
Cloud system automatically control and optimize resource use by leveraging a metering capability at some level of abstraction appropriate to the type of service (e.g., number of inbound calls, number of outbound calls, and number of spam calls). Resource usage can be monitored, controlled, and reported providing transparency for both the provider and consumer of the utilized service. With these objectives in perspective, Spark TG is introducing APIs for most of its services for customer to easily test and integrate them with their applications (web or desktop or mobile).
This document is intended for the developers and requires basic knowledge of Spark TG Cloud Telephony platform. Spark TG will need to provision API service in advance for each customer before they can use it in their applications.
We have REST based API’s in which we use basic authentication. You have to send basic auth headers yourself. To do this you have to pass a string of the form username:password.
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/calls" -d"number=9999999999" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Comments | Mandatory |
number | Integer | 9999999999 | Number of customer to whom the call is to made | Yes |
service-id | Integer | 15 | Id of the service | No |
country-code | Integer | 91 | Required only for special/customized API, given by SparkTG in such case | No |
agent-dial-first | Boolean | true | No | |
recording | Boolean | true | No | |
msg-to-agent | String | Customer asked to call back | No | |
Response : Success |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/calls" -d"number=9999999999&schedule-time=1553953912872&agent-sip=10101" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
number | Integer | 9999999999 | Yes | |
country-code | Integer | 91 | No | |
schedule-time | Long | 1553953912872 | Yes | |
max-tries | Integer | 1 | No | |
skill-id | Integer | 345 | No | |
Response : Success |
curl -i -X POST -u "username:password" -d "xnid=0e5aff8c-8707-4377-8baa-31cceab9fca7&toagentid=321&agent-id=432" "https://telephonycloud.co.in/api/v1/add-call" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
toagentid | Integer | 345 | Yes | |
agent-id | Integer | 675 | Yes | |
xnid | UUID | 0a83b9e6-50b7-48c8-a3c5-2e8f7d60e1ae | Yes | |
Response : {"isError":false,"callTxnId":"0e5aff8c-8707-4377-8baa-31cceab9fca7"} |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/transfer" -d "agent-id=345&type=BLIND&to-agent-id=456call-id=0a83b9e6-50b7-48c8-a3c5-2e8f7d60e1ae" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
agent-id | Integer | 345 | Yes | |
type | String | BLIND / ATTENDED | Yes | |
call-id | UUID | 0a83b9e6-50b7-48c8-a3c5-2e8f7d60e1ae | Yes | |
to-agent-id | Integer | 456 | Yes | |
Response : true |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/agents" | ||||
---|---|---|---|---|
No parameters required : If provided credentials of user which have admin rights then all the agents of that service will be shared else only the agent of whom credentials will be passed in API |
||||
Response : [{"id":6,"number":"2","number1":null,"name":"Agent3","status":0,"sip":"10203","time":1551783584000,"active": true,"country_code":"91","svc_id":2,"user_id":6,"call_txn_id":"ed6bae01-cdcc-4535-8bf4-38c9ba412647,40391936-ea2a-450e-89c0-529b6a8945a5,f95e0068-89a0-478f-b982-4562fcbadfff,11d6928b-80de-4b1b-97e5-e002667f8ad3,538c3619-3d42-47a6-ba9a-a9a78f25343d","bind_count":0,"customer_bound_trunk":null}] |
curl -X PATCH -u "username:password" https://telephonycloud.co.in/api/v1/agents?status=0 | ||||
---|---|---|---|---|
Parameter | Type | Sample | Comments | Mandatory |
status | Integer | 0 | Status number resembles which type of status is desired. See table Status below | Yes |
break | Integer | 0 | Break id resembles that which type of break is taken against the status. See table Break below | No |
agent-number | String | 999XXXX999 | Number of the agent of which status to be updated, useful in case of admin credentials, can change status of agent via agent’s number | No |
Response : {"break":-1,"status":0} |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/agent-recent-calls?svc-id=1&recent_txn_id=40391936-ea2a-450e-89c0-529b6a8945a5,f95e0068-89a0-478f-b982-4562fcbadfff,11d6928b-80de-4b1b-97e5-e002667f8ad3" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
recent_txn_id | List String | 40391936-ea2a-450e-89c0-529b6a8945a5,f95e0068-89a0-478f-b982-4562fcbadfff,11d6928b-80de-4b1b-97e5-e002667f8ad3 | Yes | |
svc-id | Integer | 15 | Yes | |
Response : [{"duration":"4","receivedBy":null,"note":"","disposition":"MISSED","xnid":"6c26516d-cef8-4246-acc7-faa0178a8ccd","recording":null,"time":"2019-04-0413:36:10","callType":"INBOUND","ivrData":""},{"duration":"3","receivedBy":null,"note":"","disposition":"MISSED","xnid":"be03b0f8-97dd-4655-a150-5d84dd29a02b","recording":null,"time":"2019-04-0413:27:59","callType":"INBOUND","ivrData":""},{"duration":"3","receivedBy":null,"note":"","disposition":"MISSED","xnid":"c1f0b038-775e-49cb-9865-f7d7cae5c1bc","recording":null,"time":"2019-04-0413:27:20","callType":"INBOUND","ivrData":""},{"duration":"1","receivedBy":null,"note":"","disposition":"MISSED","xnid":"076e59fe-afbe-4210-b65f-85356cdf5ae4","recording":null,"time":"2019-04-0413:12:52","callType":"INBOUND","ivrData":""},{"duration":"5","receivedBy":null,"note":"","disposition":"MISSED","xnid":"ec7e97f5-2587-4cd9-986f-9c616dbd0606","recording":null,"time":"2019-04-0413:11:23","callType":"INBOUND","ivrData":""}] |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/dashboard?svc-id=1" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
svc-id | Integer | 15 | Yes | |
Response : {"isSupervisor":true,"userName":"AgentN","serviceName":"TestService","svcId":1,"agents": [{"id":1,"number":"9999880403","number1":"","name":"Admin","status":0,"sip":"10100","time":1555324648000,"active":true,"country_code":"91", "svc_id":1,"user_id":1,"call_txn_id":"faeccd7e-5907-42e7-9b4d-85d0de7bc8e4,aa9ca784-63f0-44a9-b049-a96acc4cf4cf, c7aecf9e-327d-463a-b073-bc0f6b0c51e5,f2c3a568-c34e-43ca-b4d9-f81999469a08,5b4669e1-0468-48b9-ae57- 1850fc9a6b9a","bind_count":0,"customer_bound_trunk":null},{"id":2,"number":"9717397366","number1":"9250404161","name":"Agent1", "status":2,"sip":"10101","time":1553847439000,"active":true,"country_code":"91","svc_id":1,"user_id":2,"call_txn_id":"61fea3a8-8c87-42cd-b7d0 -e211094d5886,8ab8223a-e544-4e1a-ba4d-3e4f0dcf9fa7,7861a99e-912c-43a9-8d98-89532df50019,2c057bf5-47ff-4122-a53e-4617cb09576e, 4889b977-b602-426f-ab6c-ad5fa4c6ff0d","bind_count":0,"customer_bound_trunk":null}, {"id":104,"number":"9250404170","number1":null,"name":"Agent2","status":2,"sip":"10102", "time":1554462803000,"active":true,"country_code":"91","svc_id":1,"user_id":104,"call_txn_id":"da1cc745-8749- 4aff-bb0d-425e953dcc5c,7f21da2f-7a31-40dc-8ce1-27bc56e94035,c74804df-862d-4fcc-ace2-bfdbcd2cff7b, 57ac04cb-6606-48f7-bef3-0e86d25a69c5,9b0fd64a-989e-4bec-8ef4-bfdbcd2cff7b,57ac04cb-6606-48f7- bef3-0e86d25a69c5,9b0fd64a-989e-4bec-8ef4-b37a831caa7b","bind_count":0,"customer_bound_trunk":null}] ,"svcSkills":[{"id":1,"name":"DNIS","index":1,"svc_id":1},{"id":2,"name":"OB","index":2, "svc_id":1}],"dids":["6748945","61990399"],"agentsData":[{"skills":[{"id":1,"agent_id":1,"skill_id":1, "skill_level":1}],"number":"9999880403","name":"Admin","id":1,"sip":"10100","status":"0"}, {"skills":[{"id":141,"agent_id":2,"skill_id":2,"skill_level":4}],"number":"9717397366","name":"Agent1" ,"id":2,"sip":"10101","status":"12"},{"skills":[{"id":137,"agent_id":104,"skill_id":1, "skill_level":1},{"id":138,"agent_id":104,"skill_id":2,"skill_level":1}],"number":"9250404170","name": "Agent2","id":104,"sip":"10102","status":"7"}],"callStats":{"totalCalls":0,"inIvr":0,"ibCalls":0 ,"obCalls":0},"customersInQueue":{"data":{},"dataCount":"0"},"agentStats":{"freeAgents":1,"busyAgents":0}} |
curl-i-u"username:password""https://telephonycloud.co.in/api/v1/customer-recent-calls?svc-id=1&recent_txn_id=40391936-ea2a-450e-89c0-529b6a8945a5,f95e0068-89a0-478f-b982-4562fcbadfff,11d6928b-80de-4b1b-97e5-e002667f8ad3" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
recent_txn_id | List String | 40391936-ea2a-450e-89c0-529b6a8945a5,f95e0068-89a0-478f-b982-4562fcbadfff,11d6928b-80de-4b1b-97e5-e002667f8ad3 | Yes | |
svc-id | Integer | 15 | Yes | |
Response : [{"duration":"4","receivedBy":null,"note":"","disposition":"MISSED","xnid":"6c26516d-cef8-4246-acc7-faa0178a8ccd","recording":null,"time":"2019-04-0413:36:10","callType":"INBOUND","ivrData":""},{"duration":"3","receivedBy":null,"note":"","disposition":"MISSED","xnid":"be03b0f8-97dd-4655-a150-5d84dd29a02b","recording":null,"time":"2019-04-0413:27:59","callType":"INBOUND","ivrData":""},{"duration":"3","receivedBy":null,"note":"","disposition":"MISSED","xnid":"c1f0b038-775e-49cb-9865-f7d7cae5c1bc","recording":null,"time":"2019-04-0413:27:20","callType":"INBOUND","ivrData":""},{"duration":"1","receivedBy":null,"note":"","disposition":"MISSED","xnid":"076e59fe-afbe-4210-b65f-85356cdf5ae4","recording":null,"time":"2019-04-0413:12:52","callType":"INBOUND","ivrData":""},{"duration":"5","receivedBy":null,"note":"","disposition":"MISSED","xnid":"ec7e97f5-2587-4cd9-986f-9c616dbd0606","recording":null,"time":"2019-04-0413:11:23","callType":"INBOUND","ivrData":""}] |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/customer-details?customer-number=9999880403&svc-id=1" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
customer-number | String | 9999999999 | Yes | |
svc-id | Integer | 15 | Yes | |
Response : {"number":"9999880403","note":"Not Answered","address":"Ikebana,Noida","name":"Himanshu Tyagi"} |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/customer-details?customer-number=9999880403&svc-id=1&detailed=true" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
customer-number | String | 9999999999 | Yes | |
svc-id | Integer | 15 | Yes | |
detailed | Boolean | TRUE | Yes | |
Response : {"crc":[{"duration":"4","receivedBy":null,"note":"Not Answered, not able understandlangauge","disposition":"MISSED" ,"xnid":"6c26516d-cef8-4246-acc7-faa0178a8ccd","recording":null,"time":"2019-04-0413:36:10","callType":"INBOUND","ivrData":""},{"duration":"3","receivedBy":null,"note":"","disposition":"MISSED","xnid": "be03b0f8-97dd-4655-a150-5d84dd29a02b","recording":null,"time":"2019-04-0413:27:59","callType":"INBOUND","ivrData":""},{"duration":"3","receivedBy":null,"note":"","disposition":"MISSED","xnid": "c1f0b038-775e-49cb-9865-f7d7cae5c1bc","recording":null,"time":"2019-04-0413:27:20","callType":"INBOUND","ivrData":""},{"duration":"1","receivedBy":null,"note":"","disposition":"MISSED","xnid": "076e59fe-afbe-4210-b65f-85356cdf5ae4","recording":null,"time":"2019-04-0413:12:52","callType":"INBOUND","ivrData":""},{"duration":"5","receivedBy":null,"note":"","disposition":"MISSED","xnid": "ec7e97f5-2587-4cd9-986f-9c616dbd0606","recording":null,"time":"2019-04-0413:11:23","callType":"INBOUND","ivrData":""}],"crm":{"id":3,"svc_id":1,"recent_txn_id":"6c26516d-cef8-4246-acc7-faa0178 a8ccd,be03b0f8-97dd-4655-a150-5d84dd29a02b,c1f0b038-775e-49cb-9865-f7d7cae5c1bc,076e59fe-afbe-4210-b65f-85356cdf5ae4, ec7e97f5-2587-4cd9-986f-9c616dbd0606","dnd":false,"name":"HimanshuTyagi","country_code":"91","number":"9999880403" ,"address":"Ikebana,Noida","email":null,"block":null,"block_reason":null,"blocked_by":null,"blocked_date":null,"update_time": 1548058212421}} |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/login" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Comments | Mandatory |
svc-id | integer | 15 | It gives the user details of given service id | Yes |
Response : {"agentId":1,"isAdmin":true,"serviceId":1} |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/login" | ||||
---|---|---|---|---|
Comments | ||||
It gives the user details of assigned service id | ||||
Response : {"agentId":1,"isAdmin":true,"serviceId":1} |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/login" | ||||
---|---|---|---|---|
Comments | ||||
It gives the assigned service ids list | ||||
Response : [366,641,414,91,276] |
Status code |
Status |
0 | Login |
2 | Logout |
Break code |
Break |
0 | Login |
1 | Lunch Break |
2 | Tea Break |
3 | Rest Room Break |
4 | Huddle |
5 | Training |
6 | Nature Break |
7 | Logout |
curl -i -X PATCH -u "username:password""https://telephonycloud.co.in/api/v1/agents?number=9999999999&agent-number=9999999999" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Comments | Mandatory |
number | Integer | 9999999999 | Desired updated number for agent | Yes |
agent-number | Integer | 8888753557 | Number of the agent of which status to be updated, useful in case of admin credentials, can change status of agent via agent’s number | Yes |
Response : {"number":"9999999999"} |
curl -i -X POST -H "Content-Type: multipart/form-data; charset=utf-8" -u"username:password" -F "file=@sampleFile.xlsx" -F "svc-id=1" -F "campaign-id=559" -F "end-time=1552553805966" "https://telephonycloud.co.in/api/v1/dialer" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
svc-id | Integer | 15 | Yes | |
campaign-id | Integer | 675 | Yes | |
end-time | Long | 1553953912872 | Yes | |
file | File | XLS file which contains a column with numbers of customers | Yes | |
invalidate-old-data | Boolean | true | No | |
Response : Success |
curl -i -X POST -u "username:password" -d "svc-id=1&agent-sip=1011&seconds=10""https://telephonycloud.co.in/api/v1/dialer-agent-wrapup" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
svc-id | Integer | 15 | Yes | |
agent-sip | String | 101510 | Yes | |
seconds | Integer | 10 | Yes | |
Response : Success |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/agents-free" | ||||
---|---|---|---|---|
Based on the provided credentials, available/free agents will be provided of the assigned service id. | ||||
Response : [{"name":"Agent20","id":23},{"name":"Agent21","id":24},{"name":"Agent32","id":35},{"name":"Agent85","id":88}] |
curl -X POST -u "username:password" https://telephonycloud.co.in/api/v1/calls/{call-txn-id} | ||||
---|---|---|---|---|
Parameter | Type | Sample | Comments | Mandatory |
signal | String | hangup | To hangup a call, set value as hangup | Yes |
Response : true |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/send-sms" -d"number=9999999999&message=hello&service-id=1" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Comments | Mandatory |
number | Integer | 9999999999 | Number on which SMS is to be sent | Yes |
message | String | Hello there | Desired message | Yes |
service-id | Integer | 15 | Id of the service | Yes |
country-code | Integer | 91 | Country Code of the number on which SMS is to be sent | No |
Response : 0a83b9e6-50b7-48c8-a3c5-2e8f7d60e1ae |
curl -i -X POST -u "username:password" -d "xnid=0e5aff8c-8707-4377-8baa-31cceab9fca7&country-code=91&type=spy&number=9999999999""https://telephonycloud.co.in/api/v1/whisper-spy" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
country-code | Integer | 91 | Yes | |
type | String | spy/whisper | Yes | |
xnid | UUID | 0e5aff8c-8707-4377-8baa-31cceab9fca7 | Yes | |
number | Integer | 9999999999 | Yes | |
Response : {"isError":false,"callTxnId":"0e5aff8c-8707-4377-8baa-31cceab9fca7"} |
curl -i -X POST -u "username:password" -d "xnid=0e5aff8c-8707-4377-8baa-31cceab9fca7""https://telephonycloud.co.in/api/v1/hangup" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
xnid | UUID | 0a83b9e6-50b7-48c8-a3c5-2e8f7d60e1ae | Yes | |
Response : true |
curl -i -u "username:password""https://telephonycloud.co.in/api/v1/otp?number=9999999999" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Comments | Mandatory |
number | Integer | 9999999999 | Number on which OTP is to be sent | Yes |
keyword | String | Click2Call | Represents for which purpose the OTP is sent, default value : Click2Call | No |
service-id | Integer | 15 | Id of the service | No |
Response : 5275 |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/otp" -d"number=9999999999&otp=9875" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Comments | Mandatory |
number | Integer | 9999999999 | Number on which OTP was sent / to be validated | Yes |
otp | Integer | 5675 | OTP which is to be validated | Yes |
Response : true |
curl -i -X PATCH -u "username:password""https://telephonycloud.co.in/api/v1/agents?status=2" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
status | Integer | 2 | Yes | |
Response : {"status":2, "break":7} |
curl -i -X PATCH -u "username:password""https://telephonycloud.co.in/api/v1/agents?break=7" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
break | Integer | 7 | Yes | |
Response : {"status":2, "break":7} |
curl -i -X PATCH -u "username:password""https://telephonycloud.co.in/api/v1/agents?number=9999999999&agent-number=9999999999" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
number | Integer | 9999999999 | Yes | |
agent-number | Integer | 8888753557 | Yes | |
Response : {"number":"9999999999"} |
curl -i -X PATCH -u "9999999999:agentpass" "https://telephonycloud.co.in/api/v1/agents?number=9999999999&agent-number=9999999999" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
name | String | Gaurav | Yes | |
agent-number | Integer | 8888753557 | Yes | |
agent-sip | String | 101015 | No | |
Response : {"name": "Gaurav"} |
curl -i -u "9999999999:agentpass" "https://telephonycloud.co.in/api/v1/transfer-details" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
svc-id | Integer | 15 | No | |
queue-id | Integer | 455 | No | |
Response : {"svcid":1,"queueid":null,"queues":{"1":"DNIS","2":"OB"},"services": {"1":"TestService","2":"Dialer","3":"Shishir","4":"LoadTesting1","5":"LoadTesting2","6":"LoadTesting3","7":"svc_name","8":"svc_name", "9":"svc_name","10":"svc_name","74":"Mandeep_Test","11":"svc_name","12":"svc_name","13":"svc_name122","14":"svc_name","15": "svc_name","18":"shiTest","19":"shiTest2","20":"shiTest3","94":"HHHSSS","45":"shiTest5","46":"shiTest16","47":"MyfirstTestService", "48":"TestingService","124":"shiTest"},"agents":{"1":"Admin"}} |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/calls" -d"number=9999999999&otp=9275" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Comments | Mandatory |
number | Integer | 9999999999 | Number on which call is to be made | Yes |
otp | Integer | 5432 | OTP which was sent on the number | Yes |
service-id | Integer | 15 | Id of the service | No |
Response : {"isError":false,"callTxnId":"0e5aff8c-8707-4377-8baa- |
Name |
Type |
Sample |
Comments |
callid | String | 999x9999-x999-9x99-x999-x9x99x9999xx | call transaction id |
call-duration | String | 30 | call duration in seconds |
agent-number | String | 999XXXX999 | agent number |
customer-number | String | 999XXXX999 | customer number |
end-time | String | 2016-06- 27 15:23:28 | end time of call |
start-time | String | 2016-06- 27 15:23:58 | start time of call |
recording-url | String | http://telephonycloud.co.in/recordings/123/160327/999x9999-x999- 9x99-x999-x9x99x9999x9.wav | url of call recording(if call was answered) |
call-type | String | outgoing | incoming/outgoing |
virtual-number | String | 999XXXX999 | called number |
disposition | String | answered | Disposition of the call answered / missed |
Events Socket URL: telephonycloud.co.in Events Socket Port: 8989 | ||||
---|---|---|---|---|
User have to connect to the socket to recieve the call events. In order to establish connection user have to send first message over the socket as the auth key(ServiceId:UniqueKey). Once the auth key is verified, success message will be sent over the socket as "Success" and then the call events will be sent in the JSON format. The auth key will be a combination of service id and unique key(ServiceId:UniqueKey), ServiceId: will be the id of the service which user opts from SparkTG, UniqueKey: Will be shared by SparkTG once the events has been enabled for user's service id Sample key 1:abc-r3wsn-enjn89-sakmx-ks34 In order to check the connection, user can send message over the socket as 'ping' and in return message 'pong' will be sent from the server |
Name |
Type |
Sample |
Comments |
xnid | String | 6f9ee-xxxx-xxxx-xxxx-xxxx-x3b0ef | call transaction id |
event | String | CustomerRing | CustomerRing/CustomerUp/CustomerHangup/AgentRing/AgentUp/AgentHangup |
agent | String | 1 | agent id of the agent on whom event is happening |
number | String | 999XXXX999 | customer number |
time | Long | 1535627205386 | time of the event in epoch |
data | String | user has opted sales | a brief detail about caller's selection |
svc | String | 1 | id of the service which is opted from SparkTG |
type | String | Inbound | Inbound/Outbound |
Event : {"svc":"1","agent":null,"data":"","xnid":"6f9ee-xxxx-xxxx-xxxx-xxxx-x3b0ef","time":1535627205386,"event":"CustomerRing","number":"999XXXX999","type":"Inbound"} |
---|
curl -i -X POST -u "username:password" "https://telephonycloud.co.in/api/v1/subscriber" -d"svc-id=1&auth-key=abc-1234-xyz&force=true&channel-type=mobile&url=https://localhost:9001/log&is-registered=true&device-id=abc" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
svc-id | Integer | 1 | Yes | |
auth-key | String | abc-0097vf-w32 ns | Yes | |
force | Boolean | TRUE | Yes | |
channel-type | String | mobile | Yes | |
url | String | https://192.168.1.1:9000/data | Yes | |
is-registered | Boolean | true | Yes | |
device-id | String | salesforce-15 | Yes | |
event-mask | Integer | 1111111 | No | |
custom-event | String | some custom data | No | |
agent-id | Integer | 324 | No | |
Response : true |
curl -i -X PATCH -u "username:password" "https://telephonycloud.co.in/api/v1/subscriber" -d"svc-id=1&agent-id=1&is-registered=true" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
svc-id | Integer | 15 | Yes | |
agent-id | Integer | 342 | Yes | |
is-registered | Boolean | true | Yes | |
Response : true |
curl -i -X PATCH -u "username:password" "https://telephonycloud.co.in/api/v1/subscriber" -d"svc-id=1&agent-id=1&event-mask=1111110" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
svc-id | Integer | 15 | Yes | |
agent-id | Integer | 342 | Yes | |
event-mask | Integer | 1111110 | Yes | |
Response : true |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/subscriber?svc-id=12" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
svc-id | Integer | 12 | Yes | |
agent-id | Integer | 324 | No | |
Response : [{"id":1,"force":true,"url":"https://localhost:9001/log","registered":true,"agent_id":0,"svc_id":1,"auth_key":"abc-1234-xyz","device_id":"abc","channel_type":"mobile","register_time":1561744544000,"updated_time":1561744544000, "is_registered":true,"event_mask":1111111,"custom_event":null}] |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/subscriber" | ||||
---|---|---|---|---|
Response : [{"id":1,"force":true,"url":"https://localhost:9001/log","registered":true,"agent_id":0,"svc_id":1,"auth_key":"abc-1234-xyz","device_id":"abc","channel_type":"mobile","register_time":1561744544000,"updated_time":1561744544000,"is_registered":true, "event_mask":1111111,"custom_event":null},{"id":2,"force":true,"url":"https://localhost:9001/log","registered":true,"agent_id":0,"svc_id":12,"auth_key":"abc-1234- xyz","device_id":"abc","channel_type":"mobile","register_time":1562094094000,"updated_time":1562094094000, "is_registered":true,"event_mask":1111111,"custom_event":null}] |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/ping" | ||||
---|---|---|---|---|
Response : pong |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/user" -d"email=gaurav@sparktg.com" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
String | gaurav@sparktg.com | No | ||
number | String | 9999999999 | No | |
Response : true |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/user-password" -d"new=9abc7pass" | ||||
---|---|---|---|---|
Parameter | Type | Sample | Mandatory | |
new | String | 9abc7pass | Yes | |
Response : true |
curl -i -u "username:password" "https://telephonycloud.co.in/api/v1/user" | ||||
---|---|---|---|---|
Response : {"id":1,"name":"AgentN","password":"21232f297a57a5a743894a0e4a801fc3","email":"","number":"" ,"active":true,"username":"1","verified":true,"login_id":"test"} |