public static void Main()
string response = SendSignatureRequest(
"ZDM4NzU1YTVmNmFhNGMwMGQ3MTdiOTBhNmNiZDQzOTlkYjg4OTk0MTg5MGM3OGFlZjk1OWM1ZDg1NTQxYzBjYQ",
"http://www.analysis.im/uploads/seminar/pdf-sample.pdf"
Console.WriteLine(response);
public static string SendSignatureRequest(string apiKey, string name, string email, string file)
HttpWebRequest request = (HttpWebRequest)WebRequest.Create("https://api.sandbox.signaturit.com/v3/signatures.json");
string authorization = apiKey;
request.Headers.Add("Authorization", "Bearer " + authorization);
var postData = "recipients[0][name]=" + name;
postData += "&recipients[0][email]=" + email;
postData += "&files[0]=" + file;
var data = Encoding.ASCII.GetBytes(postData);
request.ContentType = "application/json";
request.ContentLength = data.Length;
using (var stream = request.GetRequestStream())
stream.Write(data, 0, data.Length);
HttpWebResponse response = (HttpWebResponse)request.GetResponse();
return new StreamReader(response.GetResponseStream()).ReadToEnd();