---
title: "Broker only: release a TCP lease and connector presence"
method: POST
path: "/v1/internal/gateway/tcp/leases/close"
---

# Broker only: release a TCP lease and connector presence

`POST /v1/internal/gateway/tcp/leases/close`

## Request

- Base URL: `https://api.decionis.com`
- URL: `https://api.decionis.com/v1/internal/gateway/tcp/leases/close`
- Auth: HTTP bearer

Internal broker only; excluded from public SDK methods. Works while the feature is disabled. Idempotently release a missing lease; an existing lease requires its matching opaque token. This does not disable a route or authorize traffic. Strict JSON, 4096-byte bodies, 2000 requests/minute.

## Request body

- HostedGatewayTcpLeaseClose
  - `lease_id` string, uuid, required
  - `lease_token` string, required: Sensitive opaque capability; never put in a URL, log, analytics event or ordinary resource view.

## Response `200`

Private bounded result.

- HostedGatewayTcpLeaseClosed
  - `closed` true, required

## Other responses

- `400`: INVALID_REQUEST or ordinary validation refusal for missing, oversized, invalid or unexpected body fields.
- `401`: TCP_SERVICE_UNAUTHORIZED: dedicated service authentication failed; customer route, organization and account credentials are never accepted.
- `403`: TCP_AUTHORIZATION_REFUSED: an existing lease token does not match.
- `415`: JSON_CONTENT_TYPE_REQUIRED.
- `429`: Request rate or bounded connection capacity reached.
- `503`: TCP_UNAVAILABLE when a required dependency is unavailable or a gated operation is disabled. Internal service configuration may return TCP_SERVICE_UNAVAILABLE. Fail closed; no ticket, lease or traffic authority is granted.

---

[API](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api.md) · [All operations](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api/llms.txt) · [OpenAPI document](https://skmtc.dev/decionis/apis/decionis-policy-evaluation-api/revisions/357f5e459d0c?raw)
