# How to delete the sensu client from being monitered using Sensu API and How to add again using API

**URL:** <https://discourse.sensu.io/t/how-to-delete-the-sensu-client-from-being-monitered-using-sensu-api-and-how-to-add-again-using-api/667>\
**Category:** Sensu Classic (EOL)\
**Created:** [September 1, 2016, 2:00pm UTC](https://discourse.sensu.io/t/how-to-delete-the-sensu-client-from-being-monitered-using-sensu-api-and-how-to-add-again-using-api/667 "2016-09-01T14:00:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![IMRAN\_SHAIK](https://avatars.discourse-cdn.com/v4/letter/i/c89c15/32.png) [@IMRAN\_SHAIK](https://discourse.sensu.io/u/IMRAN_SHAIK)\
**Post date:** [September 1, 2016, 2:00pm UTC](https://discourse.sensu.io/t/how-to-delete-the-sensu-client-from-being-monitered-using-sensu-api-and-how-to-add-again-using-api/667/1 "2016-09-01T14:00:18Z")

</div>

**I am deleting the sensu-client using API as Below**

**curl -s -i -X DELETE [http://xxxxxxxx:4567/clients/clientname](http://xxxxxxxx:4567/clients/clientname)**

**HTTP/1.1 202 Accepted**

**Access-Control-Allow-Credentials: true**

**Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization**

**Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS**

**Access-Control-Allow-Origin: \***

**Connection: close**

**Content-length: 21**

**Content-type: application/json**

**{“issued”:1472737806}**

**But still I am able to see the client in UCHIWA and see the logs being generated …**

**Whats the issue here?**

**Can someone suggest me how to remove client using sensu API and add it again using Sensu API**

---

<div class="post-metadata">

**Author:** ![Caleb\_Hailey](https://avatars.discourse-cdn.com/v4/letter/c/8dc957/32.png) [@Caleb\_Hailey](https://discourse.sensu.io/u/Caleb_Hailey)\
**Post date:** [October 7, 2016, 4:28pm UTC](https://discourse.sensu.io/t/how-to-delete-the-sensu-client-from-being-monitered-using-sensu-api-and-how-to-add-again-using-api/667/2 "2016-10-07T16:28:48Z")

</div>

As long as a Sensu client is running it will send [client keepalives](https://sensuapp.org/docs/0.26/reference/clients.html#client-keepalives) on a 20-second interval. When the Sensu server receives a client keepalive for a client that is not in the client registry it automatically creates a new client. This could explain why a client you have deleted via the API is restored.

I hope this helps!

> **···**
>
> On Thursday, September 1, 2016 at 7:00:19 AM UTC-7, IMRAN SHAIK wrote:
> 
> > **I am deleting the sensu-client using API as Below**
> 
> > **curl -s -i -X DELETE [http://xxxxxxxx:4567/clients/clientname](http://xxxxxxxx:4567/clients/clientname)**
> 
> > **HTTP/1.1 202 Accepted**
> 
> > **Access-Control-Allow-Credentials: true**
> 
> > **Access-Control-Allow-Headers: Origin, X-Requested-With, Content-Type, Accept, Authorization**
> 
> > **Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS**
> 
> > **Access-Control-Allow-Origin: \***
> 
> > **Connection: close**
> 
> > **Content-length: 21**
> 
> > **Content-type: application/json**
> 
> > **{“issued”:1472737806}**
> 
> > **But still I am able to see the client in UCHIWA and see the logs being generated …**
> 
> > **Whats the issue here?**
> 
> > **Can someone suggest me how to remove client using sensu API and add it again using Sensu API**
