UpdateUserData
This operation is part of the Voice API section of the Web Services API.
Overview
Adds the provided key/value pairs to the call.
Request URL | /api/v2/me/calls/{id} |
---|---|
HTTP method | POST |
Required features | api-voice |
Parameters
Parameter | Value |
---|---|
operationName | UpdateUserData |
userData | A JSON object that includes the key/value data to be added to the call. |
Sample
Request
POST api/v2/me/calls/01RCC3N118B1V0SL8O7GK2LAES00000R
{
"operationName": "UpdateUserData",
"userData": {
"AccountNumber": "12345678"
}
}
HTTP response
{
"statusCode": 0
}
CometD notification
{
"data":{
"notificationType":"AttachedDataChanged",
"call":{
"id":"01RCC3N118B1V0SL8O7GK2LAES00000R",
"state":"Dialing",
"callUuid":"01RCC3N118B1V0SL8O7GK2LAES00000R",
"connId":"007102719818001b",
"deviceUri":"http://127.0.0.1:8080/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
"participants":[
{
"e164Number":"",
"formattedPhoneNumber":"15001",
"phoneNumber":"15001",
"digits":"15001"
}
],
"dnis":"15001",
"callType":"Internal",
"capabilities":[
"UpdateUserData",
"SendDtmf",
"AttachUserData",
"DeleteUserDataPair",
"DeleteUserData",
"Hangup"
],
"userData":{
"AccountNumber":"12345678"
},
"duration":"63",
"mute":"Off",
"supervisorListeningIn":false,
"monitoredUserMuted":false,
"monitoring":false,
"uri":"http://127.0.0.1:8080/api/v2/me/calls/01RCC3N118B1V0SL8O7GK2LAES00000R",
"path":"/calls/01RCC3N118B1V0SL8O7GK2LAES00000R"
},
"phoneNumber":"15000",
"messageType":"CallStateChangeMessage"
},
"channel":"/v2/me/calls"
}
Sample 2
The following request adds multiple key/value pairs.
Request
POST api/v2/me/calls/01RCC3N118B1V0SL8O7GK2LAES00000R
{
"operationName": "UpdateUserData",
"userData": {
"AccountNumber": "12345678",
"CustomerSegment": "Platinum",
"CustomerName": "James"
}
}
HTTP response
{
"statusCode": 0
}
CometD notification
{
"data":{
"notificationType":"AttachedDataChanged",
"call":{
"id":"01RCC3N118B1V0SL8O7GK2LAES00000R",
"state":"Dialing",
"callUuid":"01RCC3N118B1V0SL8O7GK2LAES00000R",
"connId":"007102719818001b",
"deviceUri":"http://127.0.0.1:8080/api/v2/devices/631608b3-ceb1-472b-ba05-2ae39555b0d1",
"participants":[
{
"e164Number":"",
"formattedPhoneNumber":"15001",
"phoneNumber":"15001",
"digits":"15001"
}
],
"dnis":"15001",
"callType":"Internal",
"capabilities":[
"UpdateUserData",
"SendDtmf",
"AttachUserData",
"DeleteUserDataPair",
"DeleteUserData",
"Hangup"
],
"userData":{
"AccountNumber":"12345678",
"CustomerSegment":"Platinum",
"CustomerName":"James"
},
"duration":"63",
"mute":"Off",
"supervisorListeningIn":false,
"monitoredUserMuted":false,
"monitoring":false,
"uri":"http://127.0.0.1:8080/api/v2/me/calls/01RCC3N118B1V0SL8O7GK2LAES00000R",
"path":"/calls/01RCC3N118B1V0SL8O7GK2LAES00000R"
},
"phoneNumber":"15000",
"messageType":"CallStateChangeMessage"
},
"channel":"/v2/me/calls"
}
This page was last edited on March 25, 2016, at 18:22.
Comments or questions about this documentation? Contact us for support!