Skip to content
Inkbox

Inkbox

DocsPricingBlogContact
GuidesAPI Reference

Ctrl K

GuidesAPI Reference

Jump to

Tunnels API

A tunnel gives your agent a stable public URL — my-agent.inkboxwire.com — that routes inbound HTTP, WebSocket, and raw-TCP traffic from third parties to your agent over a single persistent connection. No public IP, firewall hole, or reverse proxy needed on your end.

Every agent identity owns exactly one tunnel; the tunnel name always matches the identity's handle. Tunnels are provisioned automatically when you create an identity and torn down when you delete it. The Tunnels API is read-mostly — list, get, update metadata, and (for passthrough) sign a CSR.

API base URL:

https://inkbox.ai/api/v1/tunnels

Quick start

Create an account and get your API key from the Inkbox console:

Get API key
X-API-Key: YOUR_API_KEY

Tunnel naming rules

The tunnel name is always the identity's agent_handle. Handles, and therefore tunnel names, are globally unique across all Inkbox customers.

  • 3–63 characters
  • lowercase letters, digits, and hyphens only
  • must start and end with a letter or digit
  • no consecutive hyphens

Some names are reserved; you'll get a 409 if you pick one. See Manage identities for handle creation.

Lifecycle states

A tunnel always has one of two status values:

StatusMeaning
awaiting_certPassthrough mode only. The tunnel is provisioned but you haven't signed a CSR yet.
activeRoutable end-to-end. Inbound traffic flows to your agent.

SDK enum mapping: the Python and TypeScript SDKs surface tunnel status through a TunnelStatus enum whose values are AWAITING_CERT and ACTIVE. The wire shape returned by the REST API uses the snake-case forms above.

TLS modes

Choose at creation time (via the nested tunnel.tls_mode on identity-create); immutable afterwards.

ModeWho terminates TLSSetupWhen to use
edge (default)Inkbox at our edge, with a managed certZero — active immediatelyMost users. Webhooks, real-time APIs, simple integrations.
passthroughYou, in your own agentSign a CSR via /sign-csr; we issue a 90-day certCompliance constraints requiring TLS to terminate inside your network, or client-side cert pinning.

See Passthrough TLS for the full passthrough flow.

Tunnel response fields

The tunnel object distinguishes two related host names:

  • public_host — per-tunnel public hostname (e.g. my-agent.inkboxwire.com). Use this for the public URL third parties hit.
  • zone — tunnel zone host (e.g. inkboxwire.com). The agent connects to https://{zone}/_system/connect here, not to https://{public_host}/_system/connect.

currently_connected reflects whether at least one agent connection is registered; last_connected_ip_addr captures the caller IP at the most recent /_system/hello. metadata is a customer-supplied free-form JSON object capped at 4 KB serialized.

Connecting your agent

The agent authenticates inbound connections on POST /_system/hello with two headers:

  • x-tunnel-id: <tunnel UUID> — which tunnel the agent is dialing.
  • x-api-key: <full API key> — the same REST API key the rest of the SDK uses.

Authorization rules:

  • An identity-scoped API key may connect a tunnel iff the tunnel's owning identity matches the key's scoped identity.
  • An admin-scoped API key may connect any tunnel in its org.

There is no per-tunnel secret. To rotate, rotate the customer's API key.

The Python and TypeScript SDKs ship a connect() helper that handles the persistent agent connection and graceful shutdown for you:

See the Tunnels capability guide for in-process handlers, WebSockets, and the full lifecycle.

Manage tunnels

List tunnels

GET

List all tunnels in your organization

/api/v1/tunnels

Get tunnel

GET

Get a single tunnel by ID, including live connection status

/api/v1/tunnels/{tunnel_id}

Update tunnel

PATCH

Update metadata (name and TLS mode are immutable)

/api/v1/tunnels/{tunnel_id}

Passthrough TLS

Additional resources

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

Y CombinatorBacked by Y Combinator
Tunnels API