Aller au contenu

whmcs.php

WHMCS integration module for managing customers, invoices, credit, order cancellations, and server billing data.

API Methods

Method Action Description
add_contact add contact Adds an additional contact person to an existing customer in WHMCS. If the type is not specified, a random contact is created.
apply_credit apply credit to invoice Applies the customer's available balance (credit) to pay a specific unpaid invoice. If the payment settles the debt, traffic overage is cleared.
create_addfunds create add funds invoice Creates an invoice in WHMCS for topping up the customer's balance. If the subscribe option is enabled, automatic renewal is activated.
delete_cancellation_request delete cancellation request Deletes a cancellation request for a specific server, restoring the invoice or generating a new one.
delete_contact delete contact Deletes an additional contact associated with a customer in WHMCS.
download_invoice download invoice Returns a PDF file of the invoice in base64 format. The viewpdf parameter allows displaying the file in an inline viewer or downloading it as an attachment.
generate_due_invoice generate due invoice Generates the next invoice for a server in WHMCS, provided the current billing cycle was completed more than 30 days ago and there are no unpaid invoices.
get_billing_data get server billing data Returns detailed information about billing settings and the current status of a specific server (equipment).
get_cancellation_requests get cancellation requests list Returns a list of active service cancellation requests for a specific server or user, with filtering by date, type, and payment status.
get_client get client information Returns detailed information about the authenticated client, including data from WHMCS and internal system tags.
get_clientgroups get groups Returns a list of available customer groups from WHMCS for the specified location.
get_contacts get client additional contacts Returns a list of contacts (subcontacts) associated with a customer in WHMCS. If an email is specified, it returns only those contacts that have the corresponding access rights.
get_invoice get invoice data Returns detailed information about an invoice from WHMCS, including status, items, and client data.
get_invoices get client invoices list Returns a list of all invoices associated with a customer in WHMCS for the specified billing location.
get_related_invoices get related invoices Returns a list of invoices associated with a specific server or account.
getcredits get credits Returns information about available credits on the customer's balance in the specified WHMCS location.
getpaymentgw get payment gateways Returns a list of available payment methods (payment gateways) for a specific invoice with processed payment links.
mass_pay mass pay invoices Allows bulk payment of several invoices simultaneously by creating one combined invoice for payment.
request_cancellation request order/subscription cancellation Initiates the process of canceling an order or subscription. It checks for active licenses, invoice payment status, and the possibility of an automatic refund depending on the service type and contract terms.
request_subscription_cancellation request subscription cancellation Sends a request to JIRA to cancel a server's bank subscription. It checks for active orders, payment status, and any open tickets regarding this operation.
reset_password reset password Allows initiating the password reset process for a client. If no token is provided, a link is sent via email. If the token is valid, the password is changed or a 2FA code is requested.
transactions get client transactions Returns a list of financial transactions for the user associated with an invoice or a specific transaction.
update_client update client data Updates customer information in WHMCS, including personal data (name, email, phone), address details, and custom fields. Supports email uniqueness validation and change verification.
update_contact update contact Updates additional contact data (first name, last name, email, phone) for an existing customer in WHMCS.

whmcs/add_contact

Adds an additional contact person to an existing customer in WHMCS. If the type is not specified, a random contact is created.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: add_contact
type integer Operation type (0 - create new contact)
profile_data[firstname] string Contact person's first name
profile_data[lastname] string Contact person's last name
profile_data[email] string Contact person's email
profile_data[password1] string Password for the new contact
profile_data[password2] string Password confirmation
profile_data[phonenumber] string Phone number (SMS support is checked)

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=add_contact" \
--data "profile_data[firstname]=VALUE" \
--data "profile_data[email]=VALUE" \
--data "profile_data[password1]=VALUE" \
--data "profile_data[password2]=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"clientid": 123,
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]"
}
Failure response

``` { "code": -1, "message": "fill_required_fields" }

```

whmcs/apply_credit

Applies the customer's available balance (credit) to pay a specific unpaid invoice. If the payment settles the debt, traffic overage is cleared.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: apply_credit
invoice_id int Invoice ID for payment
amount number Credit amount to apply to the invoice
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=apply_credit" \
--data "invoice_id=VALUE" \
--data "amount=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "success",
"invoiceid": 123,
"amount": 50.0,
"status": "Paid"
}
Failure response

``` { "code": -1, "message": "WHMCS ApplyCredit failed: {\"result\":\"error\",\"error\":\"...\"}" }

```

whmcs/create_addfunds

Creates an invoice in WHMCS for topping up the customer's balance. If the subscribe option is enabled, automatic renewal is activated.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: create_addfunds
amount number Top-up amount. Minimum amount is 20 (if auto-renewal is not enabled)
description string Payment description
subscribe boolean Enable automatic renewal (auto-payment)
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=create_addfunds" \
--data "amount=50.0" \
--data "token=YOUR_API_TOKEN"
Example of a successful response
{
"result": "OK",
"invoice": {
"id": 12345,
"amount": 50.0,
"status": "Unpaid"
},
"message": "Invoice 12345 created"
}
Failure response

``` { "code": -1, "message": "minimal payment amount is 20." }

```

whmcs/delete_cancellation_request

Deletes a cancellation request for a specific server, restoring the invoice or generating a new one.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: delete_cancellation_request
id int Server ID
token string Authorization token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=delete_cancellation_request" \
--data "id=VALUE"
Example of a successful response
{
"result": "OK",
"action": "delete_cancellation_request",
"data": {
"result": "success"
}
}
Failure response

``` { "code": -1, "message": "Server $id doesn't have a relid data" }

```

whmcs/delete_contact

Deletes an additional contact associated with a customer in WHMCS.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: delete_contact
contact_id int Contact ID to delete
location string Billing location (WHMCS location)
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=delete_contact" \
--data "contact_id=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"action": "delete_contact",
"clientid": 12345
}
Failure response

``` { "code": -1, "message": "verification failed, subcontact not found" }

```

whmcs/download_invoice

Returns a PDF file of the invoice in base64 format. The viewpdf parameter allows displaying the file in an inline viewer or downloading it as an attachment.

HTTP Method: POST|GET

Parameters:

Parameter Required Type Description
token string Authorization token
invoice_id int Invoice ID for download
proforma_invoice int Proforma invoice flag (0 or 1)
viewpdf int Display mode: 1 — inline (in browser), 0 — attachment (download)

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "token=HOSTKEY_TOKEN" \
--data "invoice_id=12345" \
--data "proforma_invoice=0" \
--data "viewpdf=1"
Example of a successful response
{
"result": "success",
"message": "base64_encoded_pdf_content"
}
Failure response

``` { "code": -1, "message": "Invalid invoice id or invalid billing location" }

```

whmcs/generate_due_invoice

Generates the next invoice for a server in WHMCS, provided the current billing cycle was completed more than 30 days ago and there are no unpaid invoices.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: generate_due_invoice
id int Server ID
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=generate_due_invoice" \
--data "id=VALUE"
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"invoices": [
{
"id": 12345,
"amount": 29.99,
"status": "Unpaid",
"currency": "USD"
}
]
}
Failure response

``` { "code": -1, "message": "next_invoice_blocked_by_upgrade" }

```

whmcs/get_billing_data

Returns detailed information about billing settings and the current status of a specific server (equipment).

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: get_billing_data
id int Equipment ID (server id)
token string Authorization token
customer_name string customer_name parameter (detected in code)

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_billing_data" \
--data "id=VALUE"
--data "token=HOSTKEY_TOKEN" \
--data "customer_name=VALUE"
Example of a successful response
{
"result": "OK",
"action": "get_billing_data",
"data": {
"account_id": 12345,
"type_billing": "whmcs_ru",
"status": "Active",
"customer_name": "John Doe",
"location": "RU"
}
}
Failure response

``` { "code": -1, "message": "invalid request" }

```

whmcs/get_cancellation_requests

Returns a list of active service cancellation requests for a specific server or user, with filtering by date, type, and payment status.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: get_cancellation_requests
id int Server ID to get requests for a specific resource. If not specified, search is performed by user.
period_from string Start date of the period (format YYYY-MM-DD)
period_to string End date of the period (format YYYY-MM-DD)
cancellation_type string Cancellation type for filtering (e.g., 'End of Billing Period')
billing_status string Invoice payment status for filtering
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_cancellation_requests" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"message": [
{
"relid": 123,
"cr_date": "2024-05-20 14:30:00",
"cr_reason": "User requested cancellation",
"cr_type": "End of Billing Period",
"due_date": "2024-06-20",
"name_client": "John Doe",
"billing": "whmcs_ru",
"account_id": 55,
"status": "Active",
"corporate": "N",
"customer_id": 101
}
]
}
Failure response

``` { "code": -1, "message": "server $id doesn't have a relid data" }

```

whmcs/get_client

Returns detailed information about the authenticated client, including data from WHMCS and internal system tags.

HTTP Method: POST|GET

Parameters:

Parameter Required Type Description
action string Method identifier: get_client
token string Authorization token
full boolean If true, returns extended data (including contacts and groups)
client string client parameter (detected in code)
billing_location string billing_location parameter (detected in code)
groupdata string groupdata parameter (detected in code)
internal string internal parameter (detected in code)

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_client" \
--data "token=HOSTKEY_TOKEN" \
--data "client=VALUE" \
--data "billing_location=VALUE" \
--data "groupdata=VALUE" \
--data "internal=VALUE"
Example of a successful response
{
"result": "OK",
"action": "get_client",
"client": {
"id": 123,
"email": "[email protected]",
"firstname": "John",
"lastname": "Doe",
"fullname": "John Doe",
"companyname": "Company LLC",
"countrycode": "US",
"currency_code": "USD",
"status": "Active",
"groupid": 1,
"corporate": 0
},
"billing_location": "whmcs_com",
"internal": {
"id": 456,
"email": "[email protected]",
"active_since": "2023-01-15"
},
"groupdata": null
}
Failure response

``` { "code": -1, "message": "Request failed for 123@whmcs_com: client not found" }

```

whmcs/get_clientgroups

Returns a list of available customer groups from WHMCS for the specified location.

HTTP Method: POST|GET

Parameters:

Parameter Required Type Description
action string Method identifier: get_clientgroups
token string Authorization token
location string WHMCS location (billing location)

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_clientgroups" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"data": [
{
"id": 1,
"groupname": "VIP Customers"
},
{
"id": 2,
"groupname": "Standard Users"
}
]
}
Failure response

``` { "code": -1, "message": "Invalid token or access denied" }

```

whmcs/get_contacts

Returns a list of contacts (subcontacts) associated with a customer in WHMCS. If an email is specified, it returns only those contacts that have the corresponding access rights.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: get_contacts
email string Email for filtering contacts (used to check subcontact permissions)
full boolean If true, returns extended information from WHMCS along with API data
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_contacts" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"permission_contacts_granted": true,
"contacts": [
{
"id": 123,
"email": "[email protected]",
"firstname": "John",
"lastname": "Doe",
"permissions": "contacts"
}
]
}
Failure response

``` { "code": -1, "message": "fail to get contacts list" }

```

whmcs/get_invoice

Returns detailed information about an invoice from WHMCS, including status, items, and client data.

HTTP Method: POST|GET

Parameters:

Parameter Required Type Description
action string Method identifier: get_invoice
token string Authorization token
invoice_id int Invoice ID
load_client_data int Load client data flag (1 — yes)

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_invoice" \
--data "token=HOSTKEY_TOKEN" \
--data "invoice_id=123"
Example of a successful response
{
"result": "OK",
"billing": "whmcs_ru",
"currencycode": "USD",
"status": "Paid",
"items": {
"item": [
{
"inv_id": 123,
"type": "Hosting",
"amount": 50.0
}
]
},
"customer": {
"client": {
"firstname": "John",
"lastname": "Doe",
"email": "[email protected]"
}
}
}
Failure response

``` { "code": -1, "message": "invalid invoice id 0 at whmcs_ru" }

```

whmcs/get_invoices

Returns a list of all invoices associated with a customer in WHMCS for the specified billing location.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: get_invoices
token string Authorization token
location string Billing location (extracted from session context/auth_check)

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_invoices" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"invoices": {
"invoice": [
{
"id": 101,
"clientid": 5,
"userid": 5,
"status": "Paid",
"total": 49.99,
"date": "2023-10-01",
"duedate": "2023-11-01"
}
]
}
}
Failure response

``` { "code": -1, "message": "failed to retrive invoices: error message" }

```

Returns a list of invoices associated with a specific server or account.

HTTP Method: POST|GET

Parameters:

Parameter Required Type Description
action string Method identifier: get_related_invoices
account_id int Account ID to search for invoices
token string Authorization token
id int Server ID (relid)

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=get_related_invoices" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"invoices": [
{
"userid": 45,
"status": "Paid",
"invoiceid": 123,
"total": 29.99,
"currency": "USD"
}
]
}
Failure response

``` { "code": -1, "message": "server $id are not linked to the billing" }

```

whmcs/getcredits

Returns information about available credits on a customer's balance in the specified WHMCS location.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: getcredits
server_id int Server ID (optional)
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=getcredits" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"module": "whmcs",
"action": "getcredits",
"message": 150.5
}
Failure response

``` { "code": -1, "message": "failed to retrive account history at WHMCS_LOCATION, please contact support - [WHMCS_ERROR]" }

```

whmcs/getpaymentgw

Returns a list of available payment methods (payment gateways) for a specific invoice with processed payment links.

HTTP Method: POST|GET

Parameters:

Parameter Required Type Description
action string Method identifier: getpaymentgw
token string Authorization token
invoice_id integer Invoice ID to get available gateways

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=getpaymentgw" \
--data "token=YOUR_TOKEN" \
--data "invoice_id=123"
Example of a successful response
{
"result": "OK",
"methods": {
"paymaster": {
"call": "https://invapi.hostkey.com/modules/gateways/paymaster.php?id=123"
},
"bitpaycheckout": {
"call": "<input type=\"submit\" class=\"btn btn-xl btn-block btn-outline-dark rounded btn-sm\" value=\"Pay Now\" />"
},
"banktransfer": {
"call": "<span style='text-align:left'><p data-intl='please_wire_funds_in_favor'>Please wire funds in favor of:&nbsp;</p>https://invapi.hostkey.com?invoice_id=123</span>"
}
}
}
Failure response

``` { "code": -1, "message": "failed to retrive payment gw list: error message" }

```

whmcs/mass_pay

Allows bulk payment of several invoices simultaneously by creating one combined invoice for payment.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: mass_pay
invoices[] array<int> Array of invoice IDs for bulk payment. Must contain at least 2 values.
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=mass_pay" \
--data "invoices[]=12345" \
--data "invoices[]=67890" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"invoiceid": 12345
}
Failure response

``` { "code": -1, "message": "mass_pay_requires_2_invoices" }

```

whmcs/request_cancellation

Initiates the process of canceling an order or subscription. It checks for active licenses, invoice payment status, and the possibility of an automatic refund depending on the service type and contract terms.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Action name
token string Authorization token
id integer Server or order ID
cancellation_type integer Cancellation type (1 for immediate with refund)
cancellation_reason string Reason for cancellation
refund float Refund amount
currency string Currency
service_price float Service cost for calculation
refund_message string Refund message (RU/EN)
refund_message_short string Short refund message
clientid integer Client ID in WHMCS
billing string Billing location (e.g., whmcs_ru)
email string Client's email for notification
last_invoice integer Last invoice item ID
prev_invoice_id integer Previous invoice ID to account for overpayment
relid integer Related ID (account_id)
vat_msg string Tax/VAT message
rec_before_tax float Amount before taxes
d_deploy_time string Deployment date (from tags)
d_bill_time string Current request time
d_reccuring string Recurring payment (from tags)
d_period string Billing period (from tags)
cbp_adjusted string CBP adjustment message

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=request_cancellation" \
--data "token=YOUR_TOKEN" \
--data "id=12345" \
--data "refund=50.00" \
--data "currency=USD" \
--data "refund_message=Refund processed successfully" \
--data "refund_message_short=Refund OK" \
--data "clientid=9876" \
--data "billing=whmcs_ru" \
--data "[email protected]" \
--data "last_invoice=554433" \
--data "relid=1001"
Example of a successful response
{
"result": "OK"
}
Failure response

``` { "code": -3, "message": "whmcs_server_exceded_traffic" }

```

whmcs/request_subscription_cancellation

Sends a request to JIRA to cancel a server's bank subscription. It checks for active orders, payment status, and any open tickets regarding this operation.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: request_subscription_cancellation
id integer Server ID for subscription cancellation
cancellation_type string Cancellation type (e.g., 1)
cancellation_reason string Reason for subscription cancellation
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=request_subscription_cancellation" \
--data "id=VALUE"
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"data": {
"account_id": "int",
"amount": "float",
"billing": "string",
"cancellation_reason": "string",
"cancellation_type": "string",
"clientid": "int",
"created": "string",
"currency": "string",
"customfields": "array",
"dc_location": "string",
"description": "string",
"displayid": "string",
"email": "string",
"hwconfig": "array",
"invoiceid": "int",
"last_inv_id": "int",
"prev_inv_id": "int",
"relid": "int",
"service_price": "float"
}
}
Failure response

``` { "code": -1, "message": "sub_cancel_jira_error" }

```

whmcs/reset_password

Allows initiating the password reset process for a client. If no token is provided, a link is sent via email. If the token is valid, the password is changed or a 2FA code is requested.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: reset_password
token string Request authorization token (auth token)
email string User's email for sending the password reset link
location string Billing location (default Auto)
reset_token string Specific token for database record lookup
pass string New password (used if a valid token is present)
code string Two-factor authentication (2FA) code

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=reset_password" \
--data "[email protected]"
Example of a successful response
{
"result": "OK",
"message": "Password reset link was sent to the registred email.",
"debug": {
"expire": "2024-12-31T23:59:59Z",
"hash": "a1b2c3d4e5f6g7h8i9j0",
"token": "abc123xyz"
}
}
Failure response

``` { "code": -1, "message": "Invalid password reset token, please try again." }

```

whmcs/transactions

Returns a list of financial transactions for the user associated with an invoice or a specific transaction.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: transactions
transaction_id string Specific transaction ID for filtering
invoice_id integer Invoice ID to get all associated transactions
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=transactions" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"action": "transactions",
"transactions": [
{
"id": 12345,
"amount": 50.0,
"currency": "USD",
"status": "Completed",
"date": "2024-05-20T10:30:00Z",
"description": "Payment for invoice #123"
}
]
}
Failure response

``` { "code": -1, "message": "failed to retrive transactions - error message" }

```

whmcs/update_client

Updates customer information in WHMCS, including personal data (name, email, phone), address details, and custom fields. Supports email uniqueness validation and change verification.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: update_client
token string Authorization token
profile_data[client_id] integer Client ID in WHMCS
profile_data[location] string Billing location (e.g., whmcs_ru)
profile_data[billing_email] string New customer email address
profile_data[billing_firstname] string First name in billing
profile_data[billing_lastname] string Last name in billing
profile_data[co_smsnum] string Phone number for SMS verification (requires verification)
profile_data[ips] string List of IP addresses for ACL, separated by comma/space
profile_data[co_customertype] string Customer type (Individual / Company)

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=update_client" \
--data "token=HOSTKEY_TOKEN" \
--data "profile_data[client_id]=12345" \
--data "profile_data[location]=whmcs_ru" \
--data "profile_data[billing_email][email protected]"
Example of a successful response
{
"result": "OK",
"clientid": 12345,
"location": "whmcs_ru"
}
Failure response

``` { "-1": "invalid profile data: billing_email can't be empty" }

```

whmcs/update_contact

Updates additional contact data (first name, last name, email, phone) for an existing customer in WHMCS.

HTTP Method: POST

Parameters:

Parameter Required Type Description
action string Method identifier: update_contact
params[contact_id] int Contact ID to update
params[email] string Contact email (required)
params[firstname] string Contact first name
params[lastname] string Contact last name
params[phonenumber] string Phone number (passes validation and transliteration)
params[password1] string New password 1
params[password2] string New password 2 (for password change)
token string API authentication token

Example Request

curl -s "https://invapi.hostkey.com/whmcs.php" -X POST \
--data "action=update_contact" \
--data "params[contact_id]=VALUE" \
--data "params[email]=VALUE" \
--data "params[firstname]=VALUE" \
--data "token=HOSTKEY_TOKEN"
Example of a successful response
{
"result": "OK",
"contact_id": 12345,
"location": "whmcs_ru"
}
Failure response

``` { "code": -1, "message": "fill_required_fields" }