Hi
I am using Mautic rest api on a .net project. Everything works except updating stages. I use an url like this
Code:
https://MY_URL/api/stages/4/contact/add/4065?access_token=MY_TOKEN
Code:
"success": 1
Code:
string apiResult = "";
MauticContact mauticContact = GetContactByEmail(contactEmail);
MauticStage mauticStage = GetStageByName(stageName);
string uri = _mauticBaseUri + _apiUri + "/stages/" + mauticStage.Id + "/contact/" + "add"+ mauticContact.Id;
#if NET461
using (WebClient client = new WebClient())
{
byte[] response =
client.UploadValues(uri, new NameValueCollection()
{
{ “access_token”, _token}
});
apiResult = System.Text.Encoding.UTF8.GetString(response);
}
#endif
Code:
"success": 1