# Upsert URL Group and Endpoint

> Add an endpoint to a URL Group

## Endpoint

`POST https://qstash-{region}.upstash.io/v2/topics/{urlGroupName}/endpoints`

## Parameters

- `urlGroupName` (path, string, required): The name of your URL Group. If it doesn't exist yet, it will be created.

## Request body

- `endpoints` (object[], required)
  - `url` (string, required): The URL of the endpoint
  - `name` (string): Optional name for the endpoint

## Responses

### 200 - Endpoint(s) added successfully

## cURL

```bash
curl --request POST \
  --url https://qstash-{region}.upstash.io/v2/topics/{urlGroupName}/endpoints \
  --header 'Authorization: Bearer <token>' \
  --header 'Content-Type: application/json' \
  --data '{
    "endpoints": "<endpoints>"
  }'
```
