Jump to: navigation, search

AttachUserData

This operation is part of the Voice API section of the Web Services API.

Overview

Attaches the provided data to the call, regardless of whether the key(s) already exist.

Important
If you use the AttachUserData operation to provide keys that already exist on the call, Web Services creates duplicates of the same key in the call data. Unless you have a specific requirement to allow duplicate keys in the call data, use UpdateUserData instead.
Request URL /api/v2/me/calls/{id}
HTTP method POST
Required features api-voice

Parameters

Parameter Value
operationName AttachUserData

Sample

Request

POST api/v2/me/calls/01RCC3N118B1V0SL8O7GK2LAES00000R
{
  "operationName": "AttachUserData",
  "userData": {
    "AccountNumber": "12345"
  }
}

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":"12345"
         },
         "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!