> ## 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.

# Update Endpoint

> This endpoint updates an existing endpoint's url. 

<Note>
  This will only apply to newly created messages. All messages published before
  this endpoint was updated will still use the old url.
</Note>

## Request

<ParamField path="endpointId" type="string" required>
  The id of the endpoint
</ParamField>

## Request Parameters

<ParamField body="url" type="string" required>
  The new url of the endpoint
</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 PUT https://qstash.upstash.io/v1/endpoints/:endpointId \
    -H "Authorization: Bearer <token>" \
    -d { "url" : "https://www.google.com" }
  ```
</RequestExample>

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