> For the complete documentation index, see [llms.txt](https://docs.trust.enterprises/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.trust.enterprises/rest-api/topics/creating-a-new-topic.md).

# Creating a new topic

## Create new topic

<mark style="color:green;">`POST`</mark> `https://hedera-serverless-consensus.vercel.app/api/consensus/topic/:id`

This endpoint will create a new topic that can be used to send messages to for a consensus timestamp. As this is an authenticated endpoint, **401** errors will be shown on incorrect authentication keys.

#### Query Parameters

| Name                         | Type    | Description                                                                                 |
| ---------------------------- | ------- | ------------------------------------------------------------------------------------------- |
| memo                         | string  | A memo that will be added to the topic, this can also be an escaped JSON string.            |
| enable\_private\_submit\_key | boolean | Make sure that consensus messages can only be sent from the account that created the topic. |

#### Headers

| Name      | Type   | Description                                                      |
| --------- | ------ | ---------------------------------------------------------------- |
| x-api-key | string | The **API\_SECRET\_KEY** that is set in the clients environment. |

{% tabs %}
{% tab title="200 Topic created with a memo." %}

```
{
    "data": {
        "memo": "topic memo information",
        "topic": "0.0.16091"
    }
}
```

{% endtab %}

{% tab title="422 This occurs if any of the variables are invalid for the API to process" %}

```
{
    "errors": [
        "\"enable_private_submit_key\" must be a boolean"
    ]
}
```

{% endtab %}
{% endtabs %}
