Contact

var client = new RestClient("https://api.messageflow.com/v2.1/contact?offset=SOME_INTEGER_VALUE&limit=SOME_INTEGER_VALUE&group=SOME_INTEGER_VALUE&id=SOME_INTEGER_VALUE&externalId=SOME_STRING_VALUE&phoneNumber=SOME_STRING_VALUE&email=SOME_STRING_VALUE&inArchive=SOME_BOOL_VALUE");
var request = new RestRequest(Method.GET);
request.AddHeader("authorization", "REPLACE_KEY_VALUE");
request.AddHeader("application-key", "REPLACE_KEY_VALUE");
IRestResponse response = client.Execute(request);
var client = new RestClient("https://api.messageflow.com/v2.1/contact");
var request = new RestRequest(Method.POST);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "REPLACE_KEY_VALUE");
request.AddHeader("application-key", "REPLACE_KEY_VALUE");
request.AddParameter("application/json", "[{\"companyName\":\"Example company\",\"createdAt\":\"2019-02-01 20:12:12\",\"email\":\"test@test.pl\",\"externalId\":\"XXX-XXX-XXX\",\"firstName\":\"First name\",\"lastName\":\"Last name\",\"phoneNumber\":\"123123123\",\"externalData\":{\"test\":\"test\",\"createdAt\":\"1989-09-28\",\"isClient\":false},\"addToGroup\":[0]}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new RestClient("https://api.messageflow.com/v2.1/contact");
var request = new RestRequest(Method.PUT);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "REPLACE_KEY_VALUE");
request.AddHeader("application-key", "REPLACE_KEY_VALUE");
request.AddParameter("application/json", "[{\"externalId\":\"bfa0b1b1-e636-b8ab-aba4-78a913be0144\",\"data\":{\"companyName\":\"Example company\",\"email\":\"test@test.pl\",\"externalId\":\"XXX-XXX-XXX\",\"firstName\":\"First name\",\"lastName\":\"Last name\",\"phoneNumber\":\"123123123\",\"externalData\":{\"test\":\"test\",\"createdAt\":\"1989-09-28\",\"isClient\":false}}}]", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);
var client = new RestClient("https://api.messageflow.com/v2.1/contact");
var request = new RestRequest(Method.DELETE);
request.AddHeader("content-type", "application/json");
request.AddHeader("authorization", "REPLACE_KEY_VALUE");
request.AddHeader("application-key", "REPLACE_KEY_VALUE");
request.AddParameter("application/json", "{\"id\":[1]}", ParameterType.RequestBody);
IRestResponse response = client.Execute(request);

Last updated