Skip to content

Latest commit

 

History

History
2172 lines (1688 loc) · 105 KB

File metadata and controls

2172 lines (1688 loc) · 105 KB

SmsApi

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

Method HTTP request Description
calculateSmsPrice POST /v3/sms/price Calculate SMS Price
cancelAllSms PUT /v3/sms/cancel-all Cancel All SMS
cancelSms PUT /v3/sms/{message_id}/cancel Cancel SMS
createSmsDeliveryReceiptRule POST /v3/automations/sms/receipts Create SMS Delivery Receipt Rule
createSmsInboundAutomation POST /v3/automations/sms/inbound Create SMS Inbound Automation
createSmsTemplate POST /v3/sms/templates Create SMS Template
createTestInboundSms POST /v3/sms/inbound Create Test Inbound SMS
createTestSmsReceipt POST /v3/sms/receipts Create Test SMS Receipt
deleteSmsDeliveryReceiptRule DELETE /v3/automations/sms/receipts/{receipt_rule_id} Delete SMS Delivery Receipt Rule
deleteSmsInboundAutomation DELETE /v3/automations/sms/inbound/{inbound_rule_id} Delete SMS Inbound Automation
deleteSmsTemplate DELETE /v3/sms/templates/{template_id} Delete SMS Template
exportSmsHistory GET /v3/sms/history/export Export SMS History
markInboundSmsAsRead PUT /v3/sms/inbound-read Mark Inbound SMS as Read
markSmsReceiptAsRead PUT /v3/sms/receipts-read Mark SMS Receipt As Read
markSpecificInboundSmsMessageAsRead PUT /v3/sms/inbound-read/{message_id} Mark Specific Inbound SMS Message As Read
sendSms POST /v3/sms/send Send SMS
updateSmsDeliveryReceiptRule PUT /v3/automations/sms/receipts/{receipt_rule_id} Update SMS Delivery Receipt Rule
updateSmsInboundAutomation PUT /v3/automations/sms/inbound/{inbound_rule_id} Update SMS Inbound Automation
updateSmsTemplate PUT /v3/sms/templates/{template_id} Update SMS Template
viewASpecificInboundSmsMessage GET /v3/sms/inbound/{original_message_id} View a specific inbound SMS message
viewASpecificSmsTemplate GET /v3/sms/templates/{template_id} View a Specific SMS Template
viewInboundSms GET /v3/sms/inbound View Inbound SMS
viewSmsDeliveryReceiptRule GET /v3/automations/sms/receipts/{receipt_rule_id} View SMS Delivery Receipt Rule
viewSmsDeliveryReceiptRules GET /v3/automations/sms/receipts View SMS Delivery Receipt Rules
viewSmsHistory GET /v3/sms/history View SMS History
viewSmsInboundAutomation GET /v3/automations/sms/inbound/{inbound_rule_id} View SMS Inbound Automation
viewSmsInboundAutomations GET /v3/automations/sms/inbound View SMS Inbound Automations
viewSmsReceipts GET /v3/sms/receipts View SMS Receipts
viewSmsTemplates GET /v3/sms/templates View SMS Templates
viewSpecificSmsReceipt GET /v3/sms/receipts/{message_id} View Specific SMS Receipt

calculateSmsPrice

CalculateSmsPrice calculateSmsPrice(contentType, calculateSmsPriceRequest)

Calculate SMS Price

Use this endpoint to calculate the price of sending messages. The cost of sending messages varies based on the <a href=&quot;https://help.clicksend.com/article/h474eseq3a-how-many-characters-can-i-send-in-an-sms\" target=&quot;_blank&quot;>type</a> and length of the message.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    CalculateSmsPriceRequest calculateSmsPriceRequest = new CalculateSmsPriceRequest(); // CalculateSmsPriceRequest | 
    try {
      CalculateSmsPrice result = apiInstance.calculateSmsPrice(contentType, calculateSmsPriceRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#calculateSmsPrice");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
calculateSmsPriceRequest CalculateSmsPriceRequest [optional]

Return type

CalculateSmsPrice

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

cancelAllSms

CancelAllSms cancelAllSms(contentType, cancelAllSmsRequest)

Cancel All SMS

Use this endpoint to cancel all scheduled SMS. To cancel only one scheduled SMS, use the Cancel SMS endpoint.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    CancelAllSmsRequest cancelAllSmsRequest = new CancelAllSmsRequest(); // CancelAllSmsRequest | 
    try {
      CancelAllSms result = apiInstance.cancelAllSms(contentType, cancelAllSmsRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#cancelAllSms");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
cancelAllSmsRequest CancelAllSmsRequest [optional]

Return type

CancelAllSms

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

cancelSms

CancelSms cancelSms(messageId, contentType)

Cancel SMS

Use this endpoint to cancel a specific scheduled SMS. Unlike the Cancel All SMS endpoint, which cancels all scheduled SMS, this endpoint only cancels one specified scheduled SMS. Specify the scheduled SMS to cancel by providing its message_id.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String messageId = "messageId_example"; // String | The _message_id_ of the scheduled SMS to cancel.
    String contentType = "application/json"; // String | 
    try {
      CancelSms result = apiInstance.cancelSms(messageId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#cancelSms");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
messageId String The message_id of the scheduled SMS to cancel.
contentType String [optional]

Return type

CancelSms

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

createSmsDeliveryReceiptRule

CreateSmsDeliveryReceiptRule createSmsDeliveryReceiptRule(contentType, createSmsDeliveryReceiptRuleRequest)

Create SMS Delivery Receipt Rule

Create sms delivery receipt automations Create sms delivery receipt automations ### Properties | Name | Type | Required | Restrictions | Description | | --- | --- | --- | --- | --- | | rule_name | string | true | none | Rule Name. | | match_type | number | true | none | Match Type. 0=All reports. | | action | string | true | none | Action to be taken (AUTO_REPLY, EMAIL_USER, EMAIL_FIXED, URL, SMS, POLL, GROUP_SMS, MOVE_CONTACT, CREATE_CONTACT, CREATE_CONTACT_PLUS_EMAIL, CREATE_CONTACT_PLUS_NAME_EMAIL CREATE_CONTACT_PLUS_NAME, SMPP, NONE). | | action_address | string | true | none | Action address. | | enabled | number | true | none | Enabled: Disabled=0 or Enabled=1. | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    CreateSmsDeliveryReceiptRuleRequest createSmsDeliveryReceiptRuleRequest = new CreateSmsDeliveryReceiptRuleRequest(); // CreateSmsDeliveryReceiptRuleRequest | 
    try {
      CreateSmsDeliveryReceiptRule result = apiInstance.createSmsDeliveryReceiptRule(contentType, createSmsDeliveryReceiptRuleRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#createSmsDeliveryReceiptRule");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
createSmsDeliveryReceiptRuleRequest CreateSmsDeliveryReceiptRuleRequest [optional]

Return type

CreateSmsDeliveryReceiptRule

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

createSmsInboundAutomation

CreateSmsInboundAutomation createSmsInboundAutomation(contentType, createSmsInboundAutomationRequest)

Create SMS Inbound Automation

Create new inbound sms automation Create new inbound sms automation | Name | Type | Required | Restrictions | Description | | --- | --- | --- | --- | --- | | dedicated_number | string | true | none | Decicated Number. Can be '\*' to apply to all numbers. | | rule_name | string | true | none | Rule Name. | | message_search_type | number | true | none | Message Search Type: 0=Any message, 1=starts with, 2=contains, 3=does not contain. | | message_search_term | string | true | none | Message search term. | | action | string | true | none | Action to be taken (AUTO_REPLY, EMAIL_USER, EMAIL_FIXED, URL, SMS, POLL, GROUP_SMS, MOVE_CONTACT, CREATE_CONTACT, CREATE_CONTACT_PLUS_EMAIL, CREATE_CONTACT_PLUS_NAME_EMAIL CREATE_CONTACT_PLUS_NAME, SMPP, NONE). | | action_address | string | true | none | Action address. | | enabled | number | true | none | Enabled: Disabled=0 or Enabled=1. | | webhook_type | string | false | Required when action = URL only | Set as post, get, or json to change the format of the request sent. | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    CreateSmsInboundAutomationRequest createSmsInboundAutomationRequest = new CreateSmsInboundAutomationRequest(); // CreateSmsInboundAutomationRequest | 
    try {
      CreateSmsInboundAutomation result = apiInstance.createSmsInboundAutomation(contentType, createSmsInboundAutomationRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#createSmsInboundAutomation");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
createSmsInboundAutomationRequest CreateSmsInboundAutomationRequest [optional]

Return type

CreateSmsInboundAutomation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

createSmsTemplate

CreateSmsTemplate createSmsTemplate(contentType, createSmsTemplateRequest)

Create SMS Template

Use this endpoint to create a SMS template that you can use for sending SMS.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    CreateSmsTemplateRequest createSmsTemplateRequest = new CreateSmsTemplateRequest(); // CreateSmsTemplateRequest | 
    try {
      CreateSmsTemplate result = apiInstance.createSmsTemplate(contentType, createSmsTemplateRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#createSmsTemplate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
createSmsTemplateRequest CreateSmsTemplateRequest [optional]

Return type

CreateSmsTemplate

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

createTestInboundSms

CreateTestInboundSms createTestInboundSms(contentType, createTestInboundSmsRequest)

Create Test Inbound SMS

Use this endpoint to generate and send a test <a href=&quot;https://help.clicksend.com/article/ik4hw5xu35-can-i-receive-inbound-sms-to-my-url\" target=&quot;_blank&quot;>inbound SMS</a> to your webhook URL. Inbound SMS are messages sent by your recipient to you. This test endpoint allows you to verify that the inbound SMS is correctly sent to your webhook URL.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    CreateTestInboundSmsRequest createTestInboundSmsRequest = new CreateTestInboundSmsRequest(); // CreateTestInboundSmsRequest | 
    try {
      CreateTestInboundSms result = apiInstance.createTestInboundSms(contentType, createTestInboundSmsRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#createTestInboundSms");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
createTestInboundSmsRequest CreateTestInboundSmsRequest [optional]

Return type

CreateTestInboundSms

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

createTestSmsReceipt

CreateTestSmsReceipt createTestSmsReceipt(contentType, createTestSmsReceiptRequest)

Create Test SMS Receipt

Use this endpoint to generate and send a test <a href=&quot;https://help.clicksend.com/article/49eq1qdcui-how-do-i-receive-sms-delivery-receipts-delivery-status-updates\" target=&quot;_blank&quot;>SMS delivery receipt</a> to your webhook URL. When you send an SMS, a delivery receipt is generated and can be received at your webhook URL. This test endpoint allows you to verify that the receipt is correctly sent to your webhook URL. Additionally, you can obtain SMS receipts by setting the webhook URL to poll and periodically calling the View SMS Receipt endpoint to check for new receipts. This process is known as polling.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    CreateTestSmsReceiptRequest createTestSmsReceiptRequest = new CreateTestSmsReceiptRequest(); // CreateTestSmsReceiptRequest | 
    try {
      CreateTestSmsReceipt result = apiInstance.createTestSmsReceipt(contentType, createTestSmsReceiptRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#createTestSmsReceipt");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
createTestSmsReceiptRequest CreateTestSmsReceiptRequest [optional]

Return type

CreateTestSmsReceipt

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

deleteSmsDeliveryReceiptRule

DeleteSmsDeliveryReceiptRule deleteSmsDeliveryReceiptRule(receiptRuleId, contentType)

Delete SMS Delivery Receipt Rule

Delete sms delivery receipt automation Delete sms delivery receipt automation ### Parameters | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | receipt_rule_id | path | integer(int32) | true | Receipt rule id | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String receiptRuleId = "receiptRuleId_example"; // String | 
    String contentType = "application/json"; // String | 
    try {
      DeleteSmsDeliveryReceiptRule result = apiInstance.deleteSmsDeliveryReceiptRule(receiptRuleId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#deleteSmsDeliveryReceiptRule");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
receiptRuleId String
contentType String [optional]

Return type

DeleteSmsDeliveryReceiptRule

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

deleteSmsInboundAutomation

DeleteSmsInboundAutomation deleteSmsInboundAutomation(inboundRuleId, contentType)

Delete SMS Inbound Automation

Delete inbound sms automation Delete inbound sms automation ### Parameters | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | inbound_rule_id | path | integer(int32) | true | Inbound rule id | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String inboundRuleId = "inboundRuleId_example"; // String | 
    String contentType = "application/json"; // String | 
    try {
      DeleteSmsInboundAutomation result = apiInstance.deleteSmsInboundAutomation(inboundRuleId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#deleteSmsInboundAutomation");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
inboundRuleId String
contentType String [optional]

Return type

DeleteSmsInboundAutomation

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

deleteSmsTemplate

DeleteSmsTemplate deleteSmsTemplate(templateId, contentType)

Delete SMS Template

Use this endpoint to delete a <a href=&quot;https://help.clicksend.com/article/9z9uloaz8y-sms-templates-for-different-industries\" target=&quot;_blank&quot;>SMS template</a>. Specify the SMS template to delete by providing its template_id.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String templateId = "templateId_example"; // String | The ID of the template to delete.
    String contentType = "application/json"; // String | 
    try {
      DeleteSmsTemplate result = apiInstance.deleteSmsTemplate(templateId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#deleteSmsTemplate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
templateId String The ID of the template to delete.
contentType String [optional]

Return type

DeleteSmsTemplate

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

exportSmsHistory

ExportSmsHistory exportSmsHistory(contentType, filename, page, limit, q, orderBy, dateFrom, dateTo)

Export SMS History

Use this endpoint to create a download link of your SMS history. You can filter the SMS history result using the query parameters.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    String filename = "export.csv"; // String | The filename of the result. It should be in the .csv format.
    Integer page = 1; // Integer | The page number to retrieve. Use this parameter to navigate through the [pagination](/#pagination) results. The default value is 1.
    Integer limit = 15; // Integer | The number of items to return per page. This parameter controls the size of each page of results. The default value is 15.
    String q = "field_name"; // String | Allows filtering of results based on your search criteria. The query should be in the format `field_name:value`.  1. **Field Name**: The field within the SMS history you want to filter by. You can use the following fields:          - _Status_: The status of the SMS. Available values for status are: Queued, Completed, Scheduled, WaitApproval, Failed, Cancelled, CancelledAfterReview, Received, Sent.              - _To_: The recipient of the SMS.              - _from_: The sender of the SMS.              - _subaccount_id_: The sub-account identifier.              - _message_id_: The ID of your SMS.          2. **Value**: The text or keyword you're searching for within the specified field. If left empty after the colon, the filter will look for all templates with any value in the **Field Name**.             For example, if you are searching for a SMS with the status of _Scheduled_, the final query would look like this:    `q=status:Scheduled`  <div class=\"info-box\">   <h4><i class=\"fas fa-info-circle\"></i> Note:</h4>   <div>   <p>Some characters have to be encoded. For example, if you are searching for SMS sent from the phone number +61437085284, your search query q would be:<br/></p>     <ul>       <li>q=from:%2B61437085284</li>     </ul>     <p>You can use the <a href=\"https://www.urlencoder.org/\" target=\"_blank\">URL encoder</a> to encode the text. If a character is not an alphanumeric character (A-Z, a-z, 0-9), it is typically either reserved or unsafe and should be encoded.</p>   </div> </div>
    String orderBy = "date:asc"; // String | Specifies the field and order to sort the results by. The value is composed of the field name followed by a colon and the sort direction (asc for ascending or desc for descending).  The default sort order is by date in ascending order. You can use the following fields:    - _date_    - _username_   - _from_    - _to_   - _status_    - _body_  For example, if you want to order by the most recently sent SMS, you should sort by date in descending order. The query would look like this:    `order_by=date:desc`
    Integer dateFrom = 56; // Integer | Start date to filter results. It should be in <a href=\"http://help.clicksend.com/what-is-a-unix-timestamp\" target=\"_blank\">Unix format</a>.
    Integer dateTo = 56; // Integer | End date to filter results. It should be in <a href=\"http://help.clicksend.com/what-is-a-unix-timestamp\" target=\"_blank\">Unix format</a>.
    try {
      ExportSmsHistory result = apiInstance.exportSmsHistory(contentType, filename, page, limit, q, orderBy, dateFrom, dateTo);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#exportSmsHistory");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
filename String The filename of the result. It should be in the .csv format. [optional] [default to export.csv]
page Integer The page number to retrieve. Use this parameter to navigate through the pagination results. The default value is 1. [optional] [default to 1]
limit Integer The number of items to return per page. This parameter controls the size of each page of results. The default value is 15. [optional] [default to 15]
q String Allows filtering of results based on your search criteria. The query should be in the format `field_name:value`. 1. Field Name: The field within the SMS history you want to filter by. You can use the following fields: - Status: The status of the SMS. Available values for status are: Queued, Completed, Scheduled, WaitApproval, Failed, Cancelled, CancelledAfterReview, Received, Sent. - To: The recipient of the SMS. - from: The sender of the SMS. - subaccount_id: The sub-account identifier. - message_id: The ID of your SMS. 2. Value: The text or keyword you're searching for within the specified field. If left empty after the colon, the filter will look for all templates with any value in the Field Name. For example, if you are searching for a SMS with the status of Scheduled, the final query would look like this: `q=status:Scheduled` <div class=&quot;info-box&quot;> <h4><i class=&quot;fas fa-info-circle&quot;></i> Note:</h4> <div> <p>Some characters have to be encoded. For example, if you are searching for SMS sent from the phone number +61437085284, your search query q would be:<br/></p> <ul> <li>q=from:%2B61437085284</li> </ul> <p>You can use the <a href=&quot;https://www.urlencoder.org/\" target=&quot;_blank&quot;>URL encoder</a> to encode the text. If a character is not an alphanumeric character (A-Z, a-z, 0-9), it is typically either reserved or unsafe and should be encoded.</p> </div> </div> [optional] [default to field_name]
orderBy String Specifies the field and order to sort the results by. The value is composed of the field name followed by a colon and the sort direction (asc for ascending or desc for descending). The default sort order is by date in ascending order. You can use the following fields: - date - username - from - to - status - body For example, if you want to order by the most recently sent SMS, you should sort by date in descending order. The query would look like this: `order_by=date:desc` [optional] [default to date:asc]
dateFrom Integer Start date to filter results. It should be in <a href=&quot;http://help.clicksend.com/what-is-a-unix-timestamp\" target=&quot;_blank&quot;>Unix format</a>. [optional]
dateTo Integer End date to filter results. It should be in <a href=&quot;http://help.clicksend.com/what-is-a-unix-timestamp\" target=&quot;_blank&quot;>Unix format</a>. [optional]

Return type

ExportSmsHistory

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

markInboundSmsAsRead

MarkInboundSmsAsRead markInboundSmsAsRead(contentType, markSmsReceiptAsReadRequest)

Mark Inbound SMS as Read

Use this endpoint to mark all <a href=&quot;https://help.clicksend.com/article/ik4hw5xu35-can-i-receive-inbound-sms-to-my-url\" target=&quot;_blank&quot;>inbound SMS</a> as read. Inbound SMS that has been marked as read won’t be shown in the View Inbound SMS endpoint. You can still use the View Specific Inbound SMS endpoint to view inbound SMS marked as read. In the request, you can optionally add a date_before parameter to only mark inbound SMS sent before that date as read.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    MarkSmsReceiptAsReadRequest markSmsReceiptAsReadRequest = new MarkSmsReceiptAsReadRequest(); // MarkSmsReceiptAsReadRequest | 
    try {
      MarkInboundSmsAsRead result = apiInstance.markInboundSmsAsRead(contentType, markSmsReceiptAsReadRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#markInboundSmsAsRead");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
markSmsReceiptAsReadRequest MarkSmsReceiptAsReadRequest [optional]

Return type

MarkInboundSmsAsRead

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

markSmsReceiptAsRead

MarkSmsReceiptAsRead markSmsReceiptAsRead(contentType, markSmsReceiptAsReadRequest)

Mark SMS Receipt As Read

Use this endpoint to mark all <a target=&quot;_blank&quot; href=&quot;https://help.clicksend.com/article/49eq1qdcui-how-do-i-receive-sms-delivery-receipts-delivery-status-updates\&quot;&gt;SMS delivery receipts</a> as read. Delivery receipts that have been marked as read won’t be shown in the View SMS Receipts endpoint. You can still use the View Specific SMS Receipt endpoint to view delivery receipts marked as read. In the request, you can optionally add a date_before parameter to only mark receipts sent before that date as read

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    MarkSmsReceiptAsReadRequest markSmsReceiptAsReadRequest = new MarkSmsReceiptAsReadRequest(); // MarkSmsReceiptAsReadRequest | 
    try {
      MarkSmsReceiptAsRead result = apiInstance.markSmsReceiptAsRead(contentType, markSmsReceiptAsReadRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#markSmsReceiptAsRead");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
markSmsReceiptAsReadRequest MarkSmsReceiptAsReadRequest [optional]

Return type

MarkSmsReceiptAsRead

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

markSpecificInboundSmsMessageAsRead

MarkSpecificInboundSmsMessageAsRead markSpecificInboundSmsMessageAsRead(messageId, contentType)

Mark Specific Inbound SMS Message As Read

Use this endpoint to mark a specific <a href=&quot;https://help.clicksend.com/article/ik4hw5xu35-can-i-receive-inbound-sms-to-my-url\" target=&quot;_blank&quot;>inbound SMS</a> as read. Unlike the View Inbound SMS endpoint, which marks all inbound SMS as read, this endpoint only marks one specified inbound SMS. Specify the SMS to be marked as read by providing its message_id.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String messageId = "messageId_example"; // String | The message_id of the inbound SMS to mark as read.  <div class=\"info-box\">   <h4><i class=\"fas fa-info-circle\"></i> Note:</h4>   <p>     When you receive an inbound message, you will get two parameters: <em>original_message_id</em> and <em>message_id</em>:   </p>   <ul>     <li><em>original_message_id</em>: This is the ID of the outbound message sent to the recipient</li>     <li><em>message_id</em>: This is the ID of the inbound message sent by the recipient.</li>   </ul> </div>
    String contentType = "application/json"; // String | 
    try {
      MarkSpecificInboundSmsMessageAsRead result = apiInstance.markSpecificInboundSmsMessageAsRead(messageId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#markSpecificInboundSmsMessageAsRead");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
messageId String The message_id of the inbound SMS to mark as read. <div class=&quot;info-box&quot;> <h4><i class=&quot;fas fa-info-circle&quot;></i> Note:</h4> <p> When you receive an inbound message, you will get two parameters: <em>original_message_id</em> and <em>message_id</em>: </p> <ul> <li><em>original_message_id</em>: This is the ID of the outbound message sent to the recipient</li> <li><em>message_id</em>: This is the ID of the inbound message sent by the recipient.</li> </ul> </div>
contentType String [optional]

Return type

MarkSpecificInboundSmsMessageAsRead

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

sendSms

SendSms sendSms(contentType, sendSmsRequest)

Send SMS

Use this endpoint to send messages to your recipients, either as phone numbers or contacts from your contact list. The sender of the message (<a href=&quot;https://help.clicksend.com/article/4kgj7krx00-what-is-a-sender-id-or-sender-number\" target=&quot;_blank&quot;><strong>Sender ID</strong></a>) can be a shared number, a dedicated number, alpha tag (business name), or your own number. You can send messages both locally and globally, subject to the country restrictions. The cost of sending messages varies based on the <a href=&quot;https://help.clicksend.com/article/h474eseq3a-how-many-characters-can-i-send-in-an-sms\" target=&quot;_blank&quot;>type</a> and length of the message.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    SendSmsRequest sendSmsRequest = new SendSmsRequest(); // SendSmsRequest | 
    try {
      SendSms result = apiInstance.sendSms(contentType, sendSmsRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#sendSms");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
sendSmsRequest SendSmsRequest [optional]

Return type

SendSms

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

updateSmsDeliveryReceiptRule

UpdateSmsDeliveryReceiptRule updateSmsDeliveryReceiptRule(receiptRuleId, contentType, createSmsDeliveryReceiptRuleRequest)

Update SMS Delivery Receipt Rule

Update sms delivery receipt automation Update sms delivery receipt automation ### Parameters | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | receipt_rule_id | path | integer(int32) | true | Receipt rule id | ### Properties | Name | Type | Required | Restrictions | Description | | --- | --- | --- | --- | --- | | rule_name | string | true | none | Rule Name. | | match_type | number | true | none | Match Type. 0=All reports. | | action | string | true | none | Action to be taken (AUTO_REPLY, EMAIL_USER, EMAIL_FIXED, URL, SMS, POLL, GROUP_SMS, MOVE_CONTACT, CREATE_CONTACT, CREATE_CONTACT_PLUS_EMAIL, CREATE_CONTACT_PLUS_NAME_EMAIL CREATE_CONTACT_PLUS_NAME, SMPP, NONE). | | action_address | string | true | none | Action address. | | enabled | number | true | none | Enabled: Disabled=0 or Enabled=1. | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String receiptRuleId = "receiptRuleId_example"; // String | 
    String contentType = "application/json"; // String | 
    CreateSmsDeliveryReceiptRuleRequest createSmsDeliveryReceiptRuleRequest = new CreateSmsDeliveryReceiptRuleRequest(); // CreateSmsDeliveryReceiptRuleRequest | 
    try {
      UpdateSmsDeliveryReceiptRule result = apiInstance.updateSmsDeliveryReceiptRule(receiptRuleId, contentType, createSmsDeliveryReceiptRuleRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#updateSmsDeliveryReceiptRule");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
receiptRuleId String
contentType String [optional]
createSmsDeliveryReceiptRuleRequest CreateSmsDeliveryReceiptRuleRequest [optional]

Return type

UpdateSmsDeliveryReceiptRule

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

updateSmsInboundAutomation

UpdateSmsInboundAutomation updateSmsInboundAutomation(inboundRuleId, contentType, updateSmsInboundAutomationRequest)

Update SMS Inbound Automation

Update inbound sms automation Update inbound sms automation ### Parameters | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | inbound_rule_id | path | integer(int32) | true | Inbound rule id | ### Properties | Name | Type | Required | Restrictions | Description | | --- | --- | --- | --- | --- | | dedicated_number | string | true | none | Dedicated Number. Can be '\*' to apply to all numbers. | | rule_name | string | true | none | Rule Name. | | message_search_type | number | true | none | Message Search Type: 0=Any message, 1=starts with, 2=contains, 3=does not contain. | | message_search_term | string | true | none | Message search term. | | action | string | true | none | Action to be taken (AUTO_REPLY, EMAIL_USER, EMAIL_FIXED, URL, SMS, POLL, GROUP_SMS, MOVE_CONTACT, CREATE_CONTACT, CREATE_CONTACT_PLUS_EMAIL, CREATE_CONTACT_PLUS_NAME_EMAIL CREATE_CONTACT_PLUS_NAME, SMPP, NONE). | | action_address | string | true | none | Action address. | | enabled | number | true | none | Enabled: Disabled=0 or Enabled=1. | | webhook_type | string | false | Required when action = URL only | Set as post, get, or json to change the format of the request sent. | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String inboundRuleId = "inboundRuleId_example"; // String | 
    String contentType = "application/json"; // String | 
    UpdateSmsInboundAutomationRequest updateSmsInboundAutomationRequest = new UpdateSmsInboundAutomationRequest(); // UpdateSmsInboundAutomationRequest | 
    try {
      UpdateSmsInboundAutomation result = apiInstance.updateSmsInboundAutomation(inboundRuleId, contentType, updateSmsInboundAutomationRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#updateSmsInboundAutomation");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
inboundRuleId String
contentType String [optional]
updateSmsInboundAutomationRequest UpdateSmsInboundAutomationRequest [optional]

Return type

UpdateSmsInboundAutomation

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

updateSmsTemplate

UpdateSmsTemplate updateSmsTemplate(templateId, contentType, createSmsTemplateRequest)

Update SMS Template

Use this endpoint to update a <a href=&quot;https://help.clicksend.com/article/9z9uloaz8y-sms-templates-for-different-industries\" target=&quot;_blank&quot;>SMS template</a>.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String templateId = "templateId_example"; // String | The ID of the template to update.
    String contentType = "application/json"; // String | 
    CreateSmsTemplateRequest createSmsTemplateRequest = new CreateSmsTemplateRequest(); // CreateSmsTemplateRequest | 
    try {
      UpdateSmsTemplate result = apiInstance.updateSmsTemplate(templateId, contentType, createSmsTemplateRequest);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#updateSmsTemplate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
templateId String The ID of the template to update.
contentType String [optional]
createSmsTemplateRequest CreateSmsTemplateRequest [optional]

Return type

UpdateSmsTemplate

Authorization

basicAuth

HTTP request headers

  • Content-Type: application/json
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewASpecificInboundSmsMessage

ViewASpecificInboundSmsMessage viewASpecificInboundSmsMessage(originalMessageId, contentType)

View a specific inbound SMS message

Use this endpoint to retrieve a specific inbound SMS, including those that have been marked as read. Inbound SMS are messages sent by your recipient to you. This endpoint enables you to retrieve those inbound SMS.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String originalMessageId = "originalMessageId_example"; // String | The _original_message_id_ of the inbound SMS to view. If the recipient replied with multiple messages, this endpoint returns the first inbound SMS received.  <div class=\"info-box\">   <h4><i class=\"fas fa-info-circle\"></i> Note:</h4>   <p>     When you receive an inbound message, you will get two parameters: <em>original_message_id</em> and <em>message_id</em>:   </p>   <ul>     <li><em>original_message_id</em>: This is the ID of the outbound message sent to the recipient</li>     <li><em>message_id</em>: This is the ID of the inbound message sent by the recipient.</li>   </ul> </div>
    String contentType = "application/json"; // String | 
    try {
      ViewASpecificInboundSmsMessage result = apiInstance.viewASpecificInboundSmsMessage(originalMessageId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewASpecificInboundSmsMessage");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
originalMessageId String The original_message_id of the inbound SMS to view. If the recipient replied with multiple messages, this endpoint returns the first inbound SMS received. <div class=&quot;info-box&quot;> <h4><i class=&quot;fas fa-info-circle&quot;></i> Note:</h4> <p> When you receive an inbound message, you will get two parameters: <em>original_message_id</em> and <em>message_id</em>: </p> <ul> <li><em>original_message_id</em>: This is the ID of the outbound message sent to the recipient</li> <li><em>message_id</em>: This is the ID of the inbound message sent by the recipient.</li> </ul> </div>
contentType String [optional]

Return type

ViewASpecificInboundSmsMessage

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewASpecificSmsTemplate

ViewASpecificSmsTemplate viewASpecificSmsTemplate(templateId, contentType)

View a Specific SMS Template

Use this endpoint to retrieve a <a href=&quot;https://help.clicksend.com/article/9z9uloaz8y-sms-templates-for-different-industries\" target=&quot;_blank&quot;>SMS template</a>. Specify which template to retrieve using the template ID.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String templateId = "templateId_example"; // String | The ID of the template to retrieve
    String contentType = "application/json"; // String | 
    try {
      ViewASpecificSmsTemplate result = apiInstance.viewASpecificSmsTemplate(templateId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewASpecificSmsTemplate");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
templateId String The ID of the template to retrieve
contentType String [optional]

Return type

ViewASpecificSmsTemplate

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewInboundSms

ViewInboundSms viewInboundSms(contentType, page, limit)

View Inbound SMS

Use this endpoint to retrieve <a href=&quot;https://help.clicksend.com/article/49eq1qdcui-how-do-i-receive-sms-delivery-receipts-delivery-status-updates\" target=&quot;_blank&quot;>SMS delivery receipts</a> sent by your recipient. To be able to view receipts, add a <a href=&quot;https://help.clicksend.com/article/ut4ttdrrai-incoming-reply-sms-options\&quot;&gt;inbound rule</a> with the Action set to POLL in the Dashboard, or use the Create SMS Inbound Automation endpoint. Control pagination with the page and limit query parameters to specify the page of results and the number of items returned. <div class=&quot;info-box&quot;> <h4><i class=&quot;fas fa-info-circle&quot;></i> Note:</h4> <p>If you have multiple inbound rules set to <strong>POLL</strong>, you will receive the inbound message multiple times.</p> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    Integer page = 1; // Integer | The page number to retrieve. Use this parameter to navigate through the [pagination](/#pagination) results. The default value is 1.
    Integer limit = 15; // Integer | The number of items to return per page. This parameter controls the size of each page of results. The default value is 15.
    try {
      ViewInboundSms result = apiInstance.viewInboundSms(contentType, page, limit);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewInboundSms");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
page Integer The page number to retrieve. Use this parameter to navigate through the pagination results. The default value is 1. [optional] [default to 1]
limit Integer The number of items to return per page. This parameter controls the size of each page of results. The default value is 15. [optional] [default to 15]

Return type

ViewInboundSms

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewSmsDeliveryReceiptRule

ViewSmsDeliveryReceiptRule viewSmsDeliveryReceiptRule(receiptRuleId, contentType)

View SMS Delivery Receipt Rule

Get specific sms delivery receipt automation Get specific sms delivery receipt automation ### Parameters | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | receipt_rule_id | path | integer(int32) | true | Receipt rule id | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String receiptRuleId = "receiptRuleId_example"; // String | 
    String contentType = "application/json"; // String | 
    try {
      ViewSmsDeliveryReceiptRule result = apiInstance.viewSmsDeliveryReceiptRule(receiptRuleId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewSmsDeliveryReceiptRule");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
receiptRuleId String
contentType String [optional]

Return type

ViewSmsDeliveryReceiptRule

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewSmsDeliveryReceiptRules

ViewSmsDeliveryReceiptRules viewSmsDeliveryReceiptRules(contentType)

View SMS Delivery Receipt Rules

Get all sms delivery receipt automations Get all sms delivery receipt automations ### Parameters | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | page | query | integer(int32) | false | Page number | | limit | query | integer(int32) | false | Number of records per page | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    try {
      ViewSmsDeliveryReceiptRules result = apiInstance.viewSmsDeliveryReceiptRules(contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewSmsDeliveryReceiptRules");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]

Return type

ViewSmsDeliveryReceiptRules

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewSmsHistory

ViewSmsHistory viewSmsHistory(contentType, page, limit, q, orderBy, dateFrom, dateTo)

View SMS History

Use this endpoint to view previously sent SMS. You can filter the SMS history result using the query parameters.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    Integer page = 1; // Integer | The page number to retrieve. Use this parameter to navigate through the [pagination](/#pagination) results. The default value is 1.
    Integer limit = 15; // Integer | The number of items to return per page. This parameter controls the size of each page of results. The default value is 15.
    String q = "field_name"; // String | Allows filtering of results based on your search criteria. The query should be in the format `field_name:value`.  1. **Field Name**: The field within the SMS history you want to filter by. You can use the following fields:          - _Status_: The status of the SMS. Available values for status are: Queued, Completed, Scheduled, WaitApproval, Failed, Cancelled, CancelledAfterReview, Received, Sent.              - _To_: The recipient of the SMS.              - _from_: The sender of the SMS.              - _subaccount_id_: The sub-account identifier.              - _message_id_: The ID of your SMS.          2. **Value**: The text or keyword you're searching for within the specified field. If left empty after the colon, the filter will look for all templates with any value in the **Field Name**.             For example, if you are searching for a SMS with the status of Scheduled, the final query would look like this:    `q=status:Scheduled`  <div class=\"info-box\">   <h4><i class=\"fas fa-info-circle\"></i> Note:</h4>   <div>    <p>Some characters have to be encoded. For example, if you are searching for SMS sent from the phone number +61437085284, your search query q would be:<br/></p>     <ul>       <li>q=from:%2B61437085284</li>     </ul>     <p>You can use the <a href=\"https://www.urlencoder.org/\" target=\"_blank\">URL encoder</a> to encode the text. If a character is not an alphanumeric character (A-Z, a-z, 0-9), it is typically either reserved or unsafe and should be encoded.</p>   </div> </div>
    String orderBy = "date:asc"; // String | Specifies the field and order to sort the results by. The value is composed of the field name followed by a colon and the sort direction (_asc_ for ascending or _desc_ for descending).  The default sort order is by _date_ in ascending order. You can use the following fields:    - _date_   - _username_   - _from_    - _to_   - _status_   - _body_  For example, if you want to order by the most recently sent SMS, you should sort by date in descending order. The query would look like this:    `order_by=date:desc`
    Integer dateFrom = 56; // Integer | Start date to filter results. It should be in <a href=\"http://help.clicksend.com/what-is-a-unix-timestamp\" target=\"_blank\">Unix format</a>.
    Integer dateTo = 56; // Integer | End date to filter results. It should be in <a href=\"http://help.clicksend.com/what-is-a-unix-timestamp\" target=\"_blank\">Unix format</a>.
    try {
      ViewSmsHistory result = apiInstance.viewSmsHistory(contentType, page, limit, q, orderBy, dateFrom, dateTo);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewSmsHistory");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
page Integer The page number to retrieve. Use this parameter to navigate through the pagination results. The default value is 1. [optional] [default to 1]
limit Integer The number of items to return per page. This parameter controls the size of each page of results. The default value is 15. [optional] [default to 15]
q String Allows filtering of results based on your search criteria. The query should be in the format `field_name:value`. 1. Field Name: The field within the SMS history you want to filter by. You can use the following fields: - Status: The status of the SMS. Available values for status are: Queued, Completed, Scheduled, WaitApproval, Failed, Cancelled, CancelledAfterReview, Received, Sent. - To: The recipient of the SMS. - from: The sender of the SMS. - subaccount_id: The sub-account identifier. - message_id: The ID of your SMS. 2. Value: The text or keyword you're searching for within the specified field. If left empty after the colon, the filter will look for all templates with any value in the Field Name. For example, if you are searching for a SMS with the status of Scheduled, the final query would look like this: `q=status:Scheduled` <div class=&quot;info-box&quot;> <h4><i class=&quot;fas fa-info-circle&quot;></i> Note:</h4> <div> <p>Some characters have to be encoded. For example, if you are searching for SMS sent from the phone number +61437085284, your search query q would be:<br/></p> <ul> <li>q=from:%2B61437085284</li> </ul> <p>You can use the <a href=&quot;https://www.urlencoder.org/\" target=&quot;_blank&quot;>URL encoder</a> to encode the text. If a character is not an alphanumeric character (A-Z, a-z, 0-9), it is typically either reserved or unsafe and should be encoded.</p> </div> </div> [optional] [default to field_name]
orderBy String Specifies the field and order to sort the results by. The value is composed of the field name followed by a colon and the sort direction (asc for ascending or desc for descending). The default sort order is by date in ascending order. You can use the following fields: - date - username - from - to - status - body For example, if you want to order by the most recently sent SMS, you should sort by date in descending order. The query would look like this: `order_by=date:desc` [optional] [default to date:asc]
dateFrom Integer Start date to filter results. It should be in <a href=&quot;http://help.clicksend.com/what-is-a-unix-timestamp\" target=&quot;_blank&quot;>Unix format</a>. [optional]
dateTo Integer End date to filter results. It should be in <a href=&quot;http://help.clicksend.com/what-is-a-unix-timestamp\" target=&quot;_blank&quot;>Unix format</a>. [optional]

Return type

ViewSmsHistory

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewSmsInboundAutomation

ViewSmsInboundAutomation viewSmsInboundAutomation(inboundRuleId, contentType)

View SMS Inbound Automation

Get specific inbound sms automation Get specific inbound sms automation ### Parameters | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | inbound_rule_id | path | integer(int32) | true | Inbound rule id | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String inboundRuleId = "inboundRuleId_example"; // String | 
    String contentType = "application/json"; // String | 
    try {
      ViewSmsInboundAutomation result = apiInstance.viewSmsInboundAutomation(inboundRuleId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewSmsInboundAutomation");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
inboundRuleId String
contentType String [optional]

Return type

ViewSmsInboundAutomation

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewSmsInboundAutomations

ViewSmsInboundAutomations viewSmsInboundAutomations(contentType)

View SMS Inbound Automations

Get all inbound sms automations Get all inbound sms automations ### Parameters | Parameter | In | Type | Required | Description | | --- | --- | --- | --- | --- | | page | query | integer(int32) | false | Page number | | limit | query | integer(int32) | false | Number of records per page | Refer to Status Codes for definitions of HTTP status code responses. <div style=&quot;background-color: #FF6A4B; padding: 10px; border-radius: 8px;&quot;> <span style=&quot;color: white;&quot;>This endpoint requires authentication,</span> <a href=&quot;/docs/#authentication&quot; style=&quot;color: white; text-decoration: underline;&quot;>more info...</a> </div>

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    try {
      ViewSmsInboundAutomations result = apiInstance.viewSmsInboundAutomations(contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewSmsInboundAutomations");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]

Return type

ViewSmsInboundAutomations

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewSmsReceipts

ViewSmsReceipts viewSmsReceipts(contentType, page, limit)

View SMS Receipts

Use this endpoint to retrieve <a href=&quot;https://help.clicksend.com/article/49eq1qdcui-how-do-i-receive-sms-delivery-receipts-delivery-status-updates\" target=&quot;_blank&quot;>SMS delivery receipts</a> sent by your recipient. To be able to view receipts, add a <a href=&quot;https://help.clicksend.com/en/articles/42317-delivery-notifications-reports\" target=&quot;_blank&quot;>delivery report</a> rule with the Action set to POLL in the Dashboard, or use the Create SMS Delivery Receipt Rule endpoint. Control pagination with the page and limit query parameters to specify the page of results and the number of items returned.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    Integer page = 1; // Integer | The page number to retrieve. Use this parameter to navigate through the [pagination](/#pagination) results. The default value is 1.
    Integer limit = 15; // Integer | The number of items to return per page. This parameter controls the size of each page of results. The default value is 15.
    try {
      ViewSmsReceipts result = apiInstance.viewSmsReceipts(contentType, page, limit);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewSmsReceipts");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
page Integer The page number to retrieve. Use this parameter to navigate through the pagination results. The default value is 1. [optional] [default to 1]
limit Integer The number of items to return per page. This parameter controls the size of each page of results. The default value is 15. [optional] [default to 15]

Return type

ViewSmsReceipts

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewSmsTemplates

ViewSmsTemplates viewSmsTemplates(contentType, page, limit, q, orderBy)

View SMS Templates

Use this endpoint to retrieve <a href=&quot;https://help.clicksend.com/article/9z9uloaz8y-sms-templates-for-different-industries\" target=&quot;_blank&quot;>SMS templates</a>. You can filter the SMS templates result using the query parameters.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String contentType = "application/json"; // String | 
    Integer page = 1; // Integer | The page number to retrieve. Use this parameter to navigate through the [pagination](/#pagination) results. The default value is 1.
    Integer limit = 15; // Integer | The number of items to return per page. This parameter controls the size of each page of results. The default value is 15.
    String q = "field_name"; // String | Allows filtering of results based on your search criteria. The query should be in the format `field_name:value`.  1. **Field Name**: The field within the SMS history you want to filter by. You can use the following fields:    - _template_id_ : The ID of the template   - _template_name_ : The name of the template   - _body_ : The body content of the template.          2. **Value**: The text or keyword you're searching for within the specified field. If left empty after the colon, the filter will look for all templates with any value in the **Field Name**.      For example, if you are searching for the template with the name of _sample_name_, the final query would look like this:     `q=template_name:sample_name`  <div class=\"info-box\">   <h4><i class=\"fas fa-info-circle\"></i> Note:</h4>   <div>    <p>Some characters have to be encoded. For example, if you are searching for SMS sent from the phone number +61437085284, your search query q would be:<br/></p>     <ul>       <li>q=from:%2B61437085284</li>     </ul>     <p>You can use the <a href=\"https://www.urlencoder.org/\" target=\"_blank\">URL encoder</a> to encode the text. If a character is not an alphanumeric character (A-Z, a-z, 0-9), it is typically either reserved or unsafe and should be encoded.</p>   </div> </div>
    String orderBy = "template_id:asc"; // String | Specifies the field and order to sort the results by.  The value is composed of the field name followed by a colon and the sort direction (_asc_ for ascending or _desc_ for descending).  The default sort order is by _template_id_ in ascending order. You can use the following fields:      - _template_id_ : The ID of the Template - _template_name_ : The name of the Template - _body_ : The body content of the Template  For example, if you want to order by the _template_id_ in descending order, the query would look like this:    `order_by=template_id:desc`
    try {
      ViewSmsTemplates result = apiInstance.viewSmsTemplates(contentType, page, limit, q, orderBy);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewSmsTemplates");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
contentType String [optional]
page Integer The page number to retrieve. Use this parameter to navigate through the pagination results. The default value is 1. [optional] [default to 1]
limit Integer The number of items to return per page. This parameter controls the size of each page of results. The default value is 15. [optional] [default to 15]
q String Allows filtering of results based on your search criteria. The query should be in the format `field_name:value`. 1. Field Name: The field within the SMS history you want to filter by. You can use the following fields: - template_id : The ID of the template - template_name : The name of the template - body : The body content of the template. 2. Value: The text or keyword you're searching for within the specified field. If left empty after the colon, the filter will look for all templates with any value in the Field Name. For example, if you are searching for the template with the name of sample_name, the final query would look like this: `q=template_name:sample_name` <div class=&quot;info-box&quot;> <h4><i class=&quot;fas fa-info-circle&quot;></i> Note:</h4> <div> <p>Some characters have to be encoded. For example, if you are searching for SMS sent from the phone number +61437085284, your search query q would be:<br/></p> <ul> <li>q=from:%2B61437085284</li> </ul> <p>You can use the <a href=&quot;https://www.urlencoder.org/\" target=&quot;_blank&quot;>URL encoder</a> to encode the text. If a character is not an alphanumeric character (A-Z, a-z, 0-9), it is typically either reserved or unsafe and should be encoded.</p> </div> </div> [optional] [default to field_name]
orderBy String Specifies the field and order to sort the results by. The value is composed of the field name followed by a colon and the sort direction (asc for ascending or desc for descending). The default sort order is by template_id in ascending order. You can use the following fields: - template_id : The ID of the Template - template_name : The name of the Template - body : The body content of the Template For example, if you want to order by the template_id in descending order, the query would look like this: `order_by=template_id:desc` [optional] [default to template_id:asc]

Return type

ViewSmsTemplates

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -

viewSpecificSmsReceipt

ViewSpecificSmsReceipt viewSpecificSmsReceipt(messageId, contentType)

View Specific SMS Receipt

Use this endpoint to retrieve a specific <a href=&quot;https://help.clicksend.com/article/49eq1qdcui-how-do-i-receive-sms-delivery-receipts-delivery-status-updates\" target=&quot;_blank&quot;>SMS delivery receipt</a>, including those that have been marked as read. When you send an SMS, a delivery receipt is generated and can be received. This endpoint enables you to retrieve those receipts.

Example

// Import classes:
import ClickSend.ApiClient;
import ClickSend.ApiException;
import ClickSend.Configuration;
import ClickSend.auth.*;
import ClickSend.models.*;
import ClickSend.Api.SmsApi;

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

    SmsApi apiInstance = new SmsApi(defaultClient);
    String messageId = "messageId_example"; // String | The _message_id_ of the SMS delivery receipt to retrieve
    String contentType = "application/json"; // String | 
    try {
      ViewSpecificSmsReceipt result = apiInstance.viewSpecificSmsReceipt(messageId, contentType);
      System.out.println(result);
    } catch (ApiException e) {
      System.err.println("Exception when calling SmsApi#viewSpecificSmsReceipt");
      System.err.println("Status code: " + e.getCode());
      System.err.println("Reason: " + e.getResponseBody());
      System.err.println("Response headers: " + e.getResponseHeaders());
      e.printStackTrace();
    }
  }
}

Parameters

Name Type Description Notes
messageId String The message_id of the SMS delivery receipt to retrieve
contentType String [optional]

Return type

ViewSpecificSmsReceipt

Authorization

basicAuth

HTTP request headers

  • Content-Type: Not defined
  • Accept: application/json

HTTP response details

Status code Description Response headers
200 Successful response -