> ## Documentation Index
> Fetch the complete documentation index at: https://docs.middlewr.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Configure SSO

> Set up SAML single sign-on for a workspace



## OpenAPI

````yaml openapi.json POST /api/workspaces/{workspace_id}/sso
openapi: 3.1.1
info:
  title: Middlewr API
  description: Short link management platform API
  version: 1.0.0
  contact:
    name: Middlewr
    email: hello@middlewr.com
    url: https://middlewr.com/contact
servers:
  - url: https://api.middlewr.com
security:
  - ApiKeyAuth: []
paths:
  /api/workspaces/{workspace_id}/sso:
    post:
      tags:
        - SSO
      operationId: sso.configure
      parameters:
        - name: workspace_id
          in: path
          required: true
          schema:
            type: string
            format: uuid
      requestBody:
        required: true
        content:
          application/json:
            schema:
              type: object
              properties:
                metadata_url:
                  type: string
                  format: uri
                domain:
                  type: string
                  minLength: 1
                  maxLength: 255
                  pattern: >-
                    ^[a-z0-9]([a-z0-9-]*[a-z0-9])?(\.[a-z0-9]([a-z0-9-]*[a-z0-9])?)+$
              required:
                - metadata_url
                - domain
      responses:
        '200':
          description: OK
          content:
            application/json:
              schema:
                type: object
                properties:
                  sso_provider_id:
                    anyOf:
                      - type: string
                        format: uuid
                      - type: 'null'
                  sso_domain:
                    anyOf:
                      - type: string
                      - type: 'null'
                  sso_metadata_url:
                    anyOf:
                      - type: string
                      - type: 'null'
                  sso_active:
                    type: boolean
                  domain_verified:
                    type: boolean
                  sso_sp_entity_id:
                    anyOf:
                      - type: string
                      - type: 'null'
                  sso_sp_acs_url:
                    anyOf:
                      - type: string
                      - type: 'null'
                required:
                  - sso_provider_id
                  - sso_domain
                  - sso_metadata_url
                  - sso_active
                  - domain_verified
                  - sso_sp_entity_id
                  - sso_sp_acs_url
components:
  securitySchemes:
    ApiKeyAuth:
      type: apiKey
      in: header
      name: x-api-key
      description: A user or workspace API key, created in the dashboard settings.

````

This documentation is built and hosted on [Mintlify](https://mintlify.com), a developer documentation platform.