Use this method to get sms campaign state. Available values: editing, readytosend, sending, sent and deliveredtosend.
Id of existing campaign
using System.Threading.Tasks; internal class Program { private static void Main(string[] args) { string requestBody = ""; try { using var client = new HttpClient{}; using var request = new HttpRequestMessage(HttpMethod.Get, "https://api.messageflow.com/v2.1/campaign/sms/{campaignId}/report/state"); request.Headers.Add("Authorization", "YourAuthorizationKey"); request.Headers.Add("Application-Key", "YourApplicationKey"); request.Content = new StringContent(requestBody, null, "application/json"); var response = await client.SendAsync(request); response.EnsureSuccessStatusCode(); string content = await response.Content.ReadAsStringAsync(); Console.WriteLine(content); } catch (HttpRequestException e) { Console.WriteLine("\n Exception Caught!\n Message :{0} ", e.Message); } } }
Request was successfully processed
{ "meta": { "numberOfErrors": 0, "numberOfData": 1, "status": 200, "uniqId": "00d928f759" }, "data": [ { "state": "sent" } ] }