---
title: "set_delivery"
canonical_url: "https://tweetstream.io/docs/api/agent-action-set-delivery"
last_updated: 2026-11-05
---

# set_delivery

Change what the stream delivers: default and per-account keyword filters and Discord webhooks, event types, affiliate alerts, Binance Square, news sources, the Instagram Discord destination, and the Truth Social, Robinhood Social and charity feeds. Tier read: the API key alone. The MCP tool of the same name needs the tweetstream:watchlist scope.

Canonical URL: https://tweetstream.io/docs/api/agent-action-set-delivery

## `POST /api/agent/actions/set_delivery`

`https://tweetstream.io/api/agent/actions/set_delivery`

## Authorization

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

## Body

| Name | Type | Description |
| --- | --- | --- |
| `changes` | `object[]`, required | an array of at most 20 item(s) |
| `changes.keywords` | `string[]`, required | Keyword filters; an empty list delivers every post. |
| `changes.kind` | `enum<string>`, required |  |

### Body example

```json
{
  "changes": [
    {
      "keywords": [
        "solana",
        "etf"
      ],
      "kind": "global_keywords"
    }
  ]
}
```

## Response fields

| Name | Type | Description |
| --- | --- | --- |
| `results` | `object[]`, required |  |
| `results.kind` | `enum<string>`, required |  |
| `results.outcome` | `enum<string>`, required |  |

## Responses

| Status | Description | Headers |
| --- | --- | --- |
| `200` | Success |  |
| `400` | The input does not match the action's schema (INVALID_REQUEST) |  |
| `401` | Missing or invalid API key |  |
| `403` | The request carried a foreign Origin |  |
| `429` | Rate limit reached (RATE_LIMITED); retry after retryAfterSeconds |  |
| `503` | Temporarily unavailable; retry later |  |

### 200

```json
{
  "results": [
    {
      "kind": "global_keywords",
      "outcome": "applied"
    }
  ]
}
```

### 400

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 401

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 403

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 429

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

### 503

```json
{
  "error": {
    "code": "INVALID_REQUEST",
    "message": "<string>",
    "reason": "not_offered",
    "retryAfterSeconds": 123
  },
  "next": {
    "message": "<string>",
    "action": "call_action",
    "method": "POST",
    "name": "<string>",
    "url": "<string>",
    "who": "agent"
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://tweetstream.io/api/agent/actions/set_delivery \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "changes": [
    {
      "keywords": [
        "solana",
        "etf"
      ],
      "kind": "global_keywords"
    }
  ]
}'
```

### JavaScript

```javascript
const response = await fetch("https://tweetstream.io/api/agent/actions/set_delivery", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TWEETSTREAM_API_KEY}`,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "changes": [
      {
        "keywords": [
          "solana",
          "etf"
        ],
        "kind": "global_keywords"
      }
    ]
  }),
});

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

### Python

```python
import os
import requests

response = requests.post(
    "https://tweetstream.io/api/agent/actions/set_delivery",
    headers={"Authorization": f"Bearer {os.environ['TWEETSTREAM_API_KEY']}"},
    json={
        "changes": [
            {
                "keywords": [
                    "solana",
                    "etf",
                ],
                "kind": "global_keywords",
            },
        ],
    },
)

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