---
title: "discord_community"
canonical_url: "https://tweetstream.io/docs/api/agent-action-discord-community"
last_updated: 2026-11-05
---

# discord_community

Act on the account's Discord: join the community server with the linked Discord account, check verification, or send a test billing reminder. Needs a recent email-code sign-in. Tier recent: the API key and X-TweetStream-Setup-Proof from an email code verified in the last 30 minutes. The MCP tool of the same name needs the tweetstream:settings scope.

Canonical URL: https://tweetstream.io/docs/api/agent-action-discord-community

## `POST /api/agent/actions/discord_community`

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

## Authorization

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

## Headers

| Name | Type | Description |
| --- | --- | --- |
| `X-TweetStream-Setup-Proof` | `string`, required | The setupProof returned by email verification. It lasts 30 minutes; after that, verify a new email code. |

## Body

| Name | Type | Description |
| --- | --- | --- |
| `kind` | `enum<string>`, required |  |

### Body example

```json
{
  "kind": "join_linked"
}
```

## Response fields

| Name | Type | Description |
| --- | --- | --- |
| `community` | `object`, required |  |
| `community.botInstalled` | `boolean`, required |  |
| `community.botInstallUrl` | `string`, required |  |
| `community.channelReady` | `boolean`, required |  |
| `community.communityInviteUrl` | `string`, required |  |
| `community.linked` | `boolean`, required |  |
| `community.membership` | `enum<string>`, required |  |
| `community.multipleLinked` | `boolean`, required |  |
| `community.onboardingRequired` | `boolean`, required |  |
| `community.required` | `boolean`, required | Whether this account is asked to join the TweetStream Discord community. Only a checkout whose status is community_required waits for it. |
| `community.verificationPending` | `boolean`, required |  |
| `community.verified` | `boolean`, required |  |
| `kind` | `enum<string>`, required |  |
| `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, or the setup proof is missing or expired (REVERIFY_EMAIL) |  |
| `403` | The request carried a foreign Origin |  |
| `429` | Rate limit reached (RATE_LIMITED); retry after retryAfterSeconds |  |
| `503` | Temporarily unavailable; retry later |  |

### 200

```json
{
  "community": {
    "botInstalled": true,
    "botInstallUrl": "<string>",
    "channelReady": true,
    "communityInviteUrl": "<string>",
    "linked": true,
    "membership": "member",
    "multipleLinked": true,
    "onboardingRequired": true,
    "required": true,
    "verificationPending": true,
    "verified": true
  },
  "kind": "join_linked",
  "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/discord_community \
  --header "Authorization: Bearer $TWEETSTREAM_API_KEY" \
  --header "X-TweetStream-Setup-Proof: $TWEETSTREAM_SETUP_PROOF" \
  --header 'Content-Type: application/json' \
  --data '{
  "kind": "join_linked"
}'
```

### JavaScript

```javascript
const response = await fetch("https://tweetstream.io/api/agent/actions/discord_community", {
  method: "POST",
  headers: {
    Authorization: `Bearer ${process.env.TWEETSTREAM_API_KEY}`,
    "X-TweetStream-Setup-Proof": process.env.TWEETSTREAM_SETUP_PROOF,
    "Content-Type": "application/json",
  },
  body: JSON.stringify({
    "kind": "join_linked"
  }),
});

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

### Python

```python
import os
import requests

response = requests.post(
    "https://tweetstream.io/api/agent/actions/discord_community",
    headers={"Authorization": f"Bearer {os.environ['TWEETSTREAM_API_KEY']}", "X-TweetStream-Setup-Proof": os.environ["TWEETSTREAM_SETUP_PROOF"]},
    json={
        "kind": "join_linked",
    },
)

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