---
title: "Add an SSO provider to a workspace"
method: POST
path: "/workspaces/{workspace_id}/sso-providers"
tags: ["Workspace SSO"]
---

# Add an SSO provider to a workspace

`POST /workspaces/{workspace_id}/sso-providers`

## Request

- Base URL: `https://api.carbonvoice.app`
- URL: `https://api.carbonvoice.app/workspaces/{workspace_id}/sso-providers`
- Auth: one of:
  - API key in header `pxtoken`
  - OAuth 2 (implicit, authorization URL `https://api.carbonvoice.app/oauth/authorize`)

## Path parameters

- `workspace_id` string, required

## Request body

- CreateSsoProvider
  - `email_domain` string, required: Email domain this SSO provider applies to
  - `provider_id` string: Identity provider id used for SSO validation
  - `keycloak_idp_alias` string: Keycloak identity provider alias used for kc_idp_hint routing

## Response `200`

- SsoProviderResponse
  - `id` string, required: SSO provider id
  - `email_domain` string, required
  - `provider_id` string, nullable
  - `keycloak_idp_alias` string, nullable

## Other responses

- `400`
- `403`: Caller is not a Carbon super user (user role admin) or a workspace admin, or has no verified email address on the SSO email domain
- `404`
- `503`: The email domain is being claimed concurrently; retry

---

[API](https://skmtc.dev/carbonvoice/apis/carbon-voice-api.md) · [All operations](https://skmtc.dev/carbonvoice/apis/carbon-voice-api/llms.txt) · [OpenAPI document](https://skmtc.dev/carbonvoice/apis/carbon-voice-api/revisions/b91c5c845122?raw)
