Jump to content

How to delete a domain with API WHMCS?


aairedes

Recommended Posts

Hello, i want to delete a domain using the API of WHMCS. Only delete the domain, not the client.

 

I see in the API Release Domain, is this the right command i must to use?

 

The example is:

$postfields["action"] = "domainrelease";

$postfields["domainid"] = "1";

$postfields["newtag"] = "ENOM";

 

My question is:

 

if i haven't a new tag (because i want to delete only the domain), what i must to write?:

 

$postfields["action"] = "domainrelease";

$postfields["domainid"] = "1";

$postfields["newtag"] = "";

 

Is this right? Thanks

Link to comment
Share on other sites

  • 7 years later...

Its an old topic with no answer. Did find an answer ?

I am also looking for the API method to delete the domain from the system. Of course I can do it from tbldomains but I want the method.
Would be nice if with the same delete the delete is given to the registrar if still registered. 

Link to comment
Share on other sites

If you want to just put it in status "cancelled" in WHMCS, you can use  UpdateClientDomain:  https://developers.whmcs.com/api-reference/updateclientdomain/

If you want to delete it from WHMCS, removing the record from db, I guess you can't do it using API, and you need to write your own code.

If you want to delete the domain from the Registry (note: it's not possible for any TLD; few TLDs require you to leave the domain going to expire, because it's not allowed to delete them before expiration date), it's a matter of the Registrar Module you're using

 

Link to comment
Share on other sites

thx for your reply.

In fact we only/just want to get rid of old domains. 

I am often surprised  what basic functions are missing.  Using the systems delete function would be much better then doing it ourselfs in the DB but I guess this leaves me with no other choice 😞

 

Link to comment
Share on other sites

1 hour ago, weba said:

In fact we only/just want to get rid of old domains. 

I suggest you not to delete them, but just put them as "canceled" or "transferred away"

It happened several times in the past that we were asked for info about domains deleted or transferred away years before, and having removed them from our system would have been a mess or, at least, a great waste of time to recover requested info...

 

Link to comment
Share on other sites

8 minutes ago, Remitur said:

I suggest you not to delete them, but just put them as "canceled" or "transferred away"

It happened several times in the past that we were asked for info about domains deleted or transferred away years before, and having removed them from our system would have been a mess or, at least, a great waste of time to recover requested info...

 

You have a point with that.  But the downsize is that those domains are still visible in the client screen. With us they complain about that. I do understand that, special with the users with dozens of domains. 

Link to comment
Share on other sites

7 minutes ago, weba said:

You have a point with that.  But the downsize is that those domains are still visible in the client screen. With us they complain about that. I do understand that, special with the users with dozens of domains. 

A fix could be modify the template of client area ( clientareadomains.tpl ), changing the default...

By default, now cancelled and transferred away domains are included and visible (the user can filter them out, keeping only active domains, but he needs to do it on its own applying the filter).

It would be necessary to change this default, leaving cancelled and transferred domains not visible (but leaving to the user the function to filter them out...)

 

Link to comment
Share on other sites

7 hours ago, weba said:

In fact we only/just want to get rid of old domains.

If I may ask, why?  At this time WHMCS isn't charging per domain or per service.  If those old domains are set to an inactive state and client is inactive, it would not count against the client count. 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated