Feature Requests
Share ideas, discuss and vote on requests from other users in community

Custom API Support

Matthew Eli shared this idea 1 year ago
Under Consideration

Using information such as the link below provides, one can create custom APIs for WHMCS without much trouble, but there is no documentation from WHMCS for doing so. Additionally, any custom APIs are not exposed via the new API Roles area so they are more troublesome to implement. The ability to support this feature is already present in WHMCS; it's just a matter of providing documentation and at least one more function being exposed to add strings to the API roles list. Luckily, other people have documented it well enough to get started:


Feature request in short:

  • Support custom API directives by providing appropriate documentation
  • Provide patch notes for any changes made which might affect custom API implementations and standards
  • Allow custom API directives to be listed in the API Roles area in 7.4+

Currently it is possible to manipulate the API role in the database to add local support for custom APIs, but this is not desirable and may be patched in the future to remove support for non-standard API directives. Also, it would probably be preferred to hook this into plugins in some way so plugins can register functions with the API instead of the unsupported method using files in the api directory.

Comments (7)


Hi Matthew,

Thanks for your suggestions. Just to clarify, that custom APIs commands are currently not supported or encouraged, which is why there is no developer documentation.


I am 100% behind this.

Unfortunately there are certain circumstances that WHMCS simply doesn't provide support for(some very basic things infact).

However up until now there has been support from developers who have written custom API code to fill the missing functionality, and the suggestion of using a module is insufficient if the documentation is not completely comprehensive(which it is not).

Not sure why this feature was limited in 7.4 without a suitable alternative being provided.

Something as simple as providing a PDF copy of an invoice that was only available via a custom api script has now been broken.

I believe a resolution to this issue should be pushed through asap.

A better way to go about this would have been to phase in the API roles, with support for custom API's and then provided developer documentation on how to convert an API into a hook/module/etc.


I support this 100%.

I've been working on an App that communicates with WHMCS via API. It turned out that some of the required fields/functionality is not currently present and I built a custom API (7.4, 7.5). Now it turned out that valid permissions are required. But, I'm not able to add that permission as it is not listed in API Roles and it is not documented anywhere. It is a shame.



We view the API functions we distribute and document as a commitment to maintain an element of backwards and forwards compatibility across versions, and are committed to maintaining and developing the API to help meet users needs.

I'd be interested to learn about the kind of custom API commands you have found it necessary to implement, so encourage you to submit feature requests for those.


Hi John,

Just as a follow up comment to this, I actually found a bug in one of the developed API's that WHMCS let out into the wild with the GetTLDPricing about 12months ago; so as much as there's a commitment to good code, occassionally things slip through. Which prompts me to say, if WHMCS are able to distribute something with the risk that something won't work, let the developers on here use their own code and if something breaks it's on them to repair it.

One request that I've seen time and time again is the PDF Invoices via API, it's been an 'under consideration feature for 5+years'. I understand they are created on the fly however there's no reason that this can't be extended into an API;

Another ridiculous oversight is the inability to do a forgotten password request via the API, it should have been the second thing written after the validate login API call? Defies logic to think that a user has to access the WHMCS interface to request a password reset when I've tried to keep them on my main page?

Just my two cents.



There are 2 flaws in your logic.

  1. Feature request for API commands do not receive many votes because a considerably smaller portion of your userbase actually uses the API. So, if features are selected by votes alone, your API gets neglected, which is what has happened.
  2. The current API implementation is so limited I cannot even put addon prices on my company website without having to manually put them in because there is a GetProducts but no GetAddons.



Thanks for your comment.

I found that there is no endpoint to get all admins, or get tickets assigned to an admin.