Set context data

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

EndpointHTTP Method
/user/v1/context_dataPUT

Parameters

ParameterTypeDescriptionInRequired
accessTokenStringWebview access tokenQueryTrue
bodyObjectJSON object of data to save.BodyTrue

Response

CodeDescriptionReturns
200SuccessNothing
400ErrorNothing

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){}
});
Was this article helpful?
0 out of 0 found this helpful