---
title: "Close the client connection."
method: DELETE
path: "/api/hubs/{hub}/connections/{connectionId}"
tags: ["webpubsub"]
---

# Close the client connection.

`DELETE /api/hubs/{hub}/connections/{connectionId}`

Close the client connection.

## Path parameters

- `hub` string, required
- `connectionId` string, required

## Query parameters

- `api-version` string, required
- `reason` string

## Response `204`

There is no content to send for this request, but the headers may be useful.

## Other responses

- `default` — The error response.

## Changes

- **2026-07-13** (2021-05-01-preview) `3c12a9fc6305` — 1 info
  - api operation id `WebPubSub_CloseConnection` removed and replaced with `CloseConnection`
- **2026-07-13** (2021-05-01-preview) `db70e5df6e15` — 2 breaking, 1 info
  - the `query` request parameter `api-version` became required
  - removed the success response with the status `200`
  - added the success response with the status `204`
- **2021-07-20** (2021-05-01-preview) `bfc2919307de` — 1 info
  - api operation id `WebPubSub_CloseClientConnection` removed and replaced with `WebPubSub_CloseConnection`
- **2021-04-21** (2021-05-01-preview) `5c057b21a138` — 1 breaking, 1 warning, 3 info
  - removed the success response with the status `204`
  - the optional response header `x-ms-error-code` removed for the status `default`
  - api operation id `CloseConnection` removed and replaced with `WebPubSub_CloseClientConnection`
  - the `query` request parameter `api-version` became optional
  - …1 more

[Change history](https://skmtc.dev/azure/apis/webpubsub/changes/api/hubs/:hub/connections/:connectionId/delete.md)

---

[API](https://skmtc.dev/azure/apis/webpubsub.md) · [All operations](https://skmtc.dev/azure/apis/webpubsub/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/azure/webpubsub/revisions/3c12a9fc6305/schema)
