HTTP API

Deprovision Tunnel

Stop a session and its billing over the HTTP API.

Docs for LLMs

Close a session and stop its billing. Subdomains are easy to guess, so the call requires the session token: the token query parameter from the connectUrl in the provision response. Only the session's owner has it.

DELETE/api/agent/tunnels/:subdomain?token=<token>
JSON
{
  "subdomain": "tunnel-a1b2c3d4",
  "status": "deprovisioned"
}

Without a valid token the call returns 403 with { "error": "forbidden" }. otterkit stop makes this call for you.

Deprovision webhook endpoints explicitly. The server answers them, so they keep running and billing after the client disconnects, until their TTL. A tunnel stops billing as soon as its client disconnects. The same call stops a pulse, using the stopToken from its create response.