Skip to content

ClickSend/clicksend-java-v2

Repository files navigation

clicksend-java

ClickSend v3 API

  • API version: 3.1
    • Generator version: 7.23.0

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..

Automatically generated by the OpenAPI Generator

Requirements

Building the API client library requires:

  1. Java 1.8+
  2. Maven (3.8.3+)/Gradle (7.2+)

Installation

To install the API client library to your local Maven repository, simply execute:

mvn clean install

To deploy it to a remote Maven repository instead, configure the settings of the repository and execute:

mvn clean deploy

Refer to the OSSRH Guide for more information.

Maven users

Add this dependency to your project's POM:

<dependency>
  <groupId>com.clicksend</groupId>
  <artifactId>clicksend-java</artifactId>
  <version>1.0.0</version>
  <scope>compile</scope>
</dependency>

Gradle users

Add this dependency to your project's build file:

  repositories {
    mavenCentral()     // Needed if the 'clicksend-java' jar has been published to maven central.
    mavenLocal()       // Needed if the 'clicksend-java' jar has been published to the local maven repo.
  }

  dependencies {
     implementation "com.clicksend:clicksend-java:1.0.0"
  }

Others

At first generate the JAR by executing:

mvn clean package

Then manually install the following JARs:

  • target/clicksend-java-1.0.0.jar
  • target/lib/*.jar

Getting Started

Please follow the installation instruction and execute the following Java code:

// Import classes:
import org.openapitools.client.ApiClient;
import org.openapitools.client.ApiException;
import org.openapitools.client.Configuration;
import org.openapitools.client.auth.*;
import org.openapitools.client.model.*;
import org.openapitools.client.api.AccountApi;

public class Example {
  public static void main(String[] args) {
    ApiClient defaultClient = Configuration.getDefaultApiClient();
    defaultClient.setBasePath("https://rest.clicksend.com/v3");
    
    // Configure HTTP basic authorization: BasicAuth
    HttpBasicAuth BasicAuth = (HttpBasicAuth) defaultClient.getAuthentication("BasicAuth");
    BasicAuth.setUsername("YOUR USERNAME");
    BasicAuth.setPassword("YOUR PASSWORD");

    AccountApi apiInstance = new AccountApi(defaultClient);
    try {
      String result = apiInstance.accountGet();
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling AccountApi#accountGet");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Documentation for API Endpoints

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

Class Method HTTP request Description
AccountApi accountGet GET /account Get account information
AccountApi accountPost POST /account Create a new account
AccountApi accountUseageBySubaccountGet GET /account/usage/{year}/{month}/subaccount Get account useage by subaccount
AccountApi accountVerifySendPut PUT /account-verify/send Send account activation token
AccountApi accountVerifyVerifyByActivationTokenPut PUT /account-verify/verify/{activation_token} Verify new account
AccountApi forgotPasswordPut PUT /forgot-password Forgot password
AccountApi forgotPasswordVerifyPut PUT /forgot-password/verify Verify forgot password
AccountApi forgotUsernamePut PUT /forgot-username Forgot username
AccountRechargeApi rechargeCreditCardGet GET /recharge/credit-card Get Credit Card info
AccountRechargeApi rechargeCreditCardPut PUT /recharge/credit-card Update credit card info
AccountRechargeApi rechargePackagesGet GET /recharge/packages Get list of all packages
AccountRechargeApi rechargePurchaseByPackageIdPut PUT /recharge/purchase/{package_id} Purchase a package
AccountRechargeApi rechargeTransactionsByTransactionIdGet GET /recharge/transactions/{transaction_id} Get specific Transaction
AccountRechargeApi rechargeTransactionsGet GET /recharge/transactions Purchase a package
ContactApi listsContactsByListIdAndContactIdDelete DELETE /lists/{list_id}/contacts/{contact_id} Delete a contact
ContactApi listsContactsByListIdAndContactIdGet GET /lists/{list_id}/contacts/{contact_id} Get a specific contact
ContactApi listsContactsByListIdAndContactIdPut PUT /lists/{list_id}/contacts/{contact_id} Update specific contact
ContactApi listsContactsByListIdGet GET /lists/{list_id}/contacts Get all contacts in a list
ContactApi listsContactsByListIdPost POST /lists/{list_id}/contacts Create new contact
ContactApi listsCopyContactPut PUT /lists/{from_list_id}/contacts/{contact_id}/copy/{to_list_id} Copy contact to another list
ContactApi listsRemoveOptedOutContactsByListIdAndOptOutListIdPut PUT /lists/{list_id}/remove-opted-out-contacts/{opt_out_list_id} Remove all opted out contacts
ContactApi listsTransferContactPut PUT /lists/{from_list_id}/contacts/{contact_id}/transfer/{to_list_id} Transfer contact to another list
ContactListApi listsByListIdDelete DELETE /lists/{list_id} ListsByListIdDelete
ContactListApi listsByListIdGet GET /lists/{list_id} Get specific contact list
ContactListApi listsByListIdPut PUT /lists/{list_id} Update specific contact list
ContactListApi listsGet GET /lists Get all contact lists
ContactListApi listsImportByListIdPost POST /lists/{list_id}/import Import contacts to list
ContactListApi listsPost POST /lists Create new contact list
ContactListApi listsRemoveDuplicatesByListIdPut PUT /lists/{list_id}/remove-duplicates Remove duplicate contacts
CountriesApi countriesGet GET /countries Get all country codes
DeliveryIssuesApi deliveryIssuesGet GET /delivery-issues Get all delivery issues
DeliveryIssuesApi deliveryIssuesPost POST /delivery-issues Create delivery Issue
DetectAddressApi detectAddressPost POST /post/letters/detect-address Detects address in uploaded file.
EmailDeliveryReceiptRulesApi emailDeliveryReceiptAutomationDelete DELETE /automations/email/receipts/{receipt_rule_id} Delete email delivery receipt automation
EmailDeliveryReceiptRulesApi emailDeliveryReceiptAutomationGet GET /automations/email/receipts/{receipt_rule_id} Get specific email delivery receipt automation
EmailDeliveryReceiptRulesApi emailDeliveryReceiptAutomationPost POST /automations/email/receipts Create email delivery receipt automations
EmailDeliveryReceiptRulesApi emailDeliveryReceiptAutomationPut PUT /automations/email/receipts/{receipt_rule_id} Update email delivery receipt automation
EmailDeliveryReceiptRulesApi emailDeliveryReceiptAutomationsGet GET /automations/email/receipts Get all email delivery receipt automations
EmailMarketingApi allowedEmailAddressGet GET /email/addresses Get all email addresses
EmailMarketingApi allowedEmailAddressPost POST /email/addresses Create allowed Email Address
EmailMarketingApi cancelEmailCampaignPut PUT /email-campaigns/{email_campaign_id}/cancel Cancel email campaign
EmailMarketingApi emailCampaignGet GET /email-campaigns/{email_campaign_id} Get specific email campaign
EmailMarketingApi emailCampaignHistoryExportGet GET /email-campaigns/{email_campaign_id}/history/export Export specific email campaign history
EmailMarketingApi emailCampaignHistoryGet GET /email-campaigns/{email_campaign_id}/history Get specific email campaign history
EmailMarketingApi emailCampaignPost POST /email-campaigns/send Send email campaign
EmailMarketingApi emailCampaignPricePost POST /email-campaigns/price Calculate email campaign price
EmailMarketingApi emailCampaignPut PUT /email-campaigns/{email_campaign_id} Edit email campaign
EmailMarketingApi emailCampaignsGet GET /email-campaigns Get all email campaigns
EmailMarketingApi sendVerificationTokenGet PUT /email/address-verify/{email_address_id}/send Send verification token
EmailMarketingApi specificAllowedEmailAddressDelete DELETE /email/addresses/{email_address_id} Delete specific email address
EmailMarketingApi specificAllowedEmailAddressGet GET /email/addresses/{email_address_id} Get specific email address
EmailMarketingApi verifyAllowedEmailAddressGet PUT /email/address-verify/{email_address_id}/verify/{activation_token} Verify email address using verification token
EmailToSmsApi smsEmailSmsGet GET /sms/email-sms Get list of email to sms allowed addresses
EmailToSmsApi smsEmailSmsPost POST /sms/email-sms Create email to sms allowed address
EmailToSmsApi smsEmailSmsStrippedStringDelete DELETE /sms/email-sms-stripped-strings/{rule_id} Delete email to sms stripped string rule
EmailToSmsApi smsEmailSmsStrippedStringGet GET /sms/email-sms-stripped-strings/{rule_id} Get email to sms stripped string rule
EmailToSmsApi smsEmailSmsStrippedStringPost POST /sms/email-sms-stripped-strings Create email to sms stripped string rule
EmailToSmsApi smsEmailSmsStrippedStringPut PUT /sms/email-sms-stripped-strings/{rule_id} Update email to sms stripped string rule
EmailToSmsApi smsEmailSmsStrippedStringsGet GET /sms/email-sms-stripped-strings Get list of email to sms stripped string rules
FaxApi faxHistoryGet GET /fax/history Get a list of Fax History.
FaxApi faxPricePost POST /fax/price Calculate Total Price for Fax Messages sent
FaxApi faxReceiptsByMessageIdGet GET /fax/receipts/{message_id} Get a single fax receipt based on message id.
FaxApi faxReceiptsGet GET /fax/receipts Get all delivery receipts
FaxApi faxReceiptsPost POST /fax/receipts Add a delivery receipt
FaxApi faxReceiptsReadPut PUT /fax/receipts-read Mark delivery receipts as read
FaxApi faxSendPost POST /fax/send Send a fax using supplied supported file-types.
FaxDeliveryReceiptRulesApi faxDeliveryReceiptAutomationDelete DELETE /automations/fax/receipts/{receipt_rule_id} Delete fax delivery receipt automation
FaxDeliveryReceiptRulesApi faxDeliveryReceiptAutomationGet GET /automations/fax/receipts/{receipt_rule_id} Get specific fax delivery receipt automation
FaxDeliveryReceiptRulesApi faxDeliveryReceiptAutomationPost POST /automations/fax/receipts Create fax delivery receipt automations
FaxDeliveryReceiptRulesApi faxDeliveryReceiptAutomationPut PUT /automations/fax/receipts/{receipt_rule_id} Update fax delivery receipt automation
FaxDeliveryReceiptRulesApi faxDeliveryReceiptAutomationsGet GET /automations/fax/receipts Get all fax delivery receipt automations
GlobalSendingApi listCountriesGet GET /country-list List of countries
GlobalSendingApi userCountriesAgreePost POST /user-countries/agree Agree to rules and regulation
GlobalSendingApi userCountriesGet GET /user-countries Get Countries for Global Sending
GlobalSendingApi userCountriesPost POST /user-countries Select Countries for Global Sending
InboundFaxRulesApi faxInboundAutomationDelete DELETE /automations/fax/inbound/{inbound_rule_id} Delete inbound fax automation
InboundFaxRulesApi faxInboundAutomationGet GET /automations/fax/inbound/{inbound_rule_id} Get specific inbound fax automation
InboundFaxRulesApi faxInboundAutomationPost POST /automations/fax/inbound Create new inbound fax automation
InboundFaxRulesApi faxInboundAutomationPut PUT /automations/fax/inbound/{inbound_rule_id} Update inbound fax automation
InboundFaxRulesApi faxInboundAutomationsGet GET /automations/fax/inbound Get all inbound fax automations
InboundSmsRulesApi smsInboundAutomationDelete DELETE /automations/sms/inbound/{inbound_rule_id} Delete inbound sms automation
InboundSmsRulesApi smsInboundAutomationGet GET /automations/sms/inbound/{inbound_rule_id} Get specific inbound sms automation
InboundSmsRulesApi smsInboundAutomationPost POST /automations/sms/inbound Create new inbound sms automation
InboundSmsRulesApi smsInboundAutomationPut PUT /automations/sms/inbound/{inbound_rule_id} Update inbound sms automation
InboundSmsRulesApi smsInboundAutomationsGet GET /automations/sms/inbound Get all inbound sms automations
MasterEmailTemplatesApi masterEmailTemplateCategoriesGet GET /email/master-templates-categories Get all master email template categories
MasterEmailTemplatesApi masterEmailTemplateCategoryGet GET /email/master-templates-categories/{category_id} Get specific master email template category
MasterEmailTemplatesApi masterEmailTemplateGet GET /email/master-templates/{template_id} Get specific master email template
MasterEmailTemplatesApi masterEmailTemplatesGet GET /email/master-templates Get all master email templates
MasterEmailTemplatesApi masterEmailTemplatesInCategoryGet GET /email/master-templates-categories/{category_id}/master-templates Get all master email templates in a category
MmsApi mmsHistoryExportGet GET /mms/history/export Export all mms history
MmsApi mmsHistoryGet GET /mms/history Get all mms history
MmsApi mmsPricePost POST /mms/price Get Price for MMS sent
MmsApi mmsReceiptsGet GET /mms/receipts Get all delivery receipts
MmsApi mmsReceiptsReadPut PUT /mms/receipts-read Mark delivery receipts as read
MmsApi mmsSendPost POST /mms/send Send MMS
MmsCampaignApi mmsCampaignByMmsCampaignIdGet GET /mms-campaigns/{mms_campaign_id} Get specific mms campaign
MmsCampaignApi mmsCampaignsByMmsCampaignIdPut PUT /mms-campaigns/{mms_campaign_id} Update mms campaign
MmsCampaignApi mmsCampaignsCancelByMmsCampaignIdPut PUT /mms-campaigns/{mms_campaign_id}/cancel Cancel mms campaign
MmsCampaignApi mmsCampaignsGet GET /mms-campaigns Get list of mms campaigns
MmsCampaignApi mmsCampaignsPricePost POST /mms-campaigns/price Calculate price for mms campaign
MmsCampaignApi mmsCampaignsSendPost POST /mms-campaigns/send Create mms campaign
NumberApi numbersBuyByDedicatedNumberPost POST /numbers/buy/{dedicated_number} Buy dedicated number
NumberApi numbersGet GET /numbers Get all availible dedicated numbers
NumberApi numbersSearchByCountryGet GET /numbers/search/{country} Get all dedicated numbers by country
PostLetterApi postLettersExportGet GET /post/letters/history/export export post letter history
PostLetterApi postLettersHistoryGet GET /post/letters/history Get all post letter history
PostLetterApi postLettersPricePost POST /post/letters/price Calculate post letter price
PostLetterApi postLettersSendPost POST /post/letters/send Send post letter
PostPostcardApi postPostcardsHistoryExportGet GET /post/postcards/history/export Export postcard history to a CSV file
PostPostcardApi postPostcardsHistoryGet GET /post/postcards/history Retrieve the history of postcards sent or scheduled
PostPostcardApi postPostcardsPricePost POST /post/postcards/price Calculate price for sending one or more postcards
PostPostcardApi postPostcardsSendPost POST /post/postcards/send Send one or more postcards
PostReturnAddressApi postReturnAddressesByReturnAddressIdDelete DELETE /post/return-addresses/{return_address_id} Delete specific post return address
PostReturnAddressApi postReturnAddressesByReturnAddressIdGet GET /post/return-addresses/{return_address_id} Get specific post return address
PostReturnAddressApi postReturnAddressesByReturnAddressIdPut PUT /post/return-addresses/{return_address_id} Update post return address
PostReturnAddressApi postReturnAddressesGet GET /post/return-addresses Get list of post return addresses
PostReturnAddressApi postReturnAddressesPost POST /post/return-addresses Create post return address
ReferralAccountApi referralAccountsGet GET /referral/accounts Get all referral accounts
ResellerAccountApi resellerAccountsByClientUserIdGet GET /reseller/accounts/{client_user_id} Get Reseller clients Account
ResellerAccountApi resellerAccountsByClientUserIdPut PUT /reseller/accounts/{client_user_id} Update Reseller clients Account
ResellerAccountApi resellerAccountsGet GET /reseller/accounts Get list of reseller accounts
ResellerAccountApi resellerAccountsPost POST /reseller/accounts Create reseller account
SearchApi searchContactsListsGet GET /search/contacts-lists Get list of searched contact list
SmsApi smsCancelAllPut PUT /sms/cancel-all Update all scheduled message as cancelled
SmsApi smsCancelByMessageIdPut PUT /sms/{message_id}/cancel Update scheduled message as cancelled
SmsApi smsHistoryExportGet GET /sms/history/export Export all sms history
SmsApi smsHistoryGet GET /sms/history Get all sms history
SmsApi smsInboundGet GET /sms/inbound Get all inbound sms
SmsApi smsInboundPost POST /sms/inbound Create inbound sms
SmsApi smsInboundReadByMessageIdPut PUT /sms/inbound-read/{message_id} Mark inbound SMS as read
SmsApi smsInboundReadPut PUT /sms/inbound-read Mark inbound SMS as read
SmsApi smsPricePost POST /sms/price Calculate sms price
SmsApi smsReceiptsByMessageIdGet GET /sms/receipts/{message_id} Get a Specific Delivery Receipt
SmsApi smsReceiptsGet GET /sms/receipts Get all delivery receipts
SmsApi smsReceiptsPost POST /sms/receipts Add a delivery receipt
SmsApi smsReceiptsReadPut PUT /sms/receipts-read Mark delivery receipts as read
SmsApi smsSendPost POST /sms/send Send sms message(s)
SmsApi smsTemplatesByTemplateIdDelete DELETE /sms/templates/{template_id} Delete sms template
SmsApi smsTemplatesByTemplateIdPut PUT /sms/templates/{template_id} Update sms template
SmsApi smsTemplatesGet GET /sms/templates Get lists of all sms templates
SmsApi smsTemplatesPost POST /sms/templates Create sms template
SmsCampaignApi smsCampaignBySmsCampaignIdGet GET /sms-campaigns/{sms_campaign_id} Get specific sms campaign
SmsCampaignApi smsCampaignsBySmsCampaignIdPut PUT /sms-campaigns/{sms_campaign_id} Update sms campaign
SmsCampaignApi smsCampaignsCancelBySmsCampaignIdPut PUT /sms-campaigns/{sms_campaign_id}/cancel Cancel sms campaign
SmsCampaignApi smsCampaignsGet GET /sms-campaigns Get list of sms campaigns
SmsCampaignApi smsCampaignsPricePost POST /sms-campaigns/price Calculate price for sms campaign
SmsCampaignApi smsCampaignsSendPost POST /sms-campaigns/send Create sms campaign
SmsDeliveryReceiptRulesApi smsDeliveryReceiptAutomationDelete DELETE /automations/sms/receipts/{receipt_rule_id} Delete sms delivery receipt automation
SmsDeliveryReceiptRulesApi smsDeliveryReceiptAutomationGet GET /automations/sms/receipts/{receipt_rule_id} Get specific sms delivery receipt automation
SmsDeliveryReceiptRulesApi smsDeliveryReceiptAutomationPost POST /automations/sms/receipts Create sms delivery receipt automations
SmsDeliveryReceiptRulesApi smsDeliveryReceiptAutomationPut PUT /automations/sms/receipts/{receipt_rule_id} Update sms delivery receipt automation
SmsDeliveryReceiptRulesApi smsDeliveryReceiptAutomationsGet GET /automations/sms/receipts Get all sms delivery receipt automations
StatisticsApi statisticsSmsGet GET /statistics/sms Get sms statistics
StatisticsApi statisticsVoiceGet GET /statistics/voice Get voice statistics
SubaccountApi subaccountsBySubaccountIdDelete DELETE /subaccounts/{subaccount_id} Delete a subaccount
SubaccountApi subaccountsBySubaccountIdGet GET /subaccounts/{subaccount_id} Get specific subaccount
SubaccountApi subaccountsBySubaccountIdPut PUT /subaccounts/{subaccount_id} Update subaccount
SubaccountApi subaccountsGet GET /subaccounts Get all subaccounts
SubaccountApi subaccountsPost POST /subaccounts Create new subaccount
SubaccountApi subaccountsRegenApiKeyBySubaccountIdPut PUT /subaccounts/{subaccount_id}/regen-api-key Regenerate an API Key
TimezonesApi timezonesGet GET /timezones Get supported list of timezones.
TransactionalEmailApi emailHistoryExportGet GET /email/history/export Export all Transactional Email history
TransactionalEmailApi emailHistoryGet GET /email/history Get all transactional email history
TransactionalEmailApi emailPricePost POST /email/price Get transactional email price
TransactionalEmailApi emailSendPost POST /email/send Send transactional email
TransferCreditApi resellerTransferCreditPut PUT /reseller/transfer-credit Transfer Credit
UploadApi uploadsPost POST /uploads Upload File
UserEmailTemplatesApi emailTemplateDelete DELETE /email/templates/{template_id} Delete user email template
UserEmailTemplatesApi emailTemplateGet GET /email/templates/{template_id} Get specific user email template
UserEmailTemplatesApi emailTemplatePost POST /email/templates Create email template
UserEmailTemplatesApi emailTemplatePut PUT /email/templates/{template_id} Update email template
UserEmailTemplatesApi emailTemplatesGet GET /email/templates Get all user email templates
VoiceApi voiceCancelAllPut PUT /voice/cancel-all Update all voice messages as cancelled
VoiceApi voiceCancelByMessageIdPut PUT /voice/{message_id}/cancel Update voice message status as cancelled
VoiceApi voiceHistoryExportGet GET /voice/history/export Export voice history
VoiceApi voiceHistoryGet GET /voice/history Get all voice history
VoiceApi voiceLangGet GET /voice/lang Get all voice languages
VoiceApi voicePricePost POST /voice/price Calculate voice price
VoiceApi voiceReceiptsGet GET /voice/receipts Get all delivery receipts
VoiceApi voiceReceiptsPost POST /voice/receipts Add a delivery receipt
VoiceApi voiceReceiptsReadPut PUT /voice/receipts-read Mark delivery receipts as read
VoiceApi voiceSendPost POST /voice/send Send voice message(s)
VoiceDeliveryReceiptRulesApi voiceDeliveryReceiptAutomationDelete DELETE /automations/voice/receipts/{receipt_rule_id} Delete voice delivery receipt automation
VoiceDeliveryReceiptRulesApi voiceDeliveryReceiptAutomationGet GET /automations/voice/receipts/{receipt_rule_id} Get specific voice delivery receipt automation
VoiceDeliveryReceiptRulesApi voiceDeliveryReceiptAutomationPost POST /automations/voice/receipts Create voice delivery receipt automations
VoiceDeliveryReceiptRulesApi voiceDeliveryReceiptAutomationPut PUT /automations/voice/receipts/{receipt_rule_id} Update voice delivery receipt automation
VoiceDeliveryReceiptRulesApi voiceDeliveryReceiptAutomationsGet GET /automations/voice/receipts Get all voice delivery receipt automations

Documentation for Models

Documentation for Authorization

Authentication schemes defined for the API:

BasicAuth

  • Type: HTTP basic authentication

Recommendation

It's recommended to create an instance of ApiClient per thread in a multithreaded environment to avoid any potential issues.

Author

[email protected]

About

Repo for a new and improved java SDKs

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors