Skip to main content

whmcs-api-client

Python client for the WHMCS API.

WHMCS (Web Host Manager Complete Solution) provides a single API endpoint that handles multiple operations through different 'action' parameters. This specification presents each action as an independent path while routing all requests to the /api.php endpoint.

This Python package is automatically generated by the OpenAPI Generator project:

  • API version: 1.0.0
  • Package version: 1.0.32
  • Generator version: 7.22.0
  • Build package: org.openapitools.codegen.languages.PythonClientCodegen

Requirements.

Python 3.10+

Installation & Usage

pip install

If the python package is hosted on a repository, you can install directly using:

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)

Then import the package:

import whmcs_client

Setuptools

Install via Setuptools.

python setup.py install --user

(or sudo python setup.py install to install the package for all users)

Then import the package:

import whmcs_client

Tests

Execute pytest to run the tests.

Getting Started

Please follow the installation procedure and then run the following:

import whmcs_client
from whmcs_client.rest import ApiException
from pprint import pprint

# Defining the host is optional and defaults to https://your-whmcs-instance.com/includes
# See configuration.py for a list of all supported configuration parameters.
configuration = whmcs_client.Configuration(
    host = "https://your-whmcs-instance.com/includes"
)



# Enter a context with an instance of the API client
with whmcs_client.ApiClient(configuration) as api_client:
    # Create an instance of the API class
    api_instance = whmcs_client.DefaultApi(api_client)
    username = 'username_example' # str | Admin username/API identifier
    password = 'password_example' # str | Admin password/API secret
    firstname = 'firstname_example' # str | First name of the client
    lastname = 'lastname_example' # str | Last name of the client
    email = 'email_example' # str | Email address of the client
    address1 = 'address1_example' # str | Address line 1
    city = 'city_example' # str | City
    state = 'state_example' # str | State
    postcode = 'postcode_example' # str | Postal code
    country = 'country_example' # str | 2 character ISO country code
    phonenumber = 'phonenumber_example' # str | Phone number
    accesskey = 'accesskey_example' # str | Optional API access key (optional)
    responsetype = json # str | Response format (optional) (default to json)
    owner_user_id = 56 # int | The ID of the user that should own the client (optional)
    companyname = 'companyname_example' # str | Company name (optional)
    address2 = 'address2_example' # str | Address line 2 (optional)
    tax_id = 'tax_id_example' # str | Client's tax ID (optional)
    password2 = 'password2_example' # str | Password for the new user account (optional)
    securityqid = 56 # int | Security question ID (optional)
    securityqans = 'securityqans_example' # str | Security question answer (optional)
    currency = 56 # int | Currency ID (optional)
    groupid = 56 # int | Client group ID (optional)
    customfields = 'customfields_example' # str | Base64 encoded serialized array of custom field values (optional)
    language = 'language_example' # str | Default language setting (optional)
    clientip = 'clientip_example' # str | Originating IP address (optional)
    notes = 'notes_example' # str | Admin only notes (optional)
    marketingoptin = True # bool | Opt-in to marketing emails (optional)
    noemail = True # bool | Set to true to suppress the Order Confirmation email being sent (optional)
    skipvalidation = True # bool | Ignore required field validation (optional)

    try:
        # Add a new client
        api_response = api_instance.add_client(username, password, firstname, lastname, email, address1, city, state, postcode, country, phonenumber, accesskey=accesskey, responsetype=responsetype, owner_user_id=owner_user_id, companyname=companyname, address2=address2, tax_id=tax_id, password2=password2, securityqid=securityqid, securityqans=securityqans, currency=currency, groupid=groupid, customfields=customfields, language=language, clientip=clientip, notes=notes, marketingoptin=marketingoptin, noemail=noemail, skipvalidation=skipvalidation)
        print("The response of DefaultApi->add_client:\n")
        pprint(api_response)
    except ApiException as e:
        print("Exception when calling DefaultApi->add_client: %s\n" % e)

Documentation for API Endpoints

All URIs are relative to https://your-whmcs-instance.com/includes

Class Method HTTP request Description
DefaultApi add_client POST /api.php?action=AddClient Add a new client
DefaultApi add_order POST /api.php?action=AddOrder Create a new order
DefaultApi affiliate_activate POST /api.php?action=AffiliateActivate Activate affiliate status
DefaultApi cancel_order POST /api.php?action=CancelOrder Cancel a pending order
DefaultApi delete_order POST /api.php?action=DeleteOrder Delete an order
DefaultApi domain_get_nameservers POST /api.php?action=DomainGetNameservers Get domain nameservers
DefaultApi domain_update_nameservers POST /api.php?action=DomainUpdateNameservers Update domain nameservers
DefaultApi domain_whois POST /api.php?action=DomainWhois Lookup domain WHOIS
DefaultApi get_affiliates POST /api.php?action=GetAffiliates Get affiliates
DefaultApi get_clients POST /api.php?action=GetClients Get clients
DefaultApi get_clients_details POST /api.php?action=GetClientsDetails Get client details
DefaultApi get_clients_domains POST /api.php?action=GetClientsDomains Get client domains
DefaultApi get_clients_products POST /api.php?action=GetClientsProducts Get client products
DefaultApi get_currencies POST /api.php?action=GetCurrencies Get currencies
DefaultApi get_invoices POST /api.php?action=GetInvoices Get invoices
DefaultApi get_invoices_details POST /api.php?action=GetInvoicesDetails Get invoices with line item details
DefaultApi get_orders POST /api.php?action=GetOrders Get orders
DefaultApi get_payment_methods POST /api.php?action=GetPaymentMethods Get payment methods
DefaultApi get_products POST /api.php?action=GetProducts Get products
DefaultApi get_tld_pricing POST /api.php?action=GetTLDPricing Get TLD pricing
DefaultApi get_transactions POST /api.php?action=GetTransactions Get transactions
DefaultApi update_client POST /api.php?action=UpdateClient Update client details

Documentation For Models

Documentation For Authorization

Endpoints do not require authorization.

Author

Metadata

Release files for whmcs-api-client 1.0.32

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

Source distribution (sdist)

Source distribution for whmcs-api-client 1.0.32
File Size Uploaded
whmcs_api_client-1.0.32.tar.gz 68.8 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for whmcs-api-client 1.0.32
File Interpreter ABI Platform
whmcs_api_client-1.0.32-py3-none-any.whl Python 3 none any Details

Total release size: 191.2 kB

Release files / whmcs_api_client-1.0.32.tar.gz

Download URL whmcs_api_client-1.0.32.tar.gz
Size 68.8 kB
Tags Source
SHA-256 checksum
How to use checksums
2fcde671cde4affa21cb34c2c392248f0bd6f5214c488297a4d499e31b098455
BLAKE2b-256 checksum
How to use checksums
62a3ccd23ece8ed78b2c35fbd3fd25613c8d7512e9364c59f7f23d734c03b1cd
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 30, 2026.

Transparency log

Release files / whmcs_api_client-1.0.32-py3-none-any.whl

Download URL whmcs_api_client-1.0.32-py3-none-any.whl
Size 122.5 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d065af5e59373ed5b6e9b2b5cdafddb29bb5ffd81e9c351b74687f94a20b40a3
BLAKE2b-256 checksum
How to use checksums
2a9b5ecad000eb7fe32359803faf0c8ff1f08d1940554034f6fb3bd6ac71799e
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
Yes
Uploaded via twine/6.1.0 CPython/3.13.12

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 May 30, 2026.

Transparency log

Release history Release notifications | RSS feed

This release

1.0.32 This release

2 release files

1.0.31

2 release files

1.0.30

2 release files

1.0.29

2 release files

1.0.28

2 release files

1.0.27

2 release files

1.0.26

2 release files

1.0.25

2 release files

1.0.24

2 release files

1.0.22

2 release files

1.0.21

2 release files

1.0.20

2 release files

1.0.19

2 release files

1.0.18

2 release files

1.0.17

2 release files

1.0.16

2 release files

1.0.15

2 release files

1.0.14

2 release files

1.0.13

2 release files

1.0.12

2 release files

1.0.11

2 release files

1.0.10

2 release files

1.0.9

2 release files

1.0.8

2 release files

1.0.7

2 release files

1.0.6

2 release files

1.0.5

2 release files

1.0.3

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

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