Source: https://fyno.docs.pageloop.ai/api-reference/suppression-list/post-wsid-suppressions

# Add User to Suppression List

POST `https://api.fyno.io/v1/{WSID}/suppressions`

Add a user to the suppression list for a given channel.

**Note:** If both `distinct_id` and `destination` are provided, `distinct_id` takes precedence, and `destination` is ignored.

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

## Response

#### 200

Suppression list updated.

#### status (string)

#### \_message (string)

#### 400

Destination is invalid

#### status (string)

#### \_message (string)

#### 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}/suppressions' \
  -H 'Authorization: Bearer <token>' \
  -H 'Content-Type: application/json' \
  -d '{}'
```

```javascript JavaScript
const res = await fetch('https://api.fyno.io/v1/{WSID}/suppressions', {
  method: 'POST',
  headers: {
    'Authorization': 'Bearer <token>',
    'Content-Type': 'application/json',
  },
  body: JSON.stringify({}),
});
const data = await res.json();
```

```python Python
import requests

res = requests.post(
    'https://api.fyno.io/v1/{WSID}/suppressions',
    headers={'Authorization': 'Bearer <token>'},
    json={}
)
data = res.json()
```

#### Response

```json 200
{
  "status": "ok",
  "_message": "User has been added to the suppression!"
}
```

```json 400
{
  "status": "error",
  "_message": "Invalid destination for channel sms"
}
```

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