The Courier REST API.
This C# SDK is automatically generated by the OpenAPI Generator project:
- API version: 0.0.4
- RestSharp - 106.11.7 or later
- Json.NET - 12.0.3 or later
- JsonSubTypes - 1.8.0 or later
- System.ComponentModel.Annotations - 5.0.0 or later
The DLLs included in the package may not be the latest version. We recommend using NuGet to obtain the latest version of the packages:
Install-Package RestSharp
Install-Package Newtonsoft.Json
Install-Package JsonSubTypes
Install-Package System.ComponentModel.Annotations
NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742. NOTE: RestSharp for .Net Core creates a new socket for each api call, which can lead to a socket exhaustion problem. See RestSharp#1406.
TO BE UPDATED
TO BE UPDATED
using System.Collections.Generic;
using System.Diagnostics;
using Com.Courier.Api;
using Com.Courier.Client;
using Com.Courier.Model;
namespace Example
{
public class Example
{
public static void Main()
{
Configuration config = new Configuration();
config.BasePath = "https://api.courier.com";
// Configure HTTP basic authorization: basicAuth
config.Username = "YOUR_USERNAME";
config.Password = "YOUR_PASSWORD";
// Configure Bearer token for authorization: bearerAuth
config.AccessToken = "YOUR_BEARER_TOKEN";
var apiInstance = new MessagesAPIApi(config);
var messageId = messageId_example; // string | A unique identifier associated with the message you wish to retrieve (results from a send). (default to "1-5e2b2615-05efbb3acab9172f88dd3f6f")
try
{
// GET /messages/{message_id}
Object result = apiInstance.GetMessageById(messageId);
Debug.WriteLine(result);
}
catch (ApiException e)
{
Debug.Print("Exception when calling MessagesAPIApi.GetMessageById: " + e.Message );
Debug.Print("Status Code: "+ e.ErrorCode);
Debug.Print(e.StackTrace);
}
}
}
}
All URIs are relative to https://api.courier.com
Class | Method | HTTP request | Description |
---|---|---|---|
MessagesAPIApi | GetMessageById | GET /messages/{message_id} | GET /messages/{message_id} |
MessagesAPIApi | GetMessageHistoryById | GET /messages/{message_id}/history | GET /messages/{message_id}/history |
MessagesAPIApi | GetMessageOutput | GET /messages/{message_id}/output | GET /messages/{message_id}/output |
MessagesAPIApi | GetMessages | GET /messages | GET /messages |
SendAPIApi | SendPost | POST /send | POST /send |
- Model.InlineResponse200
- Model.InlineResponse2001
- Model.InlineResponse2002
- Model.InlineResponse2003
- Model.MessageOutputItem
- Model.MessageOutputItemContent
- Model.Paging
- Model.PartialMessage
- Model.Send
- Type: HTTP basic authentication
- Type: Bearer Authentication