This method is used when it is desired to update the information of quick replies in the system. In json format, as in the “InsertAPIQuickReply” method, “QuickReplyTitle” (Quick Response Title), “Answer”, “Media” and “IsActive” parameters should be given in addition to this. In the query type, the “quickReplyId” parameter that specifies the Id value of the quick reply to be updated must be added.
Authorization header should be entered as “token_type” value returned as a result of token request, space character, “Access_token” value.

As a result of the request, a message stating that the update has been made is received. When you make a request to the “GetAllQuickReply” method, you can see the record of the quick reply you have updated.

private static IRestResponse UpdateApiQuickReply()
{
RestClient client = new RestClient("https://api.flexxii.com/");
RestRequest request = new RestRequest("api/QuickReplies/UpdateAPIQuickReply", Method.PUT);
request.AddHeader("Content-Type", "application/json; charset=utf-8");
request.AddQueryParameter("quickReplyId", quickReplyId);
request.AddJsonBody(new { QuickReplyTitle= "API Test update",Media= "", Answer= "API answer update", IsActive= true, });
request.AddHeader("Authorization", content_type + " " + access_token);
IRestResponse response = client.Execute(request);
return response;
}
Was this helpful?
0 / 0