# Join a private region

`PUT /apis/cra.diagrid.io/v1beta2/region/join`

Join a private region.

## Request

### Request body

The details required to join a private region.

`application/json`

- `joinToken` (string)
- `trustAnchors` (string (byte))

## Responses

### 200 — Region joined.

`application/json`

- `orgId` (string)
- `regionId` (string)
- `hostId` (string)
- `ingressWildcardDomain` (string) — Base wildcard hostname under which the region's public endpoints are provisioned (e.g. "cloud.r1.diagrid.io"). Paired with ingressPort.
- `ingressPort` (integer (int32)) — Region ingress port. Paired with ingressWildcardDomain.
- `oidcIssuer` (string) — The region's public OIDC issuer URL, decided by the control plane: its public OIDC endpoint with the region's OIDC id as the path. The agent configures the regional Sentry's JWT issuer with it so minted tokens validate against the publicly served documents. Empty when the control plane has no public OIDC endpoint configured.
- `regionGroupId` (string) — The RegionGroup the region is a member of; empty when it is not in a group.

### default — Unexpected error.

`application/json`

In the case of an error, a standard format error response body will be returned and the HTTP status code will be set to an error status. The response contains an object with a single error object.

- `code` (string) — Required. This is the same as the HTTP status of the response.
- `message` (string) — Required. A short description of the error.
- `status` (object) — Required. A status code that indicates the error type.
- `details` (object) — Additional details about the errors.
  - `@type` (string) — The type of error.
  - `reason` (string) — A reason for the error.
  - `domain` (string) — The domain in which the error occurred.
  - `metadata` (object) — Additional metadata about the error.

`application/vnd.api+json`

JSONAPI.org specification error response wrapper for UI.

- `error` (object) — In the case of an error, a standard format error response body will be returned and the HTTP status code will be set to an error status. The response contains an object with a single error object.
  - `code` (string) — Required. This is the same as the HTTP status of the response.
  - `message` (string) — Required. A short description of the error.
  - `status` (object) — Required. A status code that indicates the error type.
  - `details` (object) — Additional details about the errors.
    - `@type` (string) — The type of error.
    - `reason` (string) — A reason for the error.
    - `domain` (string) — The domain in which the error occurred.
    - `metadata` (object) — Additional metadata about the error.
- `meta` (object<string, object>) — Link members related to the primary data.
  - One of:
    - **string (uri-reference)** — A string containing the link's URL.
    - **object**
      - `href` (string (uri-reference)) — Required. A string containing the link's URL.
      - `meta` (object) — Non-standard meta-information that can not be represented as an attribute or relationship.
- `links` (object) — Non-standard meta-information that can not be represented as an attribute or relationship.
