### Install ClickSend Python SDK via Setuptools Source: https://github.com/clicksend/clicksend-python/blob/master/README.md Installs the ClickSend Python SDK using Setuptools. This method involves downloading the source code and running the setup script. ```sh python setup.py install --user (or `sudo python setup.py install` to install the package for all users) ``` -------------------------------- ### Python Example: Send Post Letter Source: https://github.com/clicksend/clicksend-python/blob/master/docs/PostLetterApi.md Example Python code demonstrating how to send a post letter using the Clicksend client. It covers authentication setup, API instantiation, and making the API call with error handling. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.PostLetterApi(clicksend_client.ApiClient(configuration)) post_letter = clicksend_client.PostLetter() # PostLetter | PostLetter model try: # Send post letter api_response = api_instance.post_letters_send_post(post_letter) pprint(api_response) except ApiException as e: print("Exception when calling PostLetterApi->post_letters_send_post: %s\n" % e) ``` -------------------------------- ### Install ClickSend Python SDK via pip Source: https://github.com/clicksend/clicksend-python/blob/master/README.md Installs the ClickSend Python SDK directly from a GitHub repository using pip. This is a common method for installing packages not yet published on PyPI. ```sh pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git (you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`) ``` -------------------------------- ### Python Example: Transfer Credit Source: https://github.com/clicksend/clicksend-python/blob/master/docs/TransferCreditApi.md Demonstrates how to use the TransferCreditApi to transfer credit using the ClickSend Python SDK. This example shows configuration, API instantiation, and making the transfer request. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.TransferCreditApi(clicksend_client.ApiClient(configuration)) reseller_account_transfer_credit = clicksend_client.ResellerAccountTransferCredit() # ResellerAccountTransferCredit | ResellerAccountTransferCredit model try: # Transfer Credit api_response = api_instance.reseller_transfer_credit_put(reseller_account_transfer_credit) pprint(api_response) except ApiException as e: print("Exception when calling TransferCreditApi->reseller_transfer_credit_put: %s\n" % e) ``` -------------------------------- ### Python Detect Address POST Example Source: https://github.com/clicksend/clicksend-python/blob/master/docs/DetectAddressApi.md Example of how to use the DetectAddressApi in Python to detect an address from an uploaded file. It includes configuration, API instantiation, and error handling. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.DetectAddressApi(clicksend_client.ApiClient(configuration)) upload_file = clicksend_client.UploadFile() # UploadFile | Your file to be uploaded try: # Detects address in uploaded file. api_response = api_instance.detect_address_post(upload_file) pprint(api_response) except ApiException as e: print("Exception when calling DetectAddressApi->detect_address_post: %s\n" % e) ``` -------------------------------- ### MMS API Documentation Source: https://github.com/clicksend/clicksend-python/blob/master/docs/MMSApi.md Provides comprehensive details on all MMS-related API endpoints, including their HTTP methods, parameters, return types, and usage examples. ```APIDOC MMS API Endpoints: 1. **mms_history_export_get** - **HTTP Request**: GET /mms/history/export - **Description**: Export all MMS history. - **Parameters**: filename (str): Filename to download history as. - **Return Type**: str - **Example**: See Python example in the full documentation. 2. **mms_history_get** - **HTTP Request**: GET /mms/history - **Description**: Get all MMS history. - **Parameters**: - q (str, optional): Custom query. Example: from:{number},status_code:201. - date_from (int, optional): Start date. - date_to (int, optional): End date. - page (int, optional): Page number (default: 1). - limit (int, optional): Number of records per page (default: 10). - **Return Type**: str - **Example**: See Python example in the full documentation. 3. **mms_price_post** - **HTTP Request**: POST /mms/price - **Description**: Get Price for MMS sent. - **Parameters**: mms_messages (object): MMS message details. - **Return Type**: str - **Example**: See Python example in the full documentation. 4. **mms_receipts_get** - **HTTP Request**: GET /mms/receipts - **Description**: Get all delivery receipts. - **Parameters**: None specified in the provided snippet. - **Return Type**: str - **Example**: Not provided in the snippet. 5. **mms_receipts_read_put** - **HTTP Request**: PUT /mms/receipts-read - **Description**: Mark delivery receipts as read. - **Parameters**: None specified in the provided snippet. - **Return Type**: str - **Example**: Not provided in the snippet. 6. **mms_send_post** - **HTTP Request**: POST /mms/send - **Description**: Send MMS. - **Parameters**: None specified in the provided snippet. - **Return Type**: str - **Example**: Not provided in the snippet. **Authentication**: BasicAuth is used for all requests. ``` -------------------------------- ### Create New Contact List Source: https://github.com/clicksend/clicksend-python/blob/master/docs/ContactListApi.md Provides an example of how to create a new contact list using the ClickSend Python SDK. It requires instantiating the ContactList model and passing it to the API call. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.ContactListApi(clicksend_client.ApiClient(configuration)) contact_list = clicksend_client.ContactList() # ContactList | Contact list model try: # Create new contact list api_response = api_instance.lists_post(contact_list) pprint(api_response) except ApiException as e: print("Exception when calling ContactListApi->lists_post: %s\n" % e) ``` -------------------------------- ### Get List of Post Return Addresses (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/PostReturnAddressApi.md Demonstrates how to retrieve a list of post return addresses using the Clicksend Python SDK. It shows how to configure authentication, create an API client, and call the GET method, with options for pagination. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.PostReturnAddressApi(clicksend_client.ApiClient(configuration)) page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Number of records per page (optional) (default to 10) try: # Get list of post return addresses api_response = api_instance.post_return_addresses_get(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling PostReturnAddressApi->post_return_addresses_get: %s\n" % e) ``` -------------------------------- ### Python Example: Fetching ClickSend Country Codes Source: https://github.com/clicksend/clicksend-python/blob/master/docs/CountriesApi.md Demonstrates how to use the ClickSend Python client to fetch all country codes. It includes error handling for API exceptions. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # create an instance of the API class api_instance = clicksend_client.CountriesApi() try: # Get all country codes api_response = api_instance.countries_get() pprint(api_response) except ApiException as e: print("Exception when calling CountriesApi->countries_get: %s\n" % e) ``` -------------------------------- ### Get Specific Post Return Address (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/PostReturnAddressApi.md Shows how to retrieve details for a specific post return address using the ClickSend Python SDK. This example covers setting up authentication and making the GET request. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.PostReturnAddressApi(clicksend_client.ApiClient(configuration)) return_address_id = 56 # int | Return address ID try: # Get specific post return address api_response = api_instance.post_return_addresses_by_return_address_id_get(return_address_id) pprint(api_response) except ApiException as e: print("Exception when calling PostReturnAddressApi->post_return_addresses_by_return_address_id_get: %s\n" % e) ``` -------------------------------- ### Import and Use ClickSend SDK Source: https://github.com/clicksend/clicksend-python/blob/master/README.md Demonstrates how to import the ClickSend client library and retrieve account information using basic authentication. It includes error handling for API exceptions. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.AccountApi(clicksend_client.ApiClient(configuration)) try: # Get account information api_response = api_instance.account_get() pprint(api_response) except ApiException as e: print("Exception when calling AccountApi->account_get: %s\n" % e) ``` -------------------------------- ### Python SDK Example: Get Email to SMS Stripped String Rule Source: https://github.com/clicksend/clicksend-python/blob/master/docs/EmailToSmsApi.md Shows how to retrieve an email to SMS stripped string rule using the ClickSend Python SDK. This example covers setting up authentication and making the API call. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.EmailToSmsApi(clicksend_client.ApiClient(configuration)) rule_id = 56 # int | Your rule id try: # Get email to sms stripped string rule api_response = api_instance.sms_email_sms_stripped_string_get(rule_id) pprint(api_response) except ApiException as e: print("Exception when calling EmailToSmsApi->sms_email_sms_stripped_string_get: %s\n" % e) ``` -------------------------------- ### Create Post Return Address (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/PostReturnAddressApi.md Provides an example of creating a new post return address using the Clicksend Python SDK. This includes setting up authentication, initializing the API client, and making the POST request with the address details. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.PostReturnAddressApi(clicksend_client.ApiClient(configuration)) return_address = clicksend_client.Address() # Address | Address model try: # Create post return address api_response = api_instance.post_return_addresses_post(return_address) pprint(api_response) except ApiException as e: print("Exception when calling PostReturnAddressApi->post_return_addresses_post: %s\n" % e) ``` -------------------------------- ### Get SMS Templates Source: https://github.com/clicksend/clicksend-python/blob/master/docs/SMSApi.md Retrieves a list of all SMS templates. Supports pagination with optional page number and limit parameters. Includes example usage and error handling. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.SMSApi(clicksend_client.ApiClient(configuration)) page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Number of records per page (optional) (default to 10) try: # Get lists of all sms templates api_response = api_instance.sms_templates_get(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling SMSApi->sms_templates_get: %s\n" % e) ``` -------------------------------- ### Verify New Account Source: https://github.com/clicksend/clicksend-python/blob/master/docs/AccountApi.md This Python code snippet shows how to verify a new account using an activation token with the Clicksend client. It sets up authentication, instantiates the API client, and calls the `account_verify_verify_by_activation_token_put` method with the activation token. It also includes basic error handling. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.AccountApi(clicksend_client.ApiClient(configuration)) activation_token = 56 # int | try: # Verify new account api_response = api_instance.account_verify_verify_by_activation_token_put(activation_token) pprint(api_response) except ApiException as e: print("Exception when calling AccountApi->account_verify_verify_by_activation_token_put: %s\n" % e) ``` -------------------------------- ### Get Specific Email Delivery Receipt Automation (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/EmailDeliveryReceiptRulesApi.md Example of how to retrieve a specific email delivery receipt automation rule using the Clicksend Python client. Authentication and the receipt rule ID are necessary inputs. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.EmailDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration)) receipt_rule_id = 56 try: api_response = api_instance.email_delivery_receipt_automation_get(receipt_rule_id) pprint(api_response) except ApiException as e: print("Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automation_get: %s\n" % e) ``` -------------------------------- ### Get All Email Delivery Receipt Automations Source: https://github.com/clicksend/clicksend-python/blob/master/docs/EmailDeliveryReceiptRulesApi.md Retrieves a list of all email delivery receipt automations. Supports filtering with a query string and pagination using page and limit parameters. Includes example usage and error handling. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.EmailDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration)) q = 'q_example' # str | Your keyword or query. (optional) page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Number of records per page (optional) (default to 10) try: # Get all email delivery receipt automations api_response = api_instance.email_delivery_receipt_automations_get(q=q, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling EmailDeliveryReceiptRulesApi->email_delivery_receipt_automations_get: %s\n" % e) ``` -------------------------------- ### Project Navigation Links Source: https://github.com/clicksend/clicksend-python/blob/master/docs/Url.md Provides navigation links to different sections of the project documentation, including models, API endpoints, and the main README file. ```APIDOC [[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md) ``` -------------------------------- ### Purchase a Package using Clicksend Python SDK Source: https://github.com/clicksend/clicksend-python/blob/master/docs/AccountRechargeApi.md This Python code snippet demonstrates how to purchase a package using the Clicksend client library. It configures authentication, creates an API client instance, and calls the `recharge_purchase_by_package_id_put` method with a package ID. Error handling for API exceptions is included. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.AccountRechargeApi(clicksend_client.ApiClient(configuration)) package_id = 56 # int | ID of package to purchase try: # Purchase a package api_response = api_instance.recharge_purchase_by_package_id_put(package_id) pprint(api_response) except ApiException as e: print("Exception when calling AccountRechargeApi->recharge_purchase_by_package_id_put: %s\n" % e) ``` -------------------------------- ### Get All SMS Delivery Receipt Automations Source: https://github.com/clicksend/clicksend-python/blob/master/docs/SMSDeliveryReceiptRulesApi.md Retrieves a list of all SMS delivery receipt automations. Supports filtering by a query string and pagination with page number and limit parameters. Includes example usage and error handling. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.SMSDeliveryReceiptRulesApi(clicksend_client.ApiClient(configuration)) q = 'q_example' # str | Your keyword or query. (optional) page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Number of records per page (optional) (default to 10) try: # Get all sms delivery receipt automations api_response = api_instance.sms_delivery_receipt_automations_get(q=q, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling SMSDeliveryReceiptRulesApi->sms_delivery_receipt_automations_get: %s\n" % e) ``` -------------------------------- ### Get All Inbound SMS Automations (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/InboundSMSRulesApi.md This snippet shows how to retrieve a list of all inbound SMS automations using the ClickSend Python client. It covers authentication setup, API client instantiation, and optional query parameters for filtering and pagination. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.InboundSMSRulesApi(clicksend_client.ApiClient(configuration)) q = 'q_example' # str | Your keyword or query. (optional) page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Number of records per page (optional) (default to 10) try: # Get all inbound sms automations api_response = api_instance.sms_inbound_automations_get(q=q, page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling InboundSMSRulesApi->sms_inbound_automations_get: %s\n" % e) ``` -------------------------------- ### Clicksend SMS Campaign API Documentation Source: https://github.com/clicksend/clicksend-python/blob/master/docs/SmsCampaignApi.md Provides comprehensive documentation for the SmsCampaignApi, including details on HTTP methods, endpoints, parameters, return types, and usage examples for managing SMS campaigns. ```APIDOC SmsCampaignApi: All URIs are relative to *https://rest.clicksend.com/v3* sms_campaign_by_sms_campaign_id_get(sms_campaign_id): Method: GET Endpoint: /sms-campaigns/{sms_campaign_id} Description: Get specific sms campaign Parameters: sms_campaign_id (int): ID of SMS campaign to retrieve Return Type: str Example: ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.SmsCampaignApi(clicksend_client.ApiClient(configuration)) sms_campaign_id = 56 try: api_response = api_instance.sms_campaign_by_sms_campaign_id_get(sms_campaign_id) pprint(api_response) except ApiException as e: print("Exception when calling SmsCampaignApi->sms_campaign_by_sms_campaign_id_get: %s\n" % e) ``` sms_campaigns_by_sms_campaign_id_put(sms_campaign_id, campaign): Method: PUT Endpoint: /sms-campaigns/{sms_campaign_id} Description: Update sms campaign Parameters: sms_campaign_id (int): ID of SMS campaign to update campaign (SmsCampaign): SmsCampaign model Return Type: str Example: ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.SmsCampaignApi(clicksend_client.ApiClient(configuration)) sms_campaign_id = 56 campaign = clicksend_client.SmsCampaign() try: api_response = api_instance.sms_campaigns_by_sms_campaign_id_put(sms_campaign_id, campaign) pprint(api_response) except ApiException as e: print("Exception when calling SmsCampaignApi->sms_campaigns_by_sms_campaign_id_put: %s\n" % e) ``` sms_campaigns_cancel_by_sms_campaign_id_put(sms_campaign_id): Method: PUT Endpoint: /sms-campaigns/{sms_campaign_id}/cancel Description: Cancel sms campaign Parameters: sms_campaign_id (int): ID of SMS campaign to cancel Return Type: str Example: ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.SmsCampaignApi(clicksend_client.ApiClient(configuration)) sms_campaign_id = 56 try: api_response = api_instance.sms_campaigns_cancel_by_sms_campaign_id_put(sms_campaign_id) pprint(api_response) except ApiException as e: print("Exception when calling SmsCampaignApi->sms_campaigns_cancel_by_sms_campaign_id_put: %s\n" % e) ``` sms_campaigns_get(): Method: GET Endpoint: /sms-campaigns Description: Get list of sms campaigns Return Type: str sms_campaigns_price_post(): Method: POST Endpoint: /sms-campaigns/price Description: Calculate price for sms campaign Return Type: str sms_campaigns_send_post(): Method: POST Endpoint: /sms-campaigns/send Description: Create sms campaign Return Type: str Authorization: BasicAuth HTTP request headers: - Content-Type: application/json - Accept: application/json ``` -------------------------------- ### Email Marketing API - Python Source: https://github.com/clicksend/clicksend-python/blob/master/docs/EmailMarketingApi.md Provides documentation for the Clicksend Email Marketing API, detailing methods for managing email campaigns and addresses. Includes API endpoint descriptions, parameters, return types, authorization, and HTTP headers. ```APIDOC EmailMarketingApi: allowed_email_address_post(email_address=None) Creates an allowed email address. Parameters: email_address (EmailAddress): Email address details. [optional] Returns: str Authorization: BasicAuth HTTP request headers: - Content-Type: application/json - Accept: application/json cancel_email_campaign_put(email_campaign_id) Cancel email campaign. Parameters: email_campaign_id (int): Allowed email campaign id. Returns: str Authorization: BasicAuth HTTP request headers: - Content-Type: application/json - Accept: application/json email_campaign_get(email_campaign_id) Get specific email campaign. Parameters: email_campaign_id (int): Allowed email campaign id. Returns: str Authorization: BasicAuth HTTP request headers: - Content-Type: application/json - Accept: application/json email_campaign_history_export_get(email_campaign_id, date_from=None, date_to=None) Export specific email campaign history. Parameters: email_campaign_id (int): Allowed email campaign id. date_from (str): Start date for history export. [optional] date_to (str): End date for history export. [optional] Returns: str Authorization: BasicAuth HTTP request headers: - Content-Type: application/json - Accept: application/json ``` -------------------------------- ### Get MMS Receipts (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/MMSApi.md Retrieves all MMS delivery receipts. Supports pagination with page number and limit parameters. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.MMSApi(clicksend_client.ApiClient(configuration)) page = 1 limit = 10 try: api_response = api_instance.mms_receipts_get(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling MMSApi->mms_receipts_get: %s\n" % e) ``` -------------------------------- ### Create Inbound SMS with Clicksend Python SDK Source: https://github.com/clicksend/clicksend-python/blob/master/docs/SMSApi.md Demonstrates how to create an inbound SMS record using the Clicksend Python SDK. It includes configuration for authentication, instantiation of the SMS API client, and making the API call to create the inbound SMS. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.SMSApi(clicksend_client.ApiClient(configuration)) url = clicksend_client.Url() # Url | Url model try: # Create inbound sms api_response = api_instance.sms_inbound_post(url) pprint(api_response) except ApiException as e: print("Exception when calling SMSApi->sms_inbound_post: %s\n" % e) ``` -------------------------------- ### Get MMS Price (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/MMSApi.md Checks the price for sending MMS messages. Requires ClickSend client library and basic authentication. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.MMSApi(clicksend_client.ApiClient(configuration)) # mms_messages is a required parameter for this method, but not provided in the snippet. # Example: mms_messages = clicksend_client.MmsMessage(to='+11234567890', body='Your message', from_='YourSenderId') try: # Get Price for MMS sent # api_response = api_instance.mms_price_post(mms_messages) # pprint(api_response) pass # Placeholder as mms_messages is not defined in the input except ApiException as e: print("Exception when calling MMSApi->mms_price_post: %s\n" % e) ``` -------------------------------- ### Reseller Account API Documentation Source: https://github.com/clicksend/clicksend-python/blob/master/docs/ResellerAccountApi.md Provides details for interacting with the Reseller Account API endpoints. Includes methods for creating and retrieving reseller accounts, along with their parameters, return types, and authorization. ```APIDOC reseller_accounts_get(page=None, limit=None) Get list of reseller accounts Parameters: - page (int): Page number (optional) (default to 1) - limit (int): Number of records per page (optional) (default to 10) Return type: str Authorization: [BasicAuth](../README.md#BasicAuth) HTTP request headers: - Content-Type: application/json - Accept: application/json reseller_accounts_post(reseller_account) Create reseller account Create reseller account Parameters: - reseller_account (ResellerAccount): ResellerAccount model Return type: str Authorization: [BasicAuth](../README.md#BasicAuth) HTTP request headers: - Content-Type: application/json - Accept: application/json ``` -------------------------------- ### Get MMS Price (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/MMSApi.md Retrieves the pricing information for sending MMS messages. Requires an MMS message collection object. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.MMSApi(clicksend_client.ApiClient(configuration)) mms_messages = clicksend_client.MmsMessageCollection() try: api_response = api_instance.mms_price_post(mms_messages) pprint(api_response) except ApiException as e: print("Exception when calling MMSApi->mms_price_post: %s\n" % e) ``` -------------------------------- ### EmailMarketingApi Endpoints Source: https://github.com/clicksend/clicksend-python/blob/master/docs/EmailMarketingApi.md Documentation for the EmailMarketingApi endpoints, including parameters, return types, and authorization. ```APIDOC email_campaign_history_export_get(email_campaign_id, date_from=None, date_to=None) - Exports specific email campaign history. - Parameters: - email_campaign_id (int): Allowed email campaign id. - date_from (int): Start date (optional). - date_to (int): End date (optional). - Return type: str - Authorization: [BasicAuth] - HTTP request headers: - Content-Type: application/json - Accept: application/json email_campaign_history_get(email_campaign_id, date_from=None, date_to=None, page=1, limit=10) - Gets specific email campaign history. - Parameters: - email_campaign_id (int): Allowed email campaign id. - date_from (int): Start date (optional). - date_to (int): End date (optional). - page (int): Page number (optional, default to 1). - limit (int): Number of records per page (optional, default to 10). - Return type: str - Authorization: [BasicAuth] - HTTP request headers: - Content-Type: application/json - Accept: application/json email_campaign_post(email_campaign) - Sends an email campaign. - Parameters: - email_campaign (EmailCampaign): Email model. - Return type: str - Authorization: [BasicAuth] - HTTP request headers: - Content-Type: application/json - Accept: application/json email_campaign_price_post(email_campaign) - Calculates the price for an email campaign. - Parameters: - email_campaign (EmailCampaign): Email model. - Return type: str - Authorization: [BasicAuth] - HTTP request headers: - Content-Type: application/json - Accept: application/json ``` -------------------------------- ### Get SMS Campaigns Source: https://github.com/clicksend/clicksend-python/blob/master/docs/SmsCampaignApi.md Retrieves a list of SMS campaigns, with options to paginate results. It uses the `clicksend_client` and handles API errors. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.SmsCampaignApi(clicksend_client.ApiClient(configuration)) page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Number of records per page (optional) (default to 10) try: # Get list of sms campaigns api_response = api_instance.sms_campaigns_get(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling SmsCampaignApi->sms_campaigns_get: %s\n" % e) ``` -------------------------------- ### Clicksend Reseller Account API Documentation Source: https://github.com/clicksend/clicksend-python/blob/master/docs/ResellerAccountApi.md This section provides comprehensive documentation for the Clicksend Reseller Account API, including methods for retrieving, updating, and listing reseller accounts. It details HTTP methods, endpoints, parameters, return types, and includes Python code examples for usage. ```APIDOC ResellerAccountApi: Methods: reseller_accounts_by_client_user_id_get(client_user_id: int) -> str Description: Get Reseller clients Account. HTTP Method: GET Endpoint: /reseller/accounts/{client_user_id} Parameters: client_user_id (int): User ID of client. Return Type: str Authentication: BasicAuth Headers: Content-Type: application/json Accept: application/json Example: ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.ResellerAccountApi(clicksend_client.ApiClient(configuration)) client_user_id = 56 try: api_response = api_instance.reseller_accounts_by_client_user_id_get(client_user_id) pprint(api_response) except ApiException as e: print("Exception when calling ResellerAccountApi->reseller_accounts_by_client_user_id_get: %s\n" % e) ``` reseller_accounts_by_client_user_id_put(client_user_id: int, reseller_account: 'ResellerAccount') -> str Description: Update Reseller clients Account. HTTP Method: PUT Endpoint: /reseller/accounts/{client_user_id} Parameters: client_user_id (int): User ID of client. reseller_account (ResellerAccount): ResellerAccount model. Return Type: str Authentication: BasicAuth Headers: Content-Type: application/json Accept: application/json Example: ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.ResellerAccountApi(clicksend_client.ApiClient(configuration)) client_user_id = 56 reseller_account = clicksend_client.ResellerAccount() try: api_response = api_instance.reseller_accounts_by_client_user_id_put(client_user_id, reseller_account) pprint(api_response) except ApiException as e: print("Exception when calling ResellerAccountApi->reseller_accounts_by_client_user_id_put: %s\n" % e) ``` reseller_accounts_get(page: int = None, limit: int = None) -> str Description: Get list of reseller accounts. HTTP Method: GET Endpoint: /reseller/accounts Parameters: page (int, optional): Page number for pagination. limit (int, optional): Number of results per page. Return Type: str Authentication: BasicAuth Headers: Content-Type: application/json Accept: application/json Example: ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.ResellerAccountApi(clicksend_client.ApiClient(configuration)) try: api_response = api_instance.reseller_accounts_get(page=1, limit=10) pprint(api_response) except ApiException as e: print("Exception when calling ResellerAccountApi->reseller_accounts_get: %s\n" % e) ``` reseller_accounts_post(reseller_account: 'ResellerAccount') -> str Description: Create reseller account. HTTP Method: POST Endpoint: /reseller/accounts Parameters: reseller_account (ResellerAccount): ResellerAccount model to create. Return Type: str Authentication: BasicAuth Headers: Content-Type: application/json Accept: application/json Example: ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.ResellerAccountApi(clicksend_client.ApiClient(configuration)) reseller_account = clicksend_client.ResellerAccount() try: api_response = api_instance.reseller_accounts_post(reseller_account) pprint(api_response) except ApiException as e: print("Exception when calling ResellerAccountApi->reseller_accounts_post: %s\n" % e) ``` ``` -------------------------------- ### Create Reseller Account (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/ResellerAccountApi.md Creates a new reseller account using the Clicksend API. Requires a ResellerAccount model object and basic authentication. Returns the status of the creation. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.ResellerAccountApi(clicksend_client.ApiClient(configuration)) reseller_account = clicksend_client.ResellerAccount() # ResellerAccount | ResellerAccount model try: # Create reseller account api_response = api_instance.reseller_accounts_post(reseller_account) pprint(api_response) except ApiException as e: print("Exception when calling ResellerAccountApi->reseller_accounts_post: %s\n" % e) ``` -------------------------------- ### Get All Email Addresses (Python) Source: https://github.com/clicksend/clicksend-python/blob/master/docs/EmailMarketingApi.md Retrieves a list of all allowed email addresses. Supports pagination with 'page' and 'limit' parameters. Requires basic authentication. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' api_instance = clicksend_client.EmailMarketingApi(clicksend_client.ApiClient(configuration)) page = 1 limit = 10 try: api_response = api_instance.allowed_email_address_get(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling EmailMarketingApi->allowed_email_address_get: %s\n" % e) ``` -------------------------------- ### Get All Contact Lists Source: https://github.com/clicksend/clicksend-python/blob/master/docs/ContactListApi.md Demonstrates how to retrieve all contact lists using the ClickSend Python SDK. It includes configuration for authentication and handling potential API exceptions. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.ContactListApi(clicksend_client.ApiClient(configuration)) page = 1 # int | Page number (optional) (default to 1) limit = 10 # int | Number of records per page (optional) (default to 10) try: # Get all contact lists api_response = api_instance.lists_get(page=page, limit=limit) pprint(api_response) except ApiException as e: print("Exception when calling ContactListApi->lists_get: %s\n" % e) ``` -------------------------------- ### Send Account Activation Token Source: https://github.com/clicksend/clicksend-python/blob/master/docs/AccountApi.md This Python code demonstrates how to send an account activation token using the Clicksend client. It configures authentication, creates an API client instance, and calls the `account_verify_send_put` method with account details. Error handling for API exceptions is included. ```python from __future__ import print_function import time import clicksend_client from clicksend_client.rest import ApiException from pprint import pprint # Configure HTTP basic authorization: BasicAuth configuration = clicksend_client.Configuration() configuration.username = 'YOUR_USERNAME' configuration.password = 'YOUR_PASSWORD' # create an instance of the API class api_instance = clicksend_client.AccountApi(clicksend_client.ApiClient(configuration)) account_verify = clicksend_client.AccountVerify() # AccountVerify | Account details try: # Send account activation token api_response = api_instance.account_verify_send_put(account_verify) pprint(api_response) except ApiException as e: print("Exception when calling AccountApi->account_verify_send_put: %s\n" % e) ``` -------------------------------- ### MMS API Documentation Source: https://github.com/clicksend/clicksend-python/blob/master/docs/MMSApi.md Provides comprehensive documentation for the Clicksend MMS API, covering price retrieval, receipt management, and sending MMS messages. ```APIDOC mms_price_post(mms_messages) Get Price for MMS sent Parameters: mms_messages: MmsMessageCollection model Return type: str Authorization: BasicAuth HTTP request headers: Content-Type: application/json Accept: application/json mms_receipts_get(page=page, limit=limit) Get all delivery receipts Get all delivery receipts Parameters: page: Page number (optional) (default to 1) limit: Number of records per page (optional) (default to 10) Return type: str Authorization: BasicAuth HTTP request headers: Content-Type: application/json Accept: application/json mms_receipts_read_put(date_before=date_before) Mark delivery receipts as read Mark delivery receipts as read Parameters: date_before: DateBefore model (optional) Return type: str Authorization: BasicAuth HTTP request headers: Content-Type: application/json Accept: application/json mms_send_post(mms_messages) Send MMS Send MMS Parameters: mms_messages: MmsMessageCollection model Return type: str Authorization: BasicAuth HTTP request headers: Content-Type: application/json Accept: application/json ```