---
title: "Change an account's Discord webhook and keyword filters"
canonical_url: "https://tweetstream.io/docs/api/update-account-settings"
last_updated: 2026-11-05
---

# Change an account's Discord webhook and keyword filters

Change the Discord webhook and keyword filters for one tracked account. Omitted fields keep their saved value.

Canonical URL: https://tweetstream.io/docs/api/update-account-settings

## `PATCH /api/account-settings`

`https://api.tweetstream.io/api/account-settings`

## Authorization

| Name | Type | Description |
| --- | --- | --- |
| `Authorization` | `string`, required | Bearer authentication with your TweetStream API key: `Bearer <key>`. |

## Body

| Name | Type | Description |
| --- | --- | --- |
| `account` | `string`, required |  |
| `discordWebhook` | `string \| null` | A `https://discord.com/api/webhooks/...` or `https://discordapp.com/api/webhooks/...` URL, or `null` to use the global webhook. |
| `keywords` | `string[]` | Skip this account's posts whose text contains any of these words. |

### Body example

```json
{
  "account": "marketdesk",
  "keywords": [
    "solana",
    "etf"
  ]
}
```

## Response fields

| Name | Type | Description |
| --- | --- | --- |
| `account` | `string`, required |  |
| `discordWebhook` | `string \| null`, required |  |
| `keywords` | `string[]`, required |  |

## Responses

| Status | Description | Headers |
| --- | --- | --- |
| `200` | Success |  |
| `400` | Invalid request |  |
| `401` | Missing or invalid API key |  |
| `403` | The authenticated account cannot use this capability |  |
| `404` | The requested resource was not found |  |
| `500` | The request could not be completed |  |

### 200

```json
{
  "account": "<string>",
  "discordWebhook": "<string>",
  "keywords": [
    "<string>"
  ]
}
```

### 400

```json
{
  "error": "<string>"
}
```

### 401

```json
{
  "error": "<string>"
}
```

### 403

```json
{
  "error": "<string>"
}
```

### 404

```json
{
  "error": "<string>"
}
```

### 500

```json
{
  "error": "<string>"
}
```

## Code samples

### cURL

```bash
curl --request PATCH \
  --url https://api.tweetstream.io/api/account-settings \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "account": "marketdesk",
  "keywords": [
    "solana",
    "etf"
  ]
}'
```

### JavaScript

```javascript
const response = await fetch("https://api.tweetstream.io/api/account-settings", {
  method: "PATCH",
  headers: {
    Authorization: `Bearer ${process.env.TWEETSTREAM_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "account": "marketdesk",
    "keywords": [
      "solana",
      "etf"
    ]
  }),
});

console.log(response.status, await response.json());
```

### Python

```python
import os
import requests

response = requests.patch(
    "https://api.tweetstream.io/api/account-settings",
    headers={"Authorization": f"Bearer {os.environ['TWEETSTREAM_API_KEY']}"},
    json={
        "account": "marketdesk",
        "keywords": [
            "solana",
            "etf",
        ],
    },
)

print(response.status_code, response.json())
```
