Skip to main content

ClickSend Python SDK

Python License: MIT API: v3

Official Python client for the ClickSend API — send SMS, MMS, voice and email messages, run SMS and MMS campaigns, manage numbers, contacts and subaccounts, and pull delivery receipts and reporting through a single authenticated HTTPS client.

This library is generated from ClickSend's official OpenAPI v3 specification and is maintained by ClickSend. It covers every endpoint of the ClickSend REST API.

Features

  • Messaging — SMS, MMS, voice / text-to-speech, transactional email, email-to-SMS
  • Campaigns — SMS and MMS campaigns
  • Numbers & sender IDs — dedicated numbers, own numbers, alpha tags, default senders
  • Contacts — contact lists, contacts and the address book
  • Account & billing — account details, transactions, subaccounts, referrals, reseller accounts
  • Delivery & reporting — delivery receipts, inbound messages, statistics
  • Extras — URL shortening, file uploads, number verification, international messaging
  • Typed models with pydantic validation for every request and response
  • HTTP Basic auth with your ClickSend username and API key
  • Identifiable traffic — requests are sent with a ClickSend-SDK/<version>/python User-Agent by default
  • MIT licensed

Requirements

  • Python 3.10 or newer

Installation

pip install clicksend-client

Authentication

Every API class authenticates with HTTP Basic auth using your ClickSend username and API key, both available from the ClickSend Dashboard. Supply them through environment variables rather than hard-coding them:

export CLICKSEND_USERNAME="your-username"
export CLICKSEND_API_KEY="your-api-key"

Quickstart

import os
import clicksend
from clicksend.rest import ApiException

configuration = clicksend.Configuration(
    username=os.environ["CLICKSEND_USERNAME"],
    password=os.environ["CLICKSEND_API_KEY"],
)

with clicksend.ApiClient(configuration) as api_client:
    sms_api = clicksend.SmsApi(api_client)

    try:
        response = sms_api.send_sms(
            send_sms_request={
                "messages": [
                    {"source": "sdk", "body": "Hello from ClickSend!", "to": "+61411111111"}
                ]
            }
        )
        print(response)
    except ApiException as e:
        print(f"Exception when calling SmsApi->send_sms: {e}")

More Examples

View account details

with clicksend.ApiClient(configuration) as api_client:
    management_api = clicksend.ManagementApi(api_client)

    try:
        account = management_api.view_account_details()
        print(account)
    except ApiException as e:
        print(f"Exception when calling ManagementApi->view_account_details: {e}")

Send an MMS

with clicksend.ApiClient(configuration) as api_client:
    mms_api = clicksend.MmsApi(api_client)

    try:
        response = mms_api.send_mms(
            send_mms_request={
                "media_file": "https://clicksend.com/logo.png",
                "messages": [
                    {
                        "to": "+61411111111",
                        "from": "sdk",
                        "subject": "Hello",
                        "body": "Hello from ClickSend!",
                        "source": "sdk",
                    }
                ],
            }
        )
        print(response)
    except ApiException as e:
        print(f"Exception when calling MmsApi->send_mms: {e}")

Configuration

configuration = clicksend.Configuration(
    username=os.environ["CLICKSEND_USERNAME"],
    password=os.environ["CLICKSEND_API_KEY"],
    # Override the API base URL (default: https://rest.clicksend.com).
    host="https://rest.clicksend.com",
)

Error Handling

Non-2xx responses raise clicksend.rest.ApiException:

from clicksend.rest import ApiException

try:
    response = sms_api.send_sms(send_sms_request={"messages": [...]})
except ApiException as e:
    print(e.status)   # HTTP status code
    print(e.body)     # raw error payload from the API
    print(e.headers)  # response headers

Documentation

Versioning

This package follows semantic versioning. Breaking changes are released as major versions.

Support

License

Released under the MIT License.


Keywords: clicksend, sms, sms api, send sms, bulk sms, text message, texting, mms, mms api, voice, voice call, text to speech, tts, ivr, email to sms, sms campaign, mms campaign, url shortening, number verification, messaging, notifications, otp, 2fa, two factor authentication, transactional sms, marketing sms, appointment reminders, alerts, python, python3, rest api, clicksend sdk

Release files for clicksend-client 6.0.2

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for clicksend-client 6.0.2
File Size Uploaded
clicksend_client-6.0.2.tar.gz 339.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for clicksend-client 6.0.2
File Interpreter ABI Platform
clicksend_client-6.0.2-py3-none-any.whl Python 3 none any Details

Total release size: 1.3 MB

Release files / clicksend_client-6.0.2.tar.gz

Download URL clicksend_client-6.0.2.tar.gz
Size 339.5 kB
Tags Source
SHA-256 checksum
How to use checksums
2f20608bbb378c0590f5f730003a523f60afb4956f99caea40afe92c16282d9e
BLAKE2b-256 checksum
How to use checksums
a18cc1ba619f33d10df8f4d85222c09e7d115aa4acf38e150af7ac6c11cbb49b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release files / clicksend_client-6.0.2-py3-none-any.whl

Download URL clicksend_client-6.0.2-py3-none-any.whl
Size 980.8 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e325e6c0934bdd45d500d7a5e63ad6d5be0398119f50de8ead22f66ee214f886
BLAKE2b-256 checksum
How to use checksums
0849762dd59360866cd3f9f9db6868bda01899df18e2242e77429a22739e2323
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/7.0.0 CPython/3.13.14

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

PyPI Publish Attestation

PyPI verified that this artifact, at this checksum, originated from the publisher listed below.

Signed by GitHub Actions, verified by PyPI on Sep 25, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

6.0.2 This release

2 release files

5.0.91

2 release files

1.0.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page