# Team

10 endpoints at `https://api.kosa8.com`, sent with `Authorization: Bearer $KOSA8_API_KEY`. Generated from the API's own [OpenAPI description](https://api.kosa8.com/openapi.json), which a test holds to the router.

## List members[#]

GET`/v1/members`scope sandboxes:read

Responses

200401403

```
curl -s -X GET https://api.kosa8.com/v1/members \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

## Invite or change a member[#]

POST`/v1/members`scope admin

JSON body

`email`requiredstring

—

`role`requiredstring

—

Responses

200401403

```
curl -s -X POST https://api.kosa8.com/v1/members \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json
```

## Remove a member[#]

DELETE`/v1/members/{email}`scope admin

Parameters

`email`requiredpath · string

Member email, percent-encoded

Responses

200401403

```
curl -s -X DELETE https://api.kosa8.com/v1/members/$EMAIL \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

## The org's single sign-on connection (OIDC or SAML 2.0), what to enter in the IdP (saml_sp), and the SCIM base URL[#]

GET`/v1/sso`scope admin

Responses

200401403

```
curl -s -X GET https://api.kosa8.com/v1/sso \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

## Set up or change single sign-on: OIDC or SAML 2.0, domains, default role, just-in-time, enforcement, SCIM group-to-role mapping[#]

PUT`/v1/sso`scope admin · owner

Owner only: an owner member or the organization's own admin key; an admin member gets 403.

JSON body

`protocol`"oidc" | "saml"

Default: the current protocol, else oidc

`issuer`string

OIDC: the provider's https issuer URL

`client_id`string

OIDC

`client_secret`string

OIDC; write only

`idp_metadata_xml`string

SAML: the IdP's metadata XML (entity ID, SSO URL and signing certificates are read from it)

`idp_metadata_url`string

SAML: an https URL to fetch the IdP's metadata from, once, now

`idp_entity_id`string

SAML: the IdP's entity ID (Issuer)

`idp_sso_url`string

SAML: the IdP's HTTP-Redirect single sign-on URL

`idp_certificates`array of string

SAML: 1 or 2 PEM signing certificates (2 while rotating)

`allow_idp_initiated`boolean

SAML: an IdP app tile starts an ordinary SP-initiated sign-in. Default false

`domains`array of string

—

`default_role`"admin" | "developer" | "viewer"

—

`jit`boolean

—

`enforce`boolean

—

`scim_group_roles`object | null

SCIM group display name -> role

Responses

200400401403

```
curl -s -X PUT https://api.kosa8.com/v1/sso \
  -H "Authorization: Bearer $KOSA8_API_KEY" \
  -H 'Content-Type: application/json' -d @body.json
```

## Remove single sign-on (and revoke the SCIM token)[#]

DELETE`/v1/sso`scope admin · owner

Owner only: an owner member or the organization's own admin key; an admin member gets 403.

Responses

200401403

```
curl -s -X DELETE https://api.kosa8.com/v1/sso \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

## Check a domain's DNS TXT record[#]

POST`/v1/sso/domains/{domain}/verify`scope admin · owner

Owner only: an owner member or the organization's own admin key; an admin member gets 403.

Parameters

`domain`requiredpath · string

Domain

Responses

200401403

```
curl -s -X POST https://api.kosa8.com/v1/sso/domains/$DOMAIN/verify \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

## The SCIM base URL and the live SCIM token's id and prefix (never its secret)[#]

GET`/v1/sso/scim-token`scope admin · owner

Owner only: an owner member or the organization's own admin key; an admin member gets 403.

Responses

200401403

```
curl -s -X GET https://api.kosa8.com/v1/sso/scim-token \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

## Make a SCIM bearer token (k8c_scim_…, shown once); any older token stops working at once[#]

POST`/v1/sso/scim-token`scope admin · owner

Owner only: an owner member or the organization's own admin key; an admin member gets 403.

Responses

201401403409

```
curl -s -X POST https://api.kosa8.com/v1/sso/scim-token \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

## Revoke the SCIM token[#]

DELETE`/v1/sso/scim-token`scope admin · owner

Owner only: an owner member or the organization's own admin key; an admin member gets 403.

Responses

200401403

```
curl -s -X DELETE https://api.kosa8.com/v1/sso/scim-token \
  -H "Authorization: Bearer $KOSA8_API_KEY"
```

---
Source: https://docs.kosa8.com/api/team/
