---
title: "Unassign users from a contact"
description: "Removes one or more team members from an existing contact."
---

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

Path: Zacx Public API › Contacts

`POST /users/unassign`

Removes one or more team members from an existing contact.

## Authentication

- `bearerAuth`, http, header `Authorization`

## Request body

- `unassignContactUsers.phoneNumber` (string, required) — The contact's phone number with country code.
  - example `"919999999990"`
- `unassignContactUsers.users` (array<string>, required) — Login phone numbers of the team members.
  - example `["919100110151"]`

## Example request

```json
{
  "phoneNumber": "919999999990",
  "users": [
    "919100110151"
  ]
}
```

## Code samples

### cURL

```curl
curl --request POST \
  --url https://api.zacx.io/v1/users/unassign \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '
{
  "phoneNumber": "919999999990",
  "users": [
    "919100110151"
  ]
}
'
```

### TypeScript

```typescript
const url = 'https://api.zacx.io/v1/users/unassign';
const options = {
  method: 'POST',
  headers: {'Content-Type': 'application/json', Authorization: 'Bearer <token>'},
  body: JSON.stringify({phoneNumber: '919999999990', users: ['919100110151']})
};

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

### Python

```python
import requests

url = "https://api.zacx.io/v1/users/unassign"

payload = {
    "phoneNumber": "919999999990",
    "users": ["919100110151"]
}
headers = {
    "Content-Type": "application/json",
    "Authorization": "Bearer <token>"
}

response = requests.post(url, json=payload, headers=headers)

print(response.text)
```

## Responses

### 200

The unassignment was processed.

#### Example

```json
{
  "status": "success",
  "message": "User successfully unassigned from the contact"
}
```

- `unassignContactUsers.response.200.status` (string, required)
- `unassignContactUsers.response.200.message` (string, required)
- `unassignContactUsers.response.200.code` (string, optional) — Present when the call succeeded but changed nothing, for example `TAG_ALREADY_ASSOCIATED`.

### 404

The contact or the user was not found.

#### Example

```json
{
  "status": "error",
  "code": "CONTACT_NOT_FOUND",
  "message": "The contact with given phoneNumber was not found."
}
```

- `unassignContactUsers.response.404.status` (string, required)
- `unassignContactUsers.response.404.code` (string, required) — Stable machine-readable error code.
- `unassignContactUsers.response.404.message` (string, required) — Human-readable explanation.


Source: https://zacx.io/api/contact/unassign-users/index.md
