Skip to main content
Paths are relative to https://inkbox.ai/api/v1/identities/my-agent. Authenticate with an API key in X-API-Key. Any key that can read hosting can read ports, including the identity’s own agent-scoped key. Changing ports or rotating tokens needs an admin-scoped key; agent-scoped keys get 403. In the Console, any organization member can view ports and admins can change them. The identity must be a hosted agent; otherwise these endpoints return 409 with code identity_not_hosted. For how addresses, tokens, and public ports behave, see Agent URLs.

Response

All three endpoints return the agent’s address:

Read ports

GET /hosting/ports

Update ports

PATCH /hosting/ports
ports replaces the whole list. Any port you leave out is removed, along with its token. To change one port, read the current list, edit it, and send the full list back.
Ports you keep keep their tokens. Removing a port deletes its token. When you add a private port, the response includes its token_url once; store it. Later reads return null, and rotating issues a new link.

Rotate a port token

POST /hosting/ports/{port}/token Issues a new token for an exposed port and returns the address with that port’s token_url. The previous token stops working immediately. Store token_url: later reads return null.
Returns 404 if the port isn’t exposed.

SDKs and CLI

update_hosting_ports and updateHostingPorts send PATCH /hosting/ports, so ports replaces the whole list. Omit ports to change only the default port. In the CLI, ports set adds the port or changes its access and keeps the other ports, sending the version it read and retrying once if the ports changed meanwhile; ports default <handle> none clears the default port.

Read the base URL

GET /hosting also returns url.