# Delete a contact (/api/deleteContact)

Removes the contact and its group memberships. Scheduled messages to it
are cancelled first and their credit is returned. Messages already queued
still go out, and messages already sent stay in your history with the
address they went to.

Endpoint: DELETE /api/v1/contacts/{id}
Full URL: https://app.sendkuy.com/api/v1/contacts/{id}
- path parameter id (required): string — The prefixed id of the object.
- header parameter Idempotency-Key (optional): string — Any unique string, one per logical request. Retrying with the same key returns the first answer instead of doing the work twice, and answers with `Idempotent…
Success status: 200

cURL:

```bash
curl -X DELETE https://app.sendkuy.com/api/v1/contacts/con_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3 \
  -H "Authorization: Bearer sk_live_YOUR_API_KEY"
```

Node.js:

```ts
import { SendKuy } from 'sendkuy';

const sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

const result = await sendkuy.contacts.delete('con_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3');
```

PHP:

```php
<?php

use SendKuy\SendKuy;

$sendkuy = new SendKuy('sk_live_YOUR_API_KEY');

$result = $sendkuy->contacts()->delete('con_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3');
```

Python:

```python
import requests

response = requests.request(
    "DELETE",
    "https://app.sendkuy.com/api/v1/contacts/con_9cBe3A1H-SLhW5fONWZ32wb-IIio5Ts3",
    headers={"Authorization": "Bearer sk_live_YOUR_API_KEY"},
)

data = response.json()["data"]
```