Source: https://fyno.docs.pageloop.ai/api-reference/user-properties/post-wsid-version-profiles-properties-unset

# Unset User Property

POST `https://api.fyno.io/v1/{WSID}/{version}/profiles/properties/unset`

This API enables you to unset (nullify) user properties of your users listed in your [User Profiles](../user-profiles-overview). If the specified distinct ID or property doesn't exist, it simply accepts the unset request and ignores it. This API can be used to unset all property data types: String, Number, Boolean, Date, List.

## Authorization

#### Authorization (header, string, required)

Enter your API Key. If you don't have it already, you can create one from the API Keys page within your Fyno account

## Path Parameters

#### WSID (path, string, required)

Enter your workspace ID. You can obtain this value from the API Keys page within your Fyno account.

#### version (path, enum (string), required) — allowed: live, test

Specify the version for which you would like to update the user property.

## Body

#### $unset (body, array of string, required)

Enter the property names to unset in an array

#### distinct\_id (body, string, required)

Enter the distinct ID that you use to identify the recipient.

## Response

#### 202

Request has been accepted and will be processed asynchronously.

#### request\_id (string, required)

#### 400

$unset object is empty

#### \_message (string, required)

#### status (string, required)

#### 401

API Key or Workspace ID is invalid. User is unauthorised.

#### \_message (string, required)

#### status (string, required)

#### Request

```bash cURL
curl -X POST 'https://api.fyno.io/v1/{WSID}/{version}/profiles/properties/unset' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"$unset": ["property_1", "property_2", "property_n"], "distinct_id": "XXXXXXXX"}'
```

```javascript JavaScript
const res = await fetch('https://api.fyno.io/v1/{WSID}/{version}/profiles/properties/unset', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"$unset": ["property_1", "property_2", "property_n"], "distinct_id": "XXXXXXXX"}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://api.fyno.io/v1/{WSID}/{version}/profiles/properties/unset',
    headers={'Authorization': 'Bearer <token>'},
    json={"$unset": ["property_1", "property_2", "property_n"], "distinct_id": "XXXXXXXX"}
)
data = res.json()
```

#### Response

```json 202
{
  "request_id": "XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX"
}
```

```json 400
{
  "_message": "$unset channel should have atleast one item in array",
  "status": "error"
}
```

```json 401
{
  "_message": "Invalid API details",
  "status": "error"
}
```
