# Create Topic

`POST` `/v1/content/topics`

Create a new community topic on [Topics](https://longbridge.com/topics). Two content types are supported:

| Type | `title` | `body` format | Notes |
| ---------------- | ------------ | --------------- | ---------------------------------------------------------------------------------------------------------------------- |
| `post` (default) | Optional | Plain text only | Markdown syntax (e.g. `**bold**`, `# heading`) is NOT rendered — it appears as literal characters, similar to a tweet. |
| `article` | **Required** | Markdown | The server converts Markdown to HTML for display. Supports headers, tables, bold, code blocks, etc. |

Only users who have opened a **Longbridge account and hold assets** are allowed to publish community topics and replies via Longbridge Developers API or CLI. Returns `403` otherwise.

:::tip Tip
Stock symbols mentioned in the body (e.g. `700.HK`, `TSLA.US`) are automatically recognized and linked as related stocks by the platform. Use `tickers` to associate additional symbols not explicitly mentioned in the body.

⚠️ Do not abuse symbol linking to associate unrelated stocks. Content moderation may restrict publishing or mute the account.
:::

**Rate limit:** Max 3 topics per user per minute and 10 per 24 hours. Exceeding the limit returns `429`.

:::warning
⚠️ Rate limit thresholds are for reference only and may be adjusted by the platform at any time.
:::

## Parameters

### Request Body

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `title` | string | No | Topic title. Required when `topic_type` is `article`; optional for `post`. |
| `body` | string | Yes | Topic body. - For `post`: plain text only — Markdown is not rendered. - For `article`: Markdown is supported. |
| `topic_type` | string | No | Content type: `post` (plain text, default) or `article` (Markdown). |
| `tickers` | array | No | Related security symbols, format `{symbol}.{market}` (e.g. `["AAPL.US", "700.HK"]`). Maximum 10. **Note:** Symbols mentioned in the body (e.g. `700.HK`, `TSLA.US`) are automatically recognized and linked by the platform. Use `tickers` to associate additional symbols not explicitly mentioned in the body. |
| `hashtags` | array | No | Hashtag names (e.g. `["earnings", "fed"]`). Maximum 1. |

## Request Example

```bash
curl --request POST \
  --url 'https://openapi.longbridge.com/v1/content/topics' \
  --header 'Authorization: Bearer <access_token>' \
  --header 'Content-Type: application/json' \
  --data '{"title":"<title>","body":"<body>","topic_type":"<topic_type>","tickers":[],"hashtags":[]}'
```

## Response

### Response Properties

| Name | Type | Required | Description |
| --- | --- | --- | --- |
| `item` | object | Yes | Newly created topic details |
| `└ id` | string | Yes | Topic ID |
| `└ title` | string | No | Topic title |
| `└ description` | string | No | Plain-text summary (auto-generated from body) |
| `└ body` | string | No | Full body text (Markdown for `article`) |
| `└ topic_type` | string | No | Topic type. One of `article`, `post` |
| `└ tickers` | string[] | No | Associated security symbols |
| `└ hashtags` | string[] | No | Associated hashtag names |
| `└ images` | object[] | No | Image list |
| `└ ∟ url` | string | No | Original image URL |
| `└ ∟ sm` | string | No | Small thumbnail URL |
| `└ ∟ lg` | string | No | Large thumbnail URL |
| `└ likes_count` | int32 | No | Number of likes |
| `└ comments_count` | int32 | No | Number of replies |
| `└ views_count` | int32 | No | Number of views |
| `└ shares_count` | int32 | No | Number of shares |
| `└ detail_url` | string | No | Direct URL to the topic |
| `└ author` | object | No | Author information |
| `└ ∟ member_id` | string | No | Author member ID |
| `└ ∟ name` | string | No | Author display name |
| `└ ∟ avatar` | string | No | Author avatar URL |
| `└ created_at` | string | Yes | Unix timestamp (seconds) when the topic was created |
| `└ updated_at` | string | No | Unix timestamp (seconds) of last update |

### Response JSON Example

```json
{
  "code": 0,
  "message": "success",
  "data": {
    "item": {
      "id": "39304657",
      "title": "My View on AAPL",
      "topic_type": "article",
      "tickers": [
        "AAPL.US"
      ],
      "hashtags": [
        "earnings"
      ],
      "created_at": "1742000000"
    }
  }
}
```
