POST
/
v2
/
topics
/
{urlGroupName}
/
endpoints
curl -XPOST https://qstash.upstash.io/v2/topics/:urlGroupName/endpoints \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoints": [
      {
        "name": "endpoint1",
        "url": "https://example.com"
      },
      {
        "name": "endpoint2",
        "url": "https://somewhere-else.com"
      }
    ]
  }'
If the URL Group does not exist, it will be created. If the endpoint does not exist, it will be created.

Request

urlGroupName
string
required
The name of your URL Group (topic). If it doesn’t exist yet, it will be created.
endpoints
Array
required
The endpoints to add to the URL Group.

Response

This endpoint returns 200 if the endpoints are added successfully.
curl -XPOST https://qstash.upstash.io/v2/topics/:urlGroupName/endpoints \
  -H "Authorization: Bearer <token>" \
  -H "Content-Type: application/json" \
  -d '{
    "endpoints": [
      {
        "name": "endpoint1",
        "url": "https://example.com"
      },
      {
        "name": "endpoint2",
        "url": "https://somewhere-else.com"
      }
    ]
  }'