---
title: "Add monitored accounts"
canonical_url: "https://tweetstream.io/docs/api/add-accounts"
last_updated: 2026-11-05
---

# Add monitored accounts

Add one or more monitored X/Twitter accounts.

Canonical URL: https://tweetstream.io/docs/api/add-accounts

## `POST /api/add-account`

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

## Authorization

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

## Body

| Name | Type | Description |
| --- | --- | --- |
| `accounts` | `string \| string[]`, required |  |

### Body example

```json
{
  "accounts": [
    "marketdesk",
    "realDonaldTrump"
  ]
}
```

## Response fields

| Name | Type | Description |
| --- | --- | --- |
| `action` | `enum<string>`, required |  |
| `error` | `string \| null`, required |  |
| `requestId` | `string`, required |  |
| `results` | `object[]`, required |  |
| `results.input` | `string`, required |  |
| `results.message` | `string` |  |
| `results.state` | `enum<string>`, required |  |
| `summary` | `object`, required |  |
| `summary.failed` | `integer`, required |  |
| `summary.succeeded` | `integer`, required |  |
| `summary.total` | `integer`, required |  |

## Responses

| Status | Description | Headers |
| --- | --- | --- |
| `200` | Success |  |
| `207` | Some requested account operations succeeded and some failed |  |
| `400` | Invalid request |  |
| `401` | Missing or invalid API key |  |
| `403` | The authenticated account cannot use this capability |  |
| `429` | Too many handle requests | `Retry-After` |
| `500` | The request could not be completed |  |
| `503` | Account management is temporarily unavailable |  |

### 200

```json
{
  "action": "follow",
  "error": "<string>",
  "requestId": "<string>",
  "results": [
    {
      "input": "<string>",
      "message": "<string>",
      "state": "added"
    }
  ],
  "summary": {
    "failed": 0,
    "succeeded": 0,
    "total": 0
  }
}
```

### 207

```json
{
  "action": "follow",
  "error": "<string>",
  "requestId": "<string>",
  "results": [
    {
      "input": "<string>",
      "message": "<string>",
      "state": "added"
    }
  ],
  "summary": {
    "failed": 0,
    "succeeded": 0,
    "total": 0
  }
}
```

### 400

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

### 401

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

### 403

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

### 429

```json
{
  "action": "follow",
  "error": "<string>",
  "requestId": "<string>",
  "results": [
    {
      "input": "<string>",
      "message": "<string>",
      "state": "added"
    }
  ],
  "summary": {
    "failed": 0,
    "succeeded": 0,
    "total": 0
  }
}
```

### 500

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

### 503

```json
{
  "action": "follow",
  "error": "<string>",
  "requestId": "<string>",
  "results": [
    {
      "input": "<string>",
      "message": "<string>",
      "state": "added"
    }
  ],
  "summary": {
    "failed": 0,
    "succeeded": 0,
    "total": 0
  }
}
```

## Code samples

### cURL

```bash
curl --request POST \
  --url https://api.tweetstream.io/api/add-account \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "accounts": [
    "marketdesk",
    "realDonaldTrump"
  ]
}'
```

### JavaScript

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

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

### Python

```python
import os
import requests

response = requests.post(
    "https://api.tweetstream.io/api/add-account",
    headers={"Authorization": f"Bearer {os.environ['TWEETSTREAM_API_KEY']}"},
    json={
        "accounts": [
            "marketdesk",
            "realDonaldTrump",
        ],
    },
)

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