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

# Remove Value From List

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

This API enables you to remove existing values from the list type properties of your users listed in your [User Profiles](../user-profiles-overview). If the specified distinct ID or list property doesn't exist, it simply accepts the remove request and ignores it.

**Note:** This API can only be used to remove values from list and can remove only one value from a property at a time. To unset (nullify) other property types, please use [Unset User Property API.](./unset-user-property)

## 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

#### $remove (body, object, required)

Enter the property name as JSON key and the value to remove as JSON value

#### 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

$remove 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/list-remove' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{"$remove": {"property_1": "some text", "property_2": 123, "property_3": 45.67, "property_4": "2020-10-01T18:30:00.000Z", "property_5": "2021-12-01", "property_n": "2021-11-01T13:35:00+02:00"}, "distinct_id": "XXXXXXXX"}'
```

```javascript JavaScript
const res = await fetch('https://api.fyno.io/v1/{WSID}/{version}/profiles/properties/list-remove', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({"$remove": {"property_1": "some text", "property_2": 123, "property_3": 45.67, "property_4": "2020-10-01T18:30:00.000Z", "property_5": "2021-12-01", "property_n": "2021-11-01T13:35:00+02:00"}, "distinct_id": "XXXXXXXX"}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://api.fyno.io/v1/{WSID}/{version}/profiles/properties/list-remove',
    headers={'Authorization': 'Bearer <token>'},
    json={"$remove": {"property_1": "some text", "property_2": 123, "property_3": 45.67, "property_4": "2020-10-01T18:30:00.000Z", "property_5": "2021-12-01", "property_n": "2021-11-01T13:35:00+02:00"}, "distinct_id": "XXXXXXXX"}
)
data = res.json()
```

#### Response

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

```json 400
{
  "_message": "$remove has object/keys that is not allowed",
  "status": "error"
}
```

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