Authentication
Send a CLI token, or an organization API key, as a bearer token:- CLI tokens belong to a person and act as them. Create one in the console under Settings → CLI tokens, or with
POST /v1/tokens. - API keys belong to the organization. Admins create them with
POST /v1/keys.
429 for a minute.
Requests and responses
Bodies are JSON. Lists come back wrapped in an object, such as{"environments": [...]}, so fields can be added without breaking you. Times are RFC 3339 in UTC, and durations are strings like 30m or 6h.
Errors
Errors carry a message, and often a machine-readable code:The flow envctl follows
POST /v1/sandboxesregisters your machine and returns a single-use tailnet key.POST /v1/environmentsleases an environment and returns it, with your sandbox’s new configuration.GET /v1/environments/{id}untilstateisready.DELETE /v1/environments/{id}when you’re done.