---
title: "Register workspace proxy"
method: POST
path: "/api/v2/workspaceproxies/me/register"
tags: ["Enterprise"]
---

# Register workspace proxy

`POST /api/v2/workspaceproxies/me/register`

## Request body

- WsproxysdkRegisterWorkspaceProxyRequest
  - `access_url` string — AccessURL that hits the workspace proxy api.
  - `derp_enabled` boolean — DerpEnabled indicates whether the proxy should be included in the DERP map or not.
  - `derp_only` boolean — DerpOnly indicates whether the proxy should only be included in the DERP map and should not be used for serving apps.
  - `hostname` string — ReplicaHostname is the OS hostname of the machine that the proxy is running on. This is only used for tracking purposes in the replicas table.
  - `replica_error` string — ReplicaError is the error that the replica encountered when trying to dial it's peers. This is stored in the replicas table for debugging purposes but does not affect the proxy's ability to register. This value is only stored on subsequent requests to the register endpoint, not the first request.
  - `replica_id` string — ReplicaID is a unique identifier for the replica of the proxy that is registering. It should be generated by the client on startup and persisted (in memory only) until the process is restarted.
  - `replica_relay_address` string — ReplicaRelayAddress is the DERP address of the replica that other replicas may use to connect internally for DERP meshing.
  - `version` string — Version is the Coder version of the proxy.
  - `wildcard_hostname` string — WildcardHostname that the workspace proxy api is serving for subdomain apps.

## Response `201`

Created

- WsproxysdkRegisterWorkspaceProxyResponse
  - `derp_force_websockets` boolean
  - `derp_map` TailcfgDERPMap
    - `homeParams` TailcfgDERPHomeParams
      - `regionScore` object — RegionScore scales latencies of DERP regions by a given scaling factor when determining which region to use as the home ("preferred") DERP. Scores in the range (0, 1) will cause this region to be proportionally more preferred, and scores in the range (1, ∞) will penalize a region. If a region is not present in this map, it is treated as having a score of 1.0. Scores should not be 0 or negative; such scores will be ignored. A nil map means no change from the previous value (if any); an empty non-nil map can be sent to reset all scores back to 1.0.
    - `omitDefaultRegions` boolean — OmitDefaultRegions specifies to not use Tailscale's DERP servers, and only use those specified in this DERPMap. If there are none set outside of the defaults, this is a noop. This field is only meaningful if the Regions map is non-nil (indicating a change).
    - `regions` object — Regions is the set of geographic regions running DERP node(s). It's keyed by the DERPRegion.RegionID. The numbers are not necessarily contiguous.
  - `derp_mesh_key` string
  - `derp_region_id` integer
  - `sibling_replicas` CodersdkReplica[] — SiblingReplicas is a list of all other replicas of the proxy that have not timed out.
    - `created_at` string, date-time — CreatedAt is the timestamp when the replica was first seen.
    - `database_latency` integer — DatabaseLatency is the latency in microseconds to the database.
    - `error` string — Error is the replica error.
    - `hostname` string — Hostname is the hostname of the replica.
    - `id` string, uuid — ID is the unique identifier for the replica.
    - `region_id` integer — RegionID is the region of the replica.
    - `relay_address` string — RelayAddress is the accessible address to relay DERP connections.

---

[API](https://skmtc.net/coder/apis/coder-api.md) · [All operations](https://skmtc.net/coder/apis/coder-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/coder/coder-api/revisions/50a77af44008/schema)
