# The email domains people may join the workspace from

GET

/v1/auth/join-domains

```sh
curl --request GET \
  --url https://example.com/v1/auth/join-domains \
  --header 'Authorization: Bearer <token>'
```

Someone with a verified email at one of these domains, who signs in by a way that counts for it (a Google Workspace account there, a Microsoft work account, or the emailed link, which proves the mailbox) and whom the workspace doesn’t have yet, is offered the workspace and joins with a press, holding the domain’s role. GitHub never counts. A sign-in through the workspace’s own identity provider follows that provider’s `join` setting instead. Someone the workspace removed stays out. Members read it. Mounted when the deployment keeps join domains.

## Authorizations

- **[bearerAuth](https://docs.kindgi.com/v0.8.0/reference/api.md#bearerauth)**

## Responses

### 200

The allowed domains.

application/json

The workspace’s allowed domains, the first allowed first.

object

**data**

required

Array\<object>

An email domain the workspace lets people join from.

object

**domain**

required

Lower case, as an A-label (`xn--bcher-kva.de` for bücher.de), e.g. `acme.com`.

string

\>= 1 characters

**role**

required

What someone who joins by the domain gets: `viewer` or `runner` (who also runs its agents and flows) on the tenant’s default project, or `none`, a tenant member with no project. Never tenant admin.

string

Allowed values: viewer runner none

**createdAt**

required

string format: date-time

**createdBy**

required

Who allowed it: `user:<id>`, a tenant admin, or the deployment’s own token as its seed user on a runtime serving one tenant; `service_account:<id>`, a key holding `kindgi:system` that acts as one; or `system-key:<id>` on the system routes (`system-key:boot` for the deployment’s own token).

string

\>= 1 characters

**updatedAt**

string format: date-time

**updatedBy**

Who last changed its role, in `createdBy`’s forms: any tenant admin, for a lower one.

string

\>= 1 characters

**hasMore**

required

boolean

##### Example

```json
{
  "data": [
    {
      "role": "viewer"
    }
  ]
}
```

### 401

Missing / malformed / expired / revoked bearer token.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 403

Not a member of the workspace (`permission-denied`). Without an authorization store, anyone reads it.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

### 429

`rate-limit-exceeded` with `details.limit: "api-requests"`, on a runtime that sets workspace limits (Kindgi Cloud): this workspace’s limit on API requests a minute is reached, so the request wasn’t run; `Retry-After` says when to send it again.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

#### Headers

**Retry-After**

integer

\>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

### 503

The database was too busy to answer in time (`database-busy`), or the authorization store couldn’t be reached (`authz-backend-unavailable`); `Retry-After` (whole seconds) says when to try again.

application/json

object

**error**

required

object

**code**

required

Stable machine-readable discriminant. Values match domain error codes (see `docs/API-ROUTE-CONVENTIONS.md` §4.3).

string

**message**

required

string

**details**

Optional, kind-specific.

object

**_key_**

additional properties

any

**requestId**

required

Server-assigned request id; also echoed via `X-Request-Id` header.

string

##### Examplegenerated

```json
{
  "error": {
    "code": "example",
    "message": "example",
    "details": {},
    "requestId": "example"
  }
}
```

#### Headers

**Retry-After**

integer

\>= 1

Whole seconds to wait before sending the request again, at least 1. Sent with the codes the answer names as sending it, so it may be absent.

## See also

- [`POST /v1/auth/join-domains`: Let people at an email domain join the workspace](https://docs.kindgi.com/v0.8.0/reference/api/operations/authjoindomainsallow.md)
- [`PATCH /v1/auth/join-domains/{domain}`: Change what someone joining by a domain gets](https://docs.kindgi.com/v0.8.0/reference/api/operations/authjoindomainsupdate.md)
- [`POST /v1/auth/join-domains/{domain}/unregister`: Stop letting people at a domain join](https://docs.kindgi.com/v0.8.0/reference/api/operations/authjoindomainsunregister.md)
- [People, API keys and service accounts](https://docs.kindgi.com/v0.8.0/deploy/people-and-keys.md)
- [Error code `authz-backend-unavailable`](https://docs.kindgi.com/v0.8.0/reference/errors.md#authz-backend-unavailable)
- [Error code `database-busy`](https://docs.kindgi.com/v0.8.0/reference/errors.md#database-busy)
- [Error code `permission-denied`](https://docs.kindgi.com/v0.8.0/reference/errors.md#permission-denied)
- [Error code `rate-limit-exceeded`](https://docs.kindgi.com/v0.8.0/reference/errors.md#rate-limit-exceeded)
- [Every error code](https://docs.kindgi.com/v0.8.0/reference/errors.md)
