> ## Documentation Index
> Fetch the complete documentation index at: https://upstash-vector.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# Create Endpoint

> This endpoint creates a new endpoint and subscribe it to a topic.

## Request

<ParamField body="topicId" type="string">
  The id of the topic this endpoint subscribes to.

  Either `topicId` or `topicName` must be set
</ParamField>

<ParamField body="topicName" type="string">
  The name of the topic this endpoint subscribes to.

  Either `topicId` or `topicName` must be set
</ParamField>

<ParamField body="url" type="string" required>
  The url where all requests will be sent to.
</ParamField>

## Response

<ResponseField name="topicId" type="string" required>
  The id of the topic this endpoint subscribes to.

  Either `topicId` or `topicName` must be set
</ResponseField>

<ResponseField name="topicName" type="string" required>
  The name of the topic this endpoint subscribes to.

  Either `topicId` or `topicName` must be set
</ResponseField>

<ResponseField name="url" type="string" required>
  The url where all requests will be sent to.
</ResponseField>

<RequestExample>
  ```shell curl
  curl -X POST https://qstash.upstash.io/v1/endpoints \
    -H "Authorization: Bearer <token>" \
    -d {
         "topicId": "tpc_7EfEryZiheEKzpMuvjYdhhhbNNJA",
         "url": "https://www.google.com"
       }
  ```
</RequestExample>

<ResponseExample>
  ```json 200
  {
    "endpointId": "ept_6j7BNZus3ZyPy6P7QtLUMCC3Rq7h",
    "url": "https://www.upstash.com",
    "topicId": "tpc_7EfEryZiheEKzpMuvjYdhhhbNNJA"
  }
  ```
</ResponseExample>
