Save data for this chatbot user as key-value pairs. Saving a value for a key that already exists will overwrite the existing value.
Endpoint
| Endpoint | HTTP Method |
|---|
| /user/v1/context_data | PUT |
Parameters
| Parameter | Type | Description | In | Required |
|---|
| accessToken | String | Webview access token | Query | True |
| body | Object | JSON object of data to save. | Body | True |
Response
| Code | Description | Returns |
|---|
| 200 | Success | Nothing |
| 400 | Error | Nothing |
Example
var body = {‘slotDate’: window.selectedSlot.date,
‘slotTime’: window.selectedSlot.time,
‘displayTime’: displayTime};
$.ajax({
type: ‘PUT’,
url: ‘/user/v1/context_data?accessToken=’ + accessToken,
contentType: ‘application/json’,
data: JSON.stringify(body),
complete: function(xhr, textStatus){}
});