openapi: 3.0.0
info:
  title: Unified.to AUTH API
  version: "1.0"
  description: One API to Rule Them All
  contact:
    email: hello@unified.to
    url: https://unified.to/contact
  termsOfService: https://unified.to/tos
externalDocs:
  description: API Documentation
  url: https://docs.unified.to
tags:
  - name: unifiedapi
    description: Unified.to API
  - name: auth
  - name: login
  - name: saml
security:
  - jwt: []
servers:
  - url: https://api.unified.to
    description: North American data region
  - url: https://api-eu.unified.to
    description: European data region
  - url: https://api-au.unified.to
    description: Australian data region
components:
  securitySchemes:
    jwt:
      type: apiKey
      name: authorization
      in: header
  requestBodies: {}
  schemas: {}
paths:
  /unified/integration/login/{workspace_id}/{integration_type}:
    get:
      summary: Sign in a user
      parameters:
        - schema:
            type: string
          name: success_redirect
          in: query
          required: false
          description: The URL where you want the user to be redirect to after a successful authentication/sign-in.  A "jwt" parameter will be appended to the URL which will contain a name and email of the user who just signed-in.
        - schema:
            type: string
          name: failure_redirect
          in: query
          required: false
          description: The URL where you want the user to be redirect to after an unsuccessful authentication. An "error" variable will be appended.
        - schema:
            type: string
          name: state
          in: query
          required: false
          description: Extra state to send back to your success URL
        - schema:
            type: boolean
          name: redirect
          in: query
          required: false
        - schema:
            type: string
          name: env
          in: query
          required: false
        - schema:
            type: string
          description: The ID of the workspace
          name: workspace_id
          in: path
          required: true
        - schema:
            type: string
          description: Type of the supported integration
          name: integration_type
          in: path
          required: true
      tags:
        - auth
        - login
      description: Returns an authentication URL for the specified integration.  Once a successful OAuth2 code-flow authentication occurs, the name and email are returned inside a jwt parameter, which is a JSON web token that is base-64 encoded.
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
          description: Successful
      operationId: getUnifiedIntegrationLogin
  /unified/integration/saml/{workspace_id}/{integration_type}:
    get:
      summary: Sign in a user via SAML
      parameters:
        - schema:
            type: string
          name: success_redirect
          in: query
          required: false
          description: The URL where you want the user to be redirect to after a successful authentication/sign-in.  A "jwt" parameter will be appended to the URL which will contain a name and email of the user who just signed-in.
        - schema:
            type: string
          name: failure_redirect
          in: query
          required: false
          description: The URL where you want the user to be redirect to after an unsuccessful authentication. An "error" variable will be appended.
        - schema:
            type: string
          name: state
          in: query
          required: false
          description: Extra state to send back to your success URL
        - schema:
            type: boolean
          name: redirect
          in: query
          required: false
        - schema:
            type: string
          name: env
          in: query
          required: false
        - schema:
            type: string
          description: The ID of the workspace
          name: workspace_id
          in: path
          required: true
        - schema:
            type: string
          description: Type of the supported integration
          name: integration_type
          in: path
          required: true
      tags:
        - auth
        - saml
      description: Returns a SAML authentication URL for the specified integration.  Once a successful authentication occurs, the name and email are returned inside a jwt parameter, which is a JSON web token that is base-64 encoded.
      responses:
        "200":
          content:
            text/plain:
              schema:
                type: string
          description: Successful
      operationId: getUnifiedIntegrationSaml
