Skip to content

Repository files navigation

IO.ClickSend - the C# library for the ClickSend v3 API

This is an official SDK for ClickSend Below you will find a current list of the available methods for clicksend. NOTE: You will need to create a free account to use the API. You can register here..

This C# SDK is automatically generated by the ClickSend Codegen project:

  • API version: 3.1
  • SDK version: 1.0.0
  • Build package: io.swagger.codegen.v3.generators.dotnet.CSharpClientCodegen

Frameworks supported

  • .NET 4.0 or later
  • Windows Phone 7.1 (Mango)

Dependencies

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

NOTE: RestSharp versions greater than 105.1.0 have a bug which causes file uploads to fail. See RestSharp#742

Installation

Run the following command to generate the DLL

  • [Mac/Linux] /bin/sh build.sh
  • [Windows] build.bat

Then include the DLL (under the bin folder) in the C# project, and use the namespaces:

usingIO.ClickSend.ClickSend.Api;usingIO.ClickSend.Client;usingIO.ClickSend.ClickSend.Model;

Packaging

A .nuspec is included with the project. You can follow the Nuget quickstart to create and publish packages.

This .nuspec uses placeholders from the .csproj, so build the .csproj directly:

nuget pack -Build -OutputDirectory out IO.ClickSend.csproj

Then, publish to a local feed or other host and consume the new package via Nuget as usual.

Getting Started

usingSystem;usingSystem.Diagnostics;usingIO.ClickSend.ClickSend.Api;usingIO.ClickSend.Client;usingIO.ClickSend.ClickSend.Model;namespaceExample{publicclassExample{publicvoidmain(){// Configure HTTP basic authorization: BasicAuthConfiguration.Default.Username="YOUR_USERNAME";Configuration.Default.Password="YOUR_PASSWORD";varapiInstance=newAccountApi();try{// Get account informationstringresult=apiInstance.AccountGet();Debug.WriteLine(result);}catch(Exceptione){Debug.Print("Exception when calling AccountApi.AccountGet: "+e.Message);}}}}

Documentation for API Endpoints

All URIs are relative to https://rest.clicksend.com/v3

ClassMethodHTTP requestDescription
AccountApiAccountGetGET /accountGet account information
AccountApiAccountPostPOST /accountCreate a new account
AccountApiAccountUseageBySubaccountGetGET /account/usage/{year}/{month}/subaccountGet account useage by subaccount
AccountApiAccountVerifySendPutPUT /account-verify/sendSend account activation token
AccountApiAccountVerifyVerifyByActivationTokenPutPUT /account-verify/verify/{activation_token}Verify new account
AccountApiForgotPasswordPutPUT /forgot-passwordForgot password
AccountApiForgotPasswordVerifyPutPUT /forgot-password/verifyVerify forgot password
AccountApiForgotUsernamePutPUT /forgot-usernameForgot username
AccountRechargeApiRechargeCreditCardGetGET /recharge/credit-cardGet Credit Card info
AccountRechargeApiRechargeCreditCardPutPUT /recharge/credit-cardUpdate credit card info
AccountRechargeApiRechargePackagesGetGET /recharge/packagesGet list of all packages
AccountRechargeApiRechargePurchaseByPackageIdPutPUT /recharge/purchase/{package_id}Purchase a package
AccountRechargeApiRechargeTransactionsByTransactionIdGetGET /recharge/transactions/{transaction_id}Get specific Transaction
AccountRechargeApiRechargeTransactionsGetGET /recharge/transactionsPurchase a package
ContactApiListsContactsByListIdAndContactIdDeleteDELETE /lists/{list_id}/contacts/{contact_id}Delete a contact
ContactApiListsContactsByListIdAndContactIdGetGET /lists/{list_id}/contacts/{contact_id}Get a specific contact
ContactApiListsContactsByListIdAndContactIdPutPUT /lists/{list_id}/contacts/{contact_id}Update specific contact
ContactApiListsContactsByListIdGetGET /lists/{list_id}/contactsGet all contacts in a list
ContactApiListsContactsByListIdPostPOST /lists/{list_id}/contactsCreate new contact
ContactApiListsCopyContactPutPUT /lists/{from_list_id}/contacts/{contact_id}/copy/{to_list_id}Copy contact to another list
ContactApiListsRemoveOptedOutContactsByListIdAndOptOutListIdPutPUT /lists/{list_id}/remove-opted-out-contacts/{opt_out_list_id}Remove all opted out contacts
ContactApiListsTransferContactPutPUT /lists/{from_list_id}/contacts/{contact_id}/transfer/{to_list_id}Transfer contact to another list
ContactListApiListsByListIdDeleteDELETE /lists/{list_id}ListsByListIdDelete
ContactListApiListsByListIdGetGET /lists/{list_id}Get specific contact list
ContactListApiListsByListIdPutPUT /lists/{list_id}Update specific contact list
ContactListApiListsGetGET /listsGet all contact lists
ContactListApiListsImportByListIdPostPOST /lists/{list_id}/importImport contacts to list
ContactListApiListsPostPOST /listsCreate new contact list
ContactListApiListsRemoveDuplicatesByListIdPutPUT /lists/{list_id}/remove-duplicatesRemove duplicate contacts
CountriesApiCountriesGetGET /countriesGet all country codes
DeliveryIssuesApiDeliveryIssuesGetGET /delivery-issuesGet all delivery issues
DeliveryIssuesApiDeliveryIssuesPostPOST /delivery-issuesCreate delivery Issue
DetectAddressApiDetectAddressPostPOST /post/letters/detect-addressDetects address in uploaded file.
EmailDeliveryReceiptRulesApiEmailDeliveryReceiptAutomationDeleteDELETE /automations/email/receipts/{receipt_rule_id}Delete email delivery receipt automation
EmailDeliveryReceiptRulesApiEmailDeliveryReceiptAutomationGetGET /automations/email/receipts/{receipt_rule_id}Get specific email delivery receipt automation
EmailDeliveryReceiptRulesApiEmailDeliveryReceiptAutomationPostPOST /automations/email/receiptsCreate email delivery receipt automations
EmailDeliveryReceiptRulesApiEmailDeliveryReceiptAutomationPutPUT /automations/email/receipts/{receipt_rule_id}Update email delivery receipt automation
EmailDeliveryReceiptRulesApiEmailDeliveryReceiptAutomationsGetGET /automations/email/receiptsGet all email delivery receipt automations
EmailMarketingApiAllowedEmailAddressGetGET /email/addressesGet all email addresses
EmailMarketingApiAllowedEmailAddressPostPOST /email/addressesCreate allowed Email Address
EmailMarketingApiCancelEmailCampaignPutPUT /email-campaigns/{email_campaign_id}/cancelCancel email campaign
EmailMarketingApiEmailCampaignGetGET /email-campaigns/{email_campaign_id}Get specific email campaign
EmailMarketingApiEmailCampaignHistoryExportGetGET /email-campaigns/{email_campaign_id}/history/exportExport specific email campaign history
EmailMarketingApiEmailCampaignHistoryGetGET /email-campaigns/{email_campaign_id}/historyGet specific email campaign history
EmailMarketingApiEmailCampaignPostPOST /email-campaigns/sendSend email campaign
EmailMarketingApiEmailCampaignPricePostPOST /email-campaigns/priceCalculate email campaign price
EmailMarketingApiEmailCampaignPutPUT /email-campaigns/{email_campaign_id}Edit email campaign
EmailMarketingApiEmailCampaignsGetGET /email-campaignsGet all email campaigns
EmailMarketingApiSendVerificationTokenGetPUT /email/address-verify/{email_address_id}/sendSend verification token
EmailMarketingApiSpecificAllowedEmailAddressDeleteDELETE /email/addresses/{email_address_id}Delete specific email address
EmailMarketingApiSpecificAllowedEmailAddressGetGET /email/addresses/{email_address_id}Get specific email address
EmailMarketingApiVerifyAllowedEmailAddressGetPUT /email/address-verify/{email_address_id}/verify/{activation_token}Verify email address using verification token
EmailToSmsApiSmsEmailSmsGetGET /sms/email-smsGet list of email to sms allowed addresses
EmailToSmsApiSmsEmailSmsPostPOST /sms/email-smsCreate email to sms allowed address
EmailToSmsApiSmsEmailSmsStrippedStringDeleteDELETE /sms/email-sms-stripped-strings/{rule_id}Delete email to sms stripped string rule
EmailToSmsApiSmsEmailSmsStrippedStringGetGET /sms/email-sms-stripped-strings/{rule_id}Get email to sms stripped string rule
EmailToSmsApiSmsEmailSmsStrippedStringPostPOST /sms/email-sms-stripped-stringsCreate email to sms stripped string rule
EmailToSmsApiSmsEmailSmsStrippedStringPutPUT /sms/email-sms-stripped-strings/{rule_id}Update email to sms stripped string rule
EmailToSmsApiSmsEmailSmsStrippedStringsGetGET /sms/email-sms-stripped-stringsGet list of email to sms stripped string rules
FAXApiFaxHistoryGetGET /fax/historyGet a list of Fax History.
FAXApiFaxPricePostPOST /fax/priceCalculate Total Price for Fax Messages sent
FAXApiFaxReceiptsByMessageIdGetGET /fax/receipts/{message_id}Get a single fax receipt based on message id.
FAXApiFaxReceiptsGetGET /fax/receiptsGet all delivery receipts
FAXApiFaxReceiptsPostPOST /fax/receiptsAdd a delivery receipt
FAXApiFaxReceiptsReadPutPUT /fax/receipts-readMark delivery receipts as read
FAXApiFaxSendPostPOST /fax/sendSend a fax using supplied supported file-types.
FAXDeliveryReceiptRulesApiFaxDeliveryReceiptAutomationDeleteDELETE /automations/fax/receipts/{receipt_rule_id}Delete fax delivery receipt automation
FAXDeliveryReceiptRulesApiFaxDeliveryReceiptAutomationGetGET /automations/fax/receipts/{receipt_rule_id}Get specific fax delivery receipt automation
FAXDeliveryReceiptRulesApiFaxDeliveryReceiptAutomationPostPOST /automations/fax/receiptsCreate fax delivery receipt automations
FAXDeliveryReceiptRulesApiFaxDeliveryReceiptAutomationPutPUT /automations/fax/receipts/{receipt_rule_id}Update fax delivery receipt automation
FAXDeliveryReceiptRulesApiFaxDeliveryReceiptAutomationsGetGET /automations/fax/receiptsGet all fax delivery receipt automations
GlobalSendingApiListCountriesGetGET /country-listList of countries
GlobalSendingApiUserCountriesAgreePostPOST /user-countries/agreeAgree to rules and regulation
GlobalSendingApiUserCountriesGetGET /user-countriesGet Countries for Global Sending
GlobalSendingApiUserCountriesPostPOST /user-countriesSelect Countries for Global Sending
InboundFAXRulesApiFaxInboundAutomationDeleteDELETE /automations/fax/inbound/{inbound_rule_id}Delete inbound fax automation
InboundFAXRulesApiFaxInboundAutomationGetGET /automations/fax/inbound/{inbound_rule_id}Get specific inbound fax automation
InboundFAXRulesApiFaxInboundAutomationPostPOST /automations/fax/inboundCreate new inbound fax automation
InboundFAXRulesApiFaxInboundAutomationPutPUT /automations/fax/inbound/{inbound_rule_id}Update inbound fax automation
InboundFAXRulesApiFaxInboundAutomationsGetGET /automations/fax/inboundGet all inbound fax automations
InboundSMSRulesApiSmsInboundAutomationDeleteDELETE /automations/sms/inbound/{inbound_rule_id}Delete inbound sms automation
InboundSMSRulesApiSmsInboundAutomationGetGET /automations/sms/inbound/{inbound_rule_id}Get specific inbound sms automation
InboundSMSRulesApiSmsInboundAutomationPostPOST /automations/sms/inboundCreate new inbound sms automation
InboundSMSRulesApiSmsInboundAutomationPutPUT /automations/sms/inbound/{inbound_rule_id}Update inbound sms automation
InboundSMSRulesApiSmsInboundAutomationsGetGET /automations/sms/inboundGet all inbound sms automations
MMSApiMmsHistoryExportGetGET /mms/history/exportExport all mms history
MMSApiMmsHistoryGetGET /mms/historyGet all mms history
MMSApiMmsPricePostPOST /mms/priceGet Price for MMS sent
MMSApiMmsReceiptsGetGET /mms/receiptsGet all delivery receipts
MMSApiMmsReceiptsReadPutPUT /mms/receipts-readMark delivery receipts as read
MMSApiMmsSendPostPOST /mms/sendSend MMS
MasterEmailTemplatesApiMasterEmailTemplateCategoriesGetGET /email/master-templates-categoriesGet all master email template categories
MasterEmailTemplatesApiMasterEmailTemplateCategoryGetGET /email/master-templates-categories/{category_id}Get specific master email template category
MasterEmailTemplatesApiMasterEmailTemplateGetGET /email/master-templates/{template_id}Get specific master email template
MasterEmailTemplatesApiMasterEmailTemplatesGetGET /email/master-templatesGet all master email templates
MasterEmailTemplatesApiMasterEmailTemplatesInCategoryGetGET /email/master-templates-categories/{category_id}/master-templatesGet all master email templates in a category
MmsCampaignApiMmsCampaignByMmsCampaignIdGetGET /mms-campaigns/{mms_campaign_id}Get specific mms campaign
MmsCampaignApiMmsCampaignsByMmsCampaignIdPutPUT /mms-campaigns/{mms_campaign_id}Update mms campaign
MmsCampaignApiMmsCampaignsCancelByMmsCampaignIdPutPUT /mms-campaigns/{mms_campaign_id}/cancelCancel mms campaign
MmsCampaignApiMmsCampaignsGetGET /mms-campaignsGet list of mms campaigns
MmsCampaignApiMmsCampaignsPricePostPOST /mms-campaigns/priceCalculate price for mms campaign
MmsCampaignApiMmsCampaignsSendPostPOST /mms-campaigns/sendCreate mms campaign
NumberApiNumbersBuyByDedicatedNumberPostPOST /numbers/buy/{dedicated_number}Buy dedicated number
NumberApiNumbersGetGET /numbersGet all availible dedicated numbers
NumberApiNumbersSearchByCountryGetGET /numbers/search/{country}Get all dedicated numbers by country
PostLetterApiPostLettersExportGetGET /post/letters/history/exportexport post letter history
PostLetterApiPostLettersHistoryGetGET /post/letters/historyGet all post letter history
PostLetterApiPostLettersPricePostPOST /post/letters/priceCalculate post letter price
PostLetterApiPostLettersSendPostPOST /post/letters/sendSend post letter
PostPostcardApiPostPostcardsHistoryExportGetGET /post/postcards/history/exportExport postcard history to a CSV file
PostPostcardApiPostPostcardsHistoryGetGET /post/postcards/historyRetrieve the history of postcards sent or scheduled
PostPostcardApiPostPostcardsPricePostPOST /post/postcards/priceCalculate price for sending one or more postcards
PostPostcardApiPostPostcardsSendPostPOST /post/postcards/sendSend one or more postcards
PostReturnAddressApiPostReturnAddressesByReturnAddressIdDeleteDELETE /post/return-addresses/{return_address_id}Delete specific post return address
PostReturnAddressApiPostReturnAddressesByReturnAddressIdGetGET /post/return-addresses/{return_address_id}Get specific post return address
PostReturnAddressApiPostReturnAddressesByReturnAddressIdPutPUT /post/return-addresses/{return_address_id}Update post return address
PostReturnAddressApiPostReturnAddressesGetGET /post/return-addressesGet list of post return addresses
PostReturnAddressApiPostReturnAddressesPostPOST /post/return-addressesCreate post return address
ReferralAccountApiReferralAccountsGetGET /referral/accountsGet all referral accounts
ResellerAccountApiResellerAccountsByClientUserIdGetGET /reseller/accounts/{client_user_id}Get Reseller clients Account
ResellerAccountApiResellerAccountsByClientUserIdPutPUT /reseller/accounts/{client_user_id}Update Reseller clients Account
ResellerAccountApiResellerAccountsGetGET /reseller/accountsGet list of reseller accounts
ResellerAccountApiResellerAccountsPostPOST /reseller/accountsCreate reseller account
SMSApiSmsCancelAllPutPUT /sms/cancel-allUpdate all scheduled message as cancelled
SMSApiSmsCancelByMessageIdPutPUT /sms/{message_id}/cancelUpdate scheduled message as cancelled
SMSApiSmsHistoryExportGetGET /sms/history/exportExport all sms history
SMSApiSmsHistoryGetGET /sms/historyGet all sms history
SMSApiSmsInboundGetGET /sms/inboundGet all inbound sms
SMSApiSmsInboundPostPOST /sms/inboundCreate inbound sms
SMSApiSmsInboundReadByMessageIdPutPUT /sms/inbound-read/{message_id}Mark inbound SMS as read
SMSApiSmsInboundReadPutPUT /sms/inbound-readMark inbound SMS as read
SMSApiSmsPricePostPOST /sms/priceCalculate sms price
SMSApiSmsReceiptsByMessageIdGetGET /sms/receipts/{message_id}Get a Specific Delivery Receipt
SMSApiSmsReceiptsGetGET /sms/receiptsGet all delivery receipts
SMSApiSmsReceiptsPostPOST /sms/receiptsAdd a delivery receipt
SMSApiSmsReceiptsReadPutPUT /sms/receipts-readMark delivery receipts as read
SMSApiSmsSendPostPOST /sms/sendSend sms message(s)
SMSApiSmsTemplatesByTemplateIdDeleteDELETE /sms/templates/{template_id}Delete sms template
SMSApiSmsTemplatesByTemplateIdPutPUT /sms/templates/{template_id}Update sms template
SMSApiSmsTemplatesGetGET /sms/templatesGet lists of all sms templates
SMSApiSmsTemplatesPostPOST /sms/templatesCreate sms template
SMSDeliveryReceiptRulesApiSmsDeliveryReceiptAutomationDeleteDELETE /automations/sms/receipts/{receipt_rule_id}Delete sms delivery receipt automation
SMSDeliveryReceiptRulesApiSmsDeliveryReceiptAutomationGetGET /automations/sms/receipts/{receipt_rule_id}Get specific sms delivery receipt automation
SMSDeliveryReceiptRulesApiSmsDeliveryReceiptAutomationPostPOST /automations/sms/receiptsCreate sms delivery receipt automations
SMSDeliveryReceiptRulesApiSmsDeliveryReceiptAutomationPutPUT /automations/sms/receipts/{receipt_rule_id}Update sms delivery receipt automation
SMSDeliveryReceiptRulesApiSmsDeliveryReceiptAutomationsGetGET /automations/sms/receiptsGet all sms delivery receipt automations
SearchApiSearchContactsListsGetGET /search/contacts-listsGet list of searched contact list
SmsCampaignApiSmsCampaignBySmsCampaignIdGetGET /sms-campaigns/{sms_campaign_id}Get specific sms campaign
SmsCampaignApiSmsCampaignsBySmsCampaignIdPutPUT /sms-campaigns/{sms_campaign_id}Update sms campaign
SmsCampaignApiSmsCampaignsCancelBySmsCampaignIdPutPUT /sms-campaigns/{sms_campaign_id}/cancelCancel sms campaign
SmsCampaignApiSmsCampaignsGetGET /sms-campaignsGet list of sms campaigns
SmsCampaignApiSmsCampaignsPricePostPOST /sms-campaigns/priceCalculate price for sms campaign
SmsCampaignApiSmsCampaignsSendPostPOST /sms-campaigns/sendCreate sms campaign
StatisticsApiStatisticsSmsGetGET /statistics/smsGet sms statistics
StatisticsApiStatisticsVoiceGetGET /statistics/voiceGet voice statistics
SubaccountApiSubaccountsBySubaccountIdDeleteDELETE /subaccounts/{subaccount_id}Delete a subaccount
SubaccountApiSubaccountsBySubaccountIdGetGET /subaccounts/{subaccount_id}Get specific subaccount
SubaccountApiSubaccountsBySubaccountIdPutPUT /subaccounts/{subaccount_id}Update subaccount
SubaccountApiSubaccountsGetGET /subaccountsGet all subaccounts
SubaccountApiSubaccountsPostPOST /subaccountsCreate new subaccount
SubaccountApiSubaccountsRegenApiKeyBySubaccountIdPutPUT /subaccounts/{subaccount_id}/regen-api-keyRegenerate an API Key
TimezonesApiTimezonesGetGET /timezonesGet supported list of timezones.
TransactionalEmailApiEmailHistoryExportGetGET /email/history/exportExport all Transactional Email history
TransactionalEmailApiEmailHistoryGetGET /email/historyGet all transactional email history
TransactionalEmailApiEmailPricePostPOST /email/priceGet transactional email price
TransactionalEmailApiEmailSendPostPOST /email/sendSend transactional email
TransferCreditApiResellerTransferCreditPutPUT /reseller/transfer-creditTransfer Credit
UploadApiUploadsPostPOST /uploadsUpload File
UserEmailTemplatesApiEmailTemplateDeleteDELETE /email/templates/{template_id}Delete user email template
UserEmailTemplatesApiEmailTemplateGetGET /email/templates/{template_id}Get specific user email template
UserEmailTemplatesApiEmailTemplatePostPOST /email/templatesCreate email template
UserEmailTemplatesApiEmailTemplatePutPUT /email/templates/{template_id}Update email template
UserEmailTemplatesApiEmailTemplatesGetGET /email/templatesGet all user email templates
VoiceApiVoiceCancelAllPutPUT /voice/cancel-allUpdate all voice messages as cancelled
VoiceApiVoiceCancelByMessageIdPutPUT /voice/{message_id}/cancelUpdate voice message status as cancelled
VoiceApiVoiceHistoryExportGetGET /voice/history/exportExport voice history
VoiceApiVoiceHistoryGetGET /voice/historyGet all voice history
VoiceApiVoiceLangGetGET /voice/langGet all voice languages
VoiceApiVoicePricePostPOST /voice/priceCalculate voice price
VoiceApiVoiceReceiptsGetGET /voice/receiptsGet all delivery receipts
VoiceApiVoiceReceiptsPostPOST /voice/receiptsAdd a delivery receipt
VoiceApiVoiceReceiptsReadPutPUT /voice/receipts-readMark delivery receipts as read
VoiceApiVoiceSendPostPOST /voice/sendSend voice message(s)
VoiceDeliveryReceiptRulesApiVoiceDeliveryReceiptAutomationDeleteDELETE /automations/voice/receipts/{receipt_rule_id}Delete voice delivery receipt automation
VoiceDeliveryReceiptRulesApiVoiceDeliveryReceiptAutomationGetGET /automations/voice/receipts/{receipt_rule_id}Get specific voice delivery receipt automation
VoiceDeliveryReceiptRulesApiVoiceDeliveryReceiptAutomationPostPOST /automations/voice/receiptsCreate voice delivery receipt automations
VoiceDeliveryReceiptRulesApiVoiceDeliveryReceiptAutomationPutPUT /automations/voice/receipts/{receipt_rule_id}Update voice delivery receipt automation
VoiceDeliveryReceiptRulesApiVoiceDeliveryReceiptAutomationsGetGET /automations/voice/receiptsGet all voice delivery receipt automations

Documentation for Models

Documentation for Authorization

BasicAuth

  • Type: HTTP basic authentication

About

ClickSend c# SDK

Resources

Stars

11 stars

Watchers

12 watching

Forks

Releases

Packages

Used by

Contributors

Languages