/InsertAPITag

This is a method that allows you to add a tag belonging to your company by making a request with the received token. You need to make a request in json format in the body with the parameters “TagName” (Tag Name), “IsActive” (Active) and “TagColor” (Color given to the label).

 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 that the registration has been made is received. When you make a request to the “GetAllTags” method, you can see the record of the tag you have added.

private static IRestResponse InsertAPITag()
{
     RestClient client = new RestClient("https://api.flexxii.com/");
     RestRequest request = new RestRequest("api/Tags/InsertAPITag", Method.POST);
     request.AddHeader("Content-Type", "application/json; charset=utf-8");
     request.AddHeader("Authorization", content_type + " " + access_token);
     request.AddJsonBody(new{TagName="TagInsert",IsActive=true,TagColor = "FFFFFF"});
            
     IRestResponse response = client.Execute(request);
     return response;
}

Was this helpful?

0 / 0