System¶
42 endpoints. Authentication, errors, paging and rate limits are described once, in the API overview.
| Action | Method | Description |
|---|---|---|
activatemodule |
POST | Switch a module on |
addannouncement |
POST | Create a new announcement |
addbannedip |
POST | Ban an IP address or range |
deactivatemodule |
POST | Switch a module off |
decryptpassword |
POST | Decrypt a value (not available) |
deleteannouncement |
POST | Delete an announcement |
encryptpassword |
POST | Encrypt a value (not available) |
getactivitylog |
GET | List the activity log |
getadmindetails |
GET | Get a staff account (the caller by default) |
getadminusers |
GET | List the staff accounts |
getannouncements |
GET | List the published announcements |
getautomationlog |
GET | List the activity log (automation) |
getconfigurationvalue |
GET | Read a setting |
getemails |
GET | List the mail sent to clients |
getemailtemplates |
GET | List the email templates |
gethealthstatus |
GET | Check system health and service status |
getmoduleconfigurationparameters |
GET | List the settings a module asks for |
getmodulequeue |
GET | List server actions waiting to be retried |
getorderstatuses |
GET | Get available order status options |
getpaymentmethods |
GET | List the payment gateways clients can pay with |
getpermissionslist |
GET | List the staff permission keys |
getproducts |
GET | List all products/packages in the system |
getpromotions |
GET | List promotion codes |
getregistrars |
GET | List the installed registrar modules |
getservers |
GET | List the servers |
getstaffonline |
GET | List the staff signed in during the last 15 minutes |
getstats |
GET | Count clients, services, domains, invoices, orders, tickets and staff |
gettodoitems |
GET | List to-do items |
gettodoitemstatuses |
GET | List the to-do statuses |
logactivity |
POST | Write an entry in the activity log |
pnlcsdetails |
GET | Get installation details (version, company name) |
resetpassword |
POST | Send a client login the password reset link |
sendadminemail |
POST | Send an email to the staff |
sendemail |
POST | Send a client a template or custom email |
setconfigurationvalue |
POST | Change a setting |
triggernotificationevent |
POST | Send a custom notification |
updateadminnotes |
POST | Replace the admin notes on a client |
updateannouncement |
POST | Update an announcement |
updatemoduleconfiguration |
POST | Change a module's settings |
updatetodoitem |
POST | Update a to-do item |
validatelogin |
POST | Validate client login credentials |
whmcsdetails |
GET | Get installation details (WHMCS name) |
activatemodule¶
Switch a module on.
POST /api/v1/activatemodule
Permission: manage_settings
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
moduleType |
string | yes | server, gateway, registrar, ssl or addon. |
moduleName |
string | yes | The module name, for example stripe. |
Response
| Field | Description |
|---|---|
result |
success |
moduleType |
string |
moduleName |
string |
active |
boolean |
Errors
| Status | When |
|---|---|
| 404 | No such module is installed. |
| 422 | The switch refused the change. |
Note
The same switch as Setup > Modules in the admin area.
Example
curl -X POST https://example.com/api/v1/activatemodule \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "moduleType=gateway" \
--data-urlencode "moduleName=banktransfer"
addannouncement¶
Create a new announcement.
POST /api/v1/addannouncement
Permission: manage_announcements
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
title |
string | yes | Up to 255 characters. |
announcement |
string | yes | The text. |
published |
boolean | no | Default true. Send 0 to save it unpublished. |
Response
| Field | Description |
|---|---|
result |
success |
announcementid |
integer |
Example
curl -X POST https://example.com/api/v1/addannouncement \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "title=example" \
--data-urlencode "announcement=example"
addbannedip¶
Ban an IP address or range.
POST /api/v1/addbannedip
Permission: manage_security
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
ip |
string | yes | An IPv4 or IPv6 address, or a prefix ending in * such as 203.0.113.* |
reason |
string | no | Up to 255 characters. |
Response
| Field | Description |
|---|---|
result |
success |
Example
curl -X POST https://example.com/api/v1/addbannedip \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "ip=203.0.113.7"
deactivatemodule¶
Switch a module off.
POST /api/v1/deactivatemodule
Permission: manage_settings
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
moduleType |
string | yes | server, gateway, registrar, ssl or addon. |
moduleName |
string | yes | The module name. |
Response
| Field | Description |
|---|---|
result |
success |
moduleType |
string |
moduleName |
string |
active |
boolean |
Errors
| Status | When |
|---|---|
| 404 | No such module is installed. |
| 422 | A server or SSL module that is in use stays on. |
Example
curl -X POST https://example.com/api/v1/deactivatemodule \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "moduleType=gateway" \
--data-urlencode "moduleName=banktransfer"
decryptpassword¶
Decrypt a value (not available).
POST /api/v1/decryptpassword
Permission: manage_settings
Not available
Always answers 501, for the same reason as encryptpassword.
deleteannouncement¶
Delete an announcement.
POST /api/v1/deleteannouncement
Permission: manage_announcements
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
announcementid |
integer | yes | The announcement. |
Response
| Field | Description |
|---|---|
result |
success |
Errors
| Status | When |
|---|---|
| 404 | No announcement with that id. |
Example
curl -X POST https://example.com/api/v1/deleteannouncement \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "announcementid=1"
encryptpassword¶
Encrypt a value (not available).
POST /api/v1/encryptpassword
Permission: manage_settings
Not available
Always answers 501. Encrypting with the application key through the API was withdrawn: the same key protects the database.
getactivitylog¶
List the activity log.
GET /api/v1/getactivitylog
Permission: view_activity_log
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date |
date | no | Only entries from this day (YYYY-MM-DD). |
user |
string | no | Only entries written by this user name. |
limitstart |
integer | no | Where the page starts. Default 0. |
limitnum |
integer | no | Page size, 1 to 250. Default 25. |
Response
| Field | Description |
|---|---|
result |
success |
totalresults |
integer: rows matching the filters |
startnumber |
integer: where this page starts |
numreturned |
integer: rows on this page |
data |
array: the rows |
Example
curl -G https://example.com/api/v1/getactivitylog \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getadmindetails¶
Get a staff account (the caller by default).
GET /api/v1/getadmindetails
Permission: manage_staff
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
adminid |
integer | no | The staff account. Left out: the owner of the credential. |
Response
| Field | Description |
|---|---|
result |
success |
admin |
object: the staff account with its role |
Errors
| Status | When |
|---|---|
| 404 | No staff account with that id. |
Example
curl -G https://example.com/api/v1/getadmindetails \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getadminusers¶
List the staff accounts.
GET /api/v1/getadminusers
Permission: manage_staff
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
admins |
array of staff accounts, each with its role |
Example
curl -G https://example.com/api/v1/getadminusers \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getannouncements¶
List the published announcements.
GET /api/v1/getannouncements
Permission: manage_announcements
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
limitstart |
integer | no | Where the page starts. Default 0. |
limitnum |
integer | no | Page size, 1 to 250. Default 25. |
Response
| Field | Description |
|---|---|
result |
success |
totalresults |
integer: rows matching the filters |
startnumber |
integer: where this page starts |
numreturned |
integer: rows on this page |
data |
array: the rows |
Note
Published announcements only, newest first.
Example
curl -G https://example.com/api/v1/getannouncements \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getautomationlog¶
List the activity log (automation).
GET /api/v1/getautomationlog
Permission: view_activity_log
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
date |
date | no | Only entries from this day (YYYY-MM-DD). |
user |
string | no | Only entries written by this user name. |
limitstart |
integer | no | Where the page starts. Default 0. |
limitnum |
integer | no | Page size, 1 to 250. Default 25. |
Response
| Field | Description |
|---|---|
result |
success |
totalresults |
integer: rows matching the filters |
startnumber |
integer: where this page starts |
numreturned |
integer: rows on this page |
data |
array: the rows |
Note
The same log as getactivitylog.
Example
curl -G https://example.com/api/v1/getautomationlog \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getconfigurationvalue¶
Read a setting.
GET /api/v1/getconfigurationvalue
Permission: view_system
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
setting |
string | yes | The setting name, as stored (for example CompanyName). |
Response
| Field | Description |
|---|---|
result |
success |
setting |
string |
value |
string or null |
Errors
| Status | When |
|---|---|
| 403 | The setting holds a credential: any name containing password, secret, token, key, access hash, credential or sid. |
Example
curl -G https://example.com/api/v1/getconfigurationvalue \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "setting=CompanyName"
getemails¶
List the mail sent to clients.
GET /api/v1/getemails
Permission: list_clients
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
userid |
integer | no | Only mail sent to this client. |
limitstart |
integer | no | Where the page starts. Default 0. |
limitnum |
integer | no | Page size, 1 to 250. Default 25. |
Response
| Field | Description |
|---|---|
result |
success |
totalresults |
integer: rows matching the filters |
startnumber |
integer: where this page starts |
numreturned |
integer: rows on this page |
data |
array: the rows |
Note
The log of mail sent to clients, newest first.
Example
curl -G https://example.com/api/v1/getemails \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getemailtemplates¶
List the email templates.
GET /api/v1/getemailtemplates
Permission: manage_email_templates
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
templates |
array of every email template |
Example
curl -G https://example.com/api/v1/getemailtemplates \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
gethealthstatus¶
Check system health and service status.
GET /api/v1/gethealthstatus
Permission: view_system
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
health |
object: status (ok|degraded), version (the API version, 1.0.0), laravel, php, database (ok, or the connection error), disk {total_bytes, free_bytes, used_bytes, used_percent}, memory {limit, current, peak}, timestamp |
Note
For an uptime monitor use GET /api/health instead: it needs no credential and answers only up or down.
Example
curl -G https://example.com/api/v1/gethealthstatus \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getmoduleconfigurationparameters¶
List the settings a module asks for.
GET /api/v1/getmoduleconfigurationparameters
Permission: view_system
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
moduleType |
string | yes | server, gateway, registrar, ssl or addon. |
moduleName |
string | yes | The module name. |
Response
| Field | Description |
|---|---|
result |
success |
moduleType |
string |
moduleName |
string |
parameters |
array of {name, label, type, required, options}: the settings the module asks for. Stored values are never returned. |
Errors
| Status | When |
|---|---|
| 404 | No such module is installed. |
Example
curl -G https://example.com/api/v1/getmoduleconfigurationparameters \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "moduleType=gateway" \
--data-urlencode "moduleName=banktransfer"
getmodulequeue¶
List server actions waiting to be retried.
GET /api/v1/getmodulequeue
Permission: list_services
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
status |
string | no | pending, completed, failed or cancelled. Default: pending and failed. |
limitstart |
integer | no | Where the page starts. Default 0. |
limitnum |
integer | no | Page size, 1 to 250. Default 25. |
Response
| Field | Description |
|---|---|
result |
success |
totalresults |
integer: rows matching the filters |
startnumber |
integer: where this page starts |
numreturned |
integer: rows on this page |
data |
array: the rows |
Note
Server actions waiting to be retried. Each row carries id, service_id, action, status, attempts, max_attempts, next_attempt_at, last_error, completed_at, created_at; the payload is never returned.
Example
curl -G https://example.com/api/v1/getmodulequeue \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getorderstatuses¶
Get available order status options.
GET /api/v1/getorderstatuses
Permission: view_system
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
statuses |
array of the order statuses configured here |
Example
curl -G https://example.com/api/v1/getorderstatuses \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getpaymentmethods¶
List the payment gateways clients can pay with.
GET /api/v1/getpaymentmethods
Permission: view_system
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
totalresults |
integer |
paymentmethods |
array of {module, displayname}: the gateways that are switched on and hold the keys they need |
Example
curl -G https://example.com/api/v1/getpaymentmethods \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getpermissionslist¶
List the staff permission keys.
GET /api/v1/getpermissionslist
Permission: view_system
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
permissions |
array of every permission key a staff role can be given |
Example
curl -G https://example.com/api/v1/getpermissionslist \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getproducts¶
List all products/packages in the system.
GET /api/v1/getproducts
Permission: list_products
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
pid |
integer | no | One product. |
gid |
integer | no | Only products in this product group. |
module |
string | no | Only products provisioned by this server module (for example panelica). |
Response
| Field | Description |
|---|---|
result |
success |
products |
array of products, each with its group and pricing |
Example
curl -G https://example.com/api/v1/getproducts \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getpromotions¶
List promotion codes.
GET /api/v1/getpromotions
Permission: manage_promotions
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
promotions |
array of every promotion code |
Example
curl -G https://example.com/api/v1/getpromotions \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getregistrars¶
List the installed registrar modules.
GET /api/v1/getregistrars
Permission: manage_registrars
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
registrars |
array of {module, displayname, active}: every installed registrar module and whether the domain search offers it |
Example
curl -G https://example.com/api/v1/getregistrars \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getservers¶
List the servers.
GET /api/v1/getservers
Permission: manage_servers
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
servers |
array of servers, each with its server groups |
Example
curl -G https://example.com/api/v1/getservers \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getstaffonline¶
List the staff signed in during the last 15 minutes.
GET /api/v1/getstaffonline
Permission: manage_staff
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
staff |
array of staff accounts that signed in during the last 15 minutes |
Example
curl -G https://example.com/api/v1/getstaffonline \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
getstats¶
Count clients, services, domains, invoices, orders, tickets and staff.
GET /api/v1/getstats
Permission: view_system
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
stats |
object: total_clients, active_clients, total_services, active_services, total_domains, total_invoices, unpaid_invoices, total_orders, pending_orders, total_tickets, open_tickets, total_admins |
Example
curl -G https://example.com/api/v1/getstats \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
gettodoitems¶
List to-do items.
GET /api/v1/gettodoitems
Permission: view_system
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
status |
string | no | Only items with this status. |
Response
| Field | Description |
|---|---|
result |
success |
items |
array of to-do items, newest first |
Example
curl -G https://example.com/api/v1/gettodoitems \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
gettodoitemstatuses¶
List the to-do statuses.
GET /api/v1/gettodoitemstatuses
Permission: view_system
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
statuses |
array: New, In Progress, Completed, Deferred |
Example
curl -G https://example.com/api/v1/gettodoitemstatuses \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
logactivity¶
Write an entry in the activity log.
POST /api/v1/logactivity
Permission: view_activity_log
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
description |
string | yes | The entry, up to 1000 characters. |
clientid |
integer | no | The client the entry is about. |
Response
| Field | Description |
|---|---|
result |
success |
Note
The entry is signed with the user name of the staff member the credential belongs to.
Example
curl -X POST https://example.com/api/v1/logactivity \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "description=example"
pnlcsdetails¶
Get installation details (version, company name).
GET /api/v1/pnlcsdetails
Permission: view_system
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
pnlcs |
object: version (the API version, 1.0.0), company_name |
Example
curl -G https://example.com/api/v1/pnlcsdetails \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET"
resetpassword¶
Send a client login the password reset link.
POST /api/v1/resetpassword
Permission: manage_settings
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email |
no | The client login. Required unless id is sent. | |
id |
integer | no | The login (user) id. Required unless email is sent. |
One of email or id is required.
Response
| Field | Description |
|---|---|
result |
success |
email |
string: the address the reset link was sent to |
Errors
| Status | When |
|---|---|
| 404 | No client login has that address. |
Note
Sends the same link as the Forgot password form. The password itself is never set or returned.
Example
curl -X POST https://example.com/api/v1/resetpassword \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "email=client@example.com"
sendadminemail¶
Send an email to the staff.
POST /api/v1/sendadminemail
Permission: manage_email_templates
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
customsubject |
string | yes | Up to 255 characters. |
custommessage |
string | yes | The body. |
deptid |
integer | no | Only the staff who handle this support department. |
Response
| Field | Description |
|---|---|
result |
success |
recipients |
integer: how many staff members it was queued for |
Note
Goes to every active staff member with an email address, or to those assigned to deptid.
Example
curl -X POST https://example.com/api/v1/sendadminemail \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "customsubject=example" \
--data-urlencode "custommessage=example"
sendemail¶
Send a client a template or custom email.
POST /api/v1/sendemail
Permission: manage_email_templates
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
messagename |
string | no | A template, one of: invoice created, invoice payment confirmation, invoice reminder, invoice overdue, service welcome email, service suspension, service unsuspension, service termination, order confirmation, domain registration confirmation, domain renewal reminder, account signup email. Required unless customsubject is sent. |
id |
integer | yes | The record the mail is about: an invoice, service, order, domain or client id, as the template or customtype needs. |
customsubject |
string | no | Write the mail yourself instead of using a template. Required unless messagename is sent. |
custommessage |
string | no | The body, when customsubject is sent. |
customtype |
string | no | What id points at for a custom mail: general (a client, the default), invoice, product (a service) or domain. |
One of messagename or customsubject is required.
Response
| Field | Description |
|---|---|
result |
success |
recipient |
string: the address the mail was queued for |
Errors
| Status | When |
|---|---|
| 404 | No record with that id. |
| 422 | The template cannot be sent on demand, or the client has no email address. |
Note
A template mail is built exactly as the event that normally sends it builds it, in the client language. Mail switched off in the settings stays off.
Example
curl -X POST https://example.com/api/v1/sendemail \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "messagename=invoice reminder" \
--data-urlencode "id=42"
setconfigurationvalue¶
Change a setting.
POST /api/v1/setconfigurationvalue
Permission: manage_settings
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
setting |
string | yes | The setting name. |
value |
string | yes | The new value. |
Response
| Field | Description |
|---|---|
result |
success |
Errors
| Status | When |
|---|---|
| 403 | The setting holds a credential (see getconfigurationvalue). |
Note
The setting stays in the group its settings screen reads it from; a new name is created in the general group.
Example
curl -X POST https://example.com/api/v1/setconfigurationvalue \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "setting=CompanyName" \
--data-urlencode "value=example"
triggernotificationevent¶
Send a custom notification.
POST /api/v1/triggernotificationevent
Permission: manage_settings
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
title |
string | yes | Up to 255 characters. |
message |
string | yes | Up to 4000 characters. |
url |
url | no | A link to add to the notification. |
notification_identifier |
string | no | Your own label for the notification. |
Response
| Field | Description |
|---|---|
result |
success |
event |
string: api.custom |
rules |
integer: how many active notification rules the event reached |
Note
Delivered through the channels set up for the api.custom event under Setup > Notification Channels (email, Slack, webhook, Telegram). With no rule for it, nothing is sent and rules is 0.
Example
curl -X POST https://example.com/api/v1/triggernotificationevent \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "title=example" \
--data-urlencode "message=example"
updateadminnotes¶
Replace the admin notes on a client.
POST /api/v1/updateadminnotes
Permission: edit_clients
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
clientid |
integer | yes | The client. |
notes |
string | no | The admin notes. Replaces what was there. |
Response
| Field | Description |
|---|---|
result |
success |
clientid |
integer |
Errors
| Status | When |
|---|---|
| 404 | No client with that id. |
Example
curl -X POST https://example.com/api/v1/updateadminnotes \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "clientid=1"
updateannouncement¶
Update an announcement.
POST /api/v1/updateannouncement
Permission: manage_announcements
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
announcementid |
integer | yes | The announcement. |
title |
string | no | Up to 255 characters. |
announcement |
string | no | The text. |
published |
boolean | no | Publish or unpublish. |
Response
| Field | Description |
|---|---|
result |
success |
Errors
| Status | When |
|---|---|
| 404 | No announcement with that id. |
Example
curl -X POST https://example.com/api/v1/updateannouncement \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "announcementid=1"
updatemoduleconfiguration¶
Change a module's settings.
POST /api/v1/updatemoduleconfiguration
Permission: manage_settings
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
moduleType |
string | yes | gateway, registrar, ssl or addon. Server modules keep their settings on each server. |
moduleName |
string | yes | The module name. |
parameters |
object | yes | parameters[name]=value for each setting to change, up to 50, each a string of at most 8192 characters. |
Response
| Field | Description |
|---|---|
result |
success |
moduleType |
string |
moduleName |
string |
updated |
array of the setting names written |
Errors
| Status | When |
|---|---|
| 403 | The staff account lacks the permission the module settings screen asks for: manage_gateways, manage_registrars, manage_servers (SSL) or manage_products (addons). |
| 404 | No such module is installed. |
| 422 | moduleType is server. |
Note
A blank value for a password field keeps the stored one, as on the settings screen.
Example
curl -X POST https://example.com/api/v1/updatemoduleconfiguration \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "moduleType=gateway" \
--data-urlencode "moduleName=stripe" \
--data-urlencode "parameters[testMode]=0"
updatetodoitem¶
Update a to-do item.
POST /api/v1/updatetodoitem
Permission: manage_settings
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
itemid |
integer | yes | The to-do item. |
title |
string | no | Up to 255 characters. |
description |
string | no | The details. |
status |
string | no | New, In Progress, Completed or Deferred (any letter case). |
due_date |
date | no | YYYY-MM-DD, or empty to clear it. |
admin |
string | no | The staff member it is assigned to. |
Response
| Field | Description |
|---|---|
result |
success |
Errors
| Status | When |
|---|---|
| 404 | No item with that id. |
Example
curl -X POST https://example.com/api/v1/updatetodoitem \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "itemid=1"
validatelogin¶
Validate client login credentials.
POST /api/v1/validatelogin
Permission: view_clients
Parameters
| Name | Type | Required | Description |
|---|---|---|---|
email |
yes | The client login. | |
password2 |
string | yes | The password to check. |
Response
| Field | Description |
|---|---|
result |
success |
userid |
integer: the login that matched |
Errors
| Status | When |
|---|---|
| 401 | The address and password do not match a client login. |
Example
curl -X POST https://example.com/api/v1/validatelogin \
-H "X-API-Key: $PNLCS_IDENTIFIER" \
-H "X-API-Secret: $PNLCS_SECRET" \
--data-urlencode "email=client@example.com" \
--data-urlencode "password2=example"
whmcsdetails¶
Get installation details (WHMCS name).
GET /api/v1/whmcsdetails
Permission: view_system
Parameters
None.
Response
| Field | Description |
|---|---|
result |
success |
pnlcs |
object: version, company_name |
Note
The same call as pnlcsdetails, under the name WHMCS clients use.
Example