Skip to content
Inkbox

Inkbox

BlogContactDocs
GuidesAPI Reference

Ctrl K

GuidesAPI Reference

Jump to

Manage Tunnels

CRUD plus a 24-hour soft-delete grace window for tunnel resources. See the Tunnels API overview for naming rules, lifecycle states, and TLS modes.


Create tunnel POST

POST /tunnels

Create a new tunnel. The response includes a connect_secret shown once — store it securely.

  • tls_mode: "edge" (default): the tunnel is active immediately and routable at {tunnel_name}.inkboxwire.com.
  • tls_mode: "passthrough": the tunnel starts in awaiting_cert. You must then submit a CSR via /sign-csr to transition to active.

Rate-limited to 10 successful creates per organization per day.

Request body

FieldTypeRequiredDescription
tunnel_namestringYesSubdomain label. 3–63 chars, lowercase a–z, 0–9, hyphens; must start and end with alphanumeric; no consecutive hyphens. Globally unique within the environment.
descriptionstring | nullNoFree-form description (max 1000 chars). For your own reference.
tls_modestringNo"edge" (default) or "passthrough". Immutable after creation.

Request example

JSONJSON

Response (201)

JSONJSON

Error responses

StatusDescription
409tunnel_name is already taken or reserved
422tunnel_name violates naming rules, or description exceeds 1000 chars
429Daily create rate limit exceeded

Code examples


List tunnels GET

GET /tunnels

List all tunnels in the caller's organization (excludes deleted). Each entry includes a live currently_connected flag.

Response (200)

JSONJSON

Code examples


Get tunnel GET

GET /tunnels/{tunnel_id}

Fetch a single tunnel by ID. Includes a live currently_connected flag.

Path parameters

ParameterTypeDescription
tunnel_idUUIDTunnel ID

Code examples


Update tunnel PATCH

PATCH /tunnels/{tunnel_id}

Update the tunnel's description. tunnel_name and tls_mode are immutable — create a new tunnel if you need a different name or mode.

Path parameters

ParameterTypeDescription
tunnel_idUUIDTunnel ID

Request body

FieldTypeRequiredDescription
descriptionstringNoNew description (max 1000 chars). Omit to leave unchanged.

Code examples


Delete tunnel DELETE

DELETE /tunnels/{tunnel_id}

Move a tunnel into a 24-hour delete grace window. Inbound traffic stops immediately and status flips to delete_pending. The tunnel name stays reserved for your organization for 24 hours; after that, the tunnel is deleted and the name is released.

To undo within the grace window, call POST /tunnels/{id}/restore. Idempotent — calling delete on a delete_pending tunnel is a no-op.

Path parameters

ParameterTypeDescription
tunnel_idUUIDTunnel ID

Response (200)

Returns the updated Tunnel object. status is delete_pending and restore_deadline_at is set to 24 hours from now.

Code examples


Restore tunnel POST

POST /tunnels/{tunnel_id}/restore

Undo a delete_pending deletion during the 24-hour grace window.

  • edge tunnels return to active.
  • passthrough tunnels return to active if a still-valid signed cert is on file; otherwise awaiting_cert.

Path parameters

ParameterTypeDescription
tunnel_idUUIDTunnel ID

Error responses

StatusDescription
409Tunnel is not in delete_pending state (e.g. already finalized as deleted, or grace window expired)

Code examples


Force-delete tunnel DELETE

DELETE /tunnels/{tunnel_id}/force

Skip the 24-hour grace window and finalize a delete_pending tunnel immediately. The name is released for re-use right away.

Auth: API key or Clerk JWT only. The grace window exists to undo accidental deletes; force-finalize bypasses that net.

Path parameters

ParameterTypeDescription
tunnel_idUUIDTunnel ID

Error responses

StatusDescription
403Caller is not an admin (scoped agent keys cannot force-delete)
409Tunnel is not in delete_pending state — call regular DELETE first

Code examples


Tunnel object

FieldTypeDescription
idUUIDUnique tunnel identifier
organization_idstringOwning organization
tunnel_namestringSubdomain label. Hostname is {tunnel_name}.inkboxwire.com. Immutable.
descriptionstring | nullOptional free-form description
tls_modestring"edge" or "passthrough". Immutable.
cert_pemstring | nullSigned cert PEM (passthrough only, after first /sign-csr)
cert_fingerprint_sha256string | nullSHA-256 fingerprint of cert_pem, useful for monitoring rotations
cert_expires_atstring | nullISO 8601 expiry of cert_pem. Renew before this date.
statusstringawaiting_cert, active, delete_pending, or deleted
last_connected_atstring | nullISO 8601 timestamp of the most recent agent connection
last_connected_ip_addrstring | nullClient IP recorded at the most recent agent connection
restore_deadline_atstring | nullSet only while status="delete_pending". After this UTC timestamp, restore returns 409 and the tunnel finalizes to deleted.
currently_connectedbooleantrue if at least one agent connection is currently registered
created_atstringISO 8601
updated_atstringISO 8601

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website

Inkbox

Copyright © 2026 Inkbox

This site is protected by reCAPTCHA.

Google Privacy Policy and Terms of Service apply.

Website

Manage Tunnels