Skip to content

Proxy API

6 operations. Every call needs a session cookie or an Authorization: Bearer nct_… token unless marked Public. Conventions, errors and scopes

GET/servers/{serverId}/proxy

Server-level proxy state: certificates, upstream policy, TCP/UDP ports and tailnet

ParameterInTypeDescription
serverIdrequiredpathstring
Response 200 · OK · application/json
ServerProxy
  • agentTooOldbooleanrequired
    True when the agent lacks proxy.v2; staging proxy features returns 422 agent_too_old
  • appliedGenerationinteger (int64)required
  • ProxyUpstreamPolicyrequired
  • capabilitiesstring[] | nullrequired
  • ServerCertificate[] | nullrequired
  • errorstringrequired
  • generationinteger (int64)required
  • ProxyL4Port[] | nullrequired
  • ProxyDeployInfo
  • ProxyPortsrequired
  • stagedbooleanrequired
    Staged server-level changes await Deploy proxy
  • statusstringrequired
    Traefik state reported by the agent: ok, starting, error, or empty
  • ProxyTailnetrequired
  • ProxyUpstreamPolicyrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/servers/{serverId}/proxy/deploy

Deploy the server-level proxy configuration

Sends a proxy_configure command with the desired certificates, upstream policy and tailnet. The result updates the applied state asynchronously.

ParameterInTypeDescription
Idempotency-KeyheaderstringClient-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours.
serverIdrequiredpathstring
Request body · application/json · required
DeployInputBody
  • reprovisionboolean
    Delete the managed node and register it again with a new key
Response 202 · Accepted · application/json
ProxyDeployResult
  • commandIdstringrequired
  • generationinteger (int64)required
  • ProxyPlanrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/servers/{serverId}/proxy/plan

Preview what deploying the proxy would change

Lists the staged differences, whether the proxy container is recreated and warnings (a tailnet node is created, replaced or deleted, a port another process holds, HTTP-01 certificates that cannot validate off port 80). ports plans the deploy as if that proxy ports setting were staged too, without staging it (0 = the agent's own port).

ParameterInTypeDescription
serverIdrequiredpathstring
Request body · application/json · required
PlanInputBody
  • PortsStruct1
  • reprovisionboolean
    Delete the managed node and register it again with a new key
Response 200 · OK · application/json
ProxyPlan
  • ProxyPlanChange[] | nullrequired
  • reasonsstring[] | nullrequired
  • restartRequiredbooleanrequired
    The proxy container is recreated (about 1 second of dropped connections)
  • warningsstring[] | nullrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

GET/servers/{serverId}/proxy/routes

The effective route table of the server's proxy (read-only)

Hostnames, upstreams and policies as the proxy receives them. Basic-auth users and hashes are never included.

ParameterInTypeDescription
serverIdrequiredpathstring
Response 200 · OK · application/json
RoutesOutputBody
  • ProxyRoute[] | nullrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

PATCH/servers/{serverId}/proxy/settings

Stage upstream policy and tailnet settings

Needs proxy:write; the loopback and link-local toggles need admin; the proxy ports can only be changed by the instance administrator (403 instance_admin_required; 422 invalid_proxy_ports, proxy_port_clash, agent_too_old). Changes are staged until POST /servers/{id}/proxy/deploy, which recreates the proxy container when a port changes. A managed tailnet needs the Tailscale integration (422 tailnet_not_configured); host mode needs Tailscale detected on the host (422 host_tailscale_not_detected).

ParameterInTypeDescription
serverIdrequiredpathstring
Request body · application/json · required
UpdateSettingsInputBody
  • PortsStruct
  • TailnetStruct
  • UpstreamPolicyStruct
Response 200 · OK · application/json
ServerProxy
  • agentTooOldbooleanrequired
    True when the agent lacks proxy.v2; staging proxy features returns 422 agent_too_old
  • appliedGenerationinteger (int64)required
  • ProxyUpstreamPolicyrequired
  • capabilitiesstring[] | nullrequired
  • ServerCertificate[] | nullrequired
  • errorstringrequired
  • generationinteger (int64)required
  • ProxyL4Port[] | nullrequired
  • ProxyDeployInfo
  • ProxyPortsrequired
  • stagedbooleanrequired
    Staged server-level changes await Deploy proxy
  • statusstringrequired
    Traefik state reported by the agent: ok, starting, error, or empty
  • ProxyTailnetrequired
  • ProxyUpstreamPolicyrequired
Errors
  • 401Unauthorized
  • 403Forbiddeninstance_admin_required
  • 404Not Found
  • 422Unprocessable Entityinvalid_proxy_portstailnet_not_configuredhost_tailscale_not_detected
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.

POST/servers/{serverId}/proxy/tailnet/reprovision

Re-provision the managed tailnet node

Deletes the node's state, registers it again with a fresh single-use key and removes the old device from the tailnet. Use it when the device was removed in the Tailscale admin console.

ParameterInTypeDescription
Idempotency-KeyheaderstringClient-chosen key (<=255 chars). A retry with the same key replays the original response for 24 hours.
serverIdrequiredpathstring
Response 202 · Accepted · application/json
ProxyDeployResult
  • commandIdstringrequired
  • generationinteger (int64)required
  • ProxyPlanrequired
Errors
  • 401Unauthorized
  • 403Forbidden
  • 404Not Found
  • 409Conflict
  • 422Unprocessable Entity
  • 500Internal Server Error

Errors are RFC 9457 application/problem+json with a stable code field.