# 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 %}


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.trust.enterprises/rest-api/topics/creating-a-new-topic.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
