---
title: "Delete a contact"
description: "Permanently deletes a contact."
version: "v2"
---

> Documentation Index
> Fetch the complete documentation index at: https://dev.touchsms.com.au/llms.txt
> Use this file to discover all available pages before exploring further.

Path: touchSMS API › Contacts

`DELETE /v2/contacts/{contact}`

Permanently deletes a contact.

## Authentication

- `basicAuth`, http, header `Authorization`

## Path parameters

- `contact` (`deleteContact.path.contact`; integer, required) — Contact ID.

## Code samples

### cURL

```bash
curl --request DELETE \
  --url https://app.touchsms.com.au/api/v2/contacts/4040 \
  --header 'Authorization: Basic <credentials>'
```

### TypeScript

```typescript
const url = 'https://app.touchsms.com.au/api/v2/contacts/4040';
const options = {method: 'DELETE', headers: {Authorization: 'Basic <credentials>'}};

fetch(url, options)
  .then(res => res.json())
  .then(json => console.log(json))
  .catch(err => console.error(err));
```

### Python

```python
import requests

url = "https://app.touchsms.com.au/api/v2/contacts/4040"

headers = {"Authorization": "Basic <credentials>"}

response = requests.delete(url, headers=headers)

print(response.text)
```

## Responses

### 204

Contact deleted.

### 401

Missing, malformed or invalid API credentials.

#### Example

```json
{
  "message": "Unauthenticated."
}
```

- `message` (`deleteContact.response.401.message`; string, required)

### 403

The resource exists but does not belong to you, or you lack permission.

#### Example

```json
{
  "message": "This action is unauthorized."
}
```

- `message` (`deleteContact.response.403.message`; string, required)

### 404

The resource does not exist.

#### Example

```json
{
  "message": "Not Found"
}
```

- `message` (`deleteContact.response.404.message`; string, required)


Source: https://dev.touchsms.com.au/api/contacts/delete/index.md
