---
title: "移除监控的 Instagram 账号"
canonical_url: "https://tweetstream.io/zh-cn/docs/api/remove-instagram-accounts"
last_updated: 2026-11-05
---

# 移除监控的 Instagram 账号

从监控列表移除最多 100 个 Instagram 账号。不在列表中的账号会标记为 `not_tracked`，并计为成功。

Canonical URL: https://tweetstream.io/zh-cn/docs/api/remove-instagram-accounts

## `DELETE /api/instagram/remove-account`

`https://api.tweetstream.io/api/instagram/remove-account`

## 授权

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| `Authorization` | `string`, 必填 | 使用 TweetStream API 密钥进行 Bearer 认证：`Bearer <key>`。 |

## 请求体

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| `accounts` | `string \| string[]`, 必填 | Instagram usernames, with or without a leading `@`. |

### 请求体示例

```json
{
  "accounts": [
    "nasa",
    "@natgeo"
  ]
}
```

## 响应字段

| 名称 | 类型 | 说明 |
| --- | --- | --- |
| `accounts` | `object[]`, 必填 |  |
| `accounts.username` | `string`, 必填 |  |
| `accounts.state` | `enum<string>`, 必填 | `live`: watched now. `pending`: added, and watching starts shortly. `paused`: over your current limit, so not watched. |
| `accounts.createdAt` | `string`, 必填 |  |
| `limit` | `integer`, 必填 |  |
| `removed` | `string[]`, 必填 |  |
| `rejected` | `object[]`, 必填 |  |
| `rejected.username` | `string`, 必填 |  |
| `rejected.reason` | `enum<string>`, 必填 |  |

## 响应

| 状态 | 说明 | 请求头 |
| --- | --- | --- |
| `200` | 成功 |  |
| `207` | 部分账号已变更，部分被拒绝 |  |
| `400` | 请求无效，或所有账号都被拒绝 |  |
| `401` | API key 缺失或无效 |  |
| `403` | 已认证的账号无法使用此功能 |  |
| `500` | 请求未能完成 |  |
| `503` | Instagram 账号管理暂时不可用 |  |

### 200

```json
{
  "accounts": [
    {
      "username": "<string>",
      "state": "live",
      "createdAt": "2026-01-01T00:00:00Z"
    }
  ],
  "limit": 0,
  "removed": [
    "<string>"
  ],
  "rejected": [
    {
      "username": "<string>",
      "reason": "invalid"
    }
  ]
}
```

### 207

```json
{
  "accounts": [
    {
      "username": "<string>",
      "state": "live",
      "createdAt": "2026-01-01T00:00:00Z"
    }
  ],
  "limit": 0,
  "removed": [
    "<string>"
  ],
  "rejected": [
    {
      "username": "<string>",
      "reason": "invalid"
    }
  ]
}
```

### 400

```json
{
  "accounts": [
    {
      "username": "<string>",
      "state": "live",
      "createdAt": "2026-01-01T00:00:00Z"
    }
  ],
  "limit": 0,
  "removed": [
    "<string>"
  ],
  "rejected": [
    {
      "username": "<string>",
      "reason": "invalid"
    }
  ]
}
```

### 401

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

### 403

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

### 500

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

### 503

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

## 代码示例

### cURL

```bash
curl --request DELETE \
  --url https://api.tweetstream.io/api/instagram/remove-account \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY" \
  --header 'Content-Type: application/json' \
  --data '{
  "accounts": [
    "nasa",
    "@natgeo"
  ]
}'
```

### JavaScript

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

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

### Python

```python
import os
import requests

response = requests.delete(
    "https://api.tweetstream.io/api/instagram/remove-account",
    headers={"Authorization": f"Bearer {os.environ['TWEETSTREAM_API_KEY']}"},
    json={
        "accounts": [
            "nasa",
            "@natgeo",
        ],
    },
)

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