Skip to content
Sailthru .NET client
Branch: master
Clone or download
Latest commit a038927 Aug 2, 2019
Type Name Latest commit message Commit time
Failed to load latest commit information.
Sailthru [COM-5805] rename method Jun 25, 2019
.gitignore nuget-upload: support building nuget packages Aug 22, 2017
.travis.yml CI: set solution name Aug 2, 2019
MIT-LICENSE.txt update docs May 5, 2016 nuget-upload: update doc link Aug 23, 2017


For installation instructions, documentation, and examples please visit:

A simple client library to remotely access the Sailthru REST API as per

As of commit b8714e2, UserRequest.OptoutEmail is now an enum rather than a string. Replace "all" with "OptoutStatus.All", "blast" with "OptoutStatus.Blast", "basic" with "OptoutStatus.Basic", and "none" with "OptoutStatus.None". For example, "userRequest.OptoutEmail = "all";" should now be "userRequest.OptoutEmail = OptoutStatus.All;"

API Rate Limiting

Here is an example how to check rate limiting and throttle API calls based on that. For more information about Rate Limiting, see Sailthru Documentation

SailthruClient sailthruClient = new SailthruClient(apiKey, apiSec);

// ... make some api calls ....

Hashtable lastRateLimitInfo = sailthruClient.getLastRateLimitInfo("user", "post");

// getLastRateLimitInfo returns null if given endpoint/method wasn't triggered previously
if (lastRateLimitInfo != null) {
	int limit = lastRateLimitInfo['limit'];
	int remaining = lastRateLimitInfo['remaining'];
	DateTime reset = (DateTime)lastRateLimitInfo['reset'];

    // throttle api calls based on last rate limit info
    if (remaining <= 0) {
        TimeSpan time_span_till_reset = reset.Subtract(;
        // sleep or perform other business logic before next user api call
You can’t perform that action at this time.