openapi: 3.0.3
info:
    version: 2.0.0
    title: Corbado Backend API
    description: |4
        # Introduction
        This documentation gives an overview of all Corbado Backend API calls to implement passwordless authentication with Passkeys.
    contact:
        name: Corbado team
        email: support@corbado.com
        url: https://www.corbado.com
servers:
    - url: https://backendapi.corbado.io/v2
tags:
    - name: Users
      description: All API calls to manage users
    - name: Sessions
      description: All API calls to manage long and short sessions
    - name: Challenges
      description: All API calls to manage challenges
    - name: Identifiers
      description: All API calls to manage login identifiers
    - name: Passkeys
      description: All API calls for passkey flows
    - name: AuthEvents
      description: All API calls to manage authentication events
    - name: PasskeyEvents
      description: All API calls to manage passkey events
    - name: ProjectConfig
      description: All API calls to manage project configurations
    - name: ConnectTokens
      description: All API calls to manage connect tokens (they are used for Corbado Connect)
    - name: PasskeyChallenges
      description: All API calls to manage passkey challenges
    - name: WebhookEndpoints
      description: All API calls to manage webhook endpoints
    - name: PasswordManagers
      description: All API calls to manage password managers
    - name: ClientEnvs
      description: All API calls to manage client environments
paths:
    /users:
        post:
            description: Creates a new user
            operationId: UserCreate
            tags:
                - Users
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/userCreateReq'
            responses:
                '200':
                    description: User has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/user'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}:
        get:
            description: Returns a user
            operationId: UserGet
            tags:
                - Users
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            responses:
                '200':
                    description: User has been returned
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/user'
                default:
                    $ref: '#/components/responses/error'
        patch:
            description: Updates a user
            operationId: UserUpdate
            tags:
                - Users
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/userUpdateReq'
            responses:
                '200':
                    description: User has been updated
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/user'
                default:
                    $ref: '#/components/responses/error'
        delete:
            description: Deletes a user
            operationId: UserDelete
            tags:
                - Users
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            responses:
                '200':
                    $ref: '#/components/responses/200'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/challenges:
        post:
            description: Create a new challenge to verify a login identifier
            operationId: ChallengeCreate
            tags:
                - Challenges
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/challengeCreateReq'
            responses:
                '200':
                    description: Challenge has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/challenge'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/challenges/{challengeID}:
        patch:
            description: Updates a challenge (e.g. from pending to completed)
            operationId: ChallengeUpdate
            tags:
                - Challenges
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
                - $ref: '#/components/parameters/challengeID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/challengeUpdateReq'
            responses:
                '200':
                    description: Challenge has been updated
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/challenge'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/identifiers:
        post:
            description: Create a new login identifier
            operationId: IdentifierCreate
            tags:
                - Identifiers
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/identifierCreateReq'
            responses:
                '200':
                    description: Identifier has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/identifier'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/identifiers/{identifierID}:
        delete:
            description: Delete an existing login identifier
            operationId: IdentifierDelete
            tags:
                - Identifiers
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
                - $ref: '#/components/parameters/identifierID'
            responses:
                '200':
                    $ref: '#/components/responses/200'
                default:
                    $ref: '#/components/responses/error'
        patch:
            description: Updates a login identifier (e.g. from pending to verified)
            operationId: IdentifierUpdate
            tags:
                - Identifiers
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
                - $ref: '#/components/parameters/identifierID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/identifierUpdateReq'
            responses:
                '200':
                    description: Identifier has been updated
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/identifier'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/socialAccounts:
        get:
            description: Returns a list of social accounts
            operationId: UserSocialAccountList
            tags:
                - Users
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
                - name: sort
                  in: query
                  description: Field sorting
                  required: false
                  schema:
                    type: string
                - name: filter[]
                  in: query
                  description: Field filtering
                  required: false
                  style: form
                  explode: true
                  schema:
                    type: array
                    items:
                        type: string
                  examples:
                    filterEmail:
                        summary: Filter for one email address
                        value:
                            - identifierType:eq:email
                            - identifierValue:eq:mail@example.com
                    filterTimepoint:
                        summary: timePoint after 20/07/2021
                        value:
                            - timePoint:gt:2021-07-20T00:00:00
                - name: page
                  in: query
                  description: Page number
                  required: false
                  schema:
                    type: integer
                    default: 1
                - name: pageSize
                  in: query
                  description: Number of items per page
                  required: false
                  schema:
                    type: integer
                    default: 10
            responses:
                '200':
                    description: List of social accounts
                    content:
                        application/json:
                            schema:
                                type: array
                                items:
                                    $ref: '#/components/schemas/socialAccount'
                default:
                    $ref: '#/components/responses/error'
        post:
            description: Creates a new social account
            operationId: SocialAccountCreate
            tags:
                - Users
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/socialAccountCreateReq'
            responses:
                '200':
                    description: Social account has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/socialAccount'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/credentials:
        get:
            description: Returns a list of credentials (passkeys)
            operationId: CredentialList
            tags:
                - Users
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
                - name: sort
                  in: query
                  description: Field sorting
                  required: false
                  schema:
                    type: string
                - name: filter[]
                  in: query
                  description: Field filtering
                  required: false
                  style: form
                  explode: true
                  schema:
                    type: array
                    items:
                        type: string
                  examples:
                    filterEmail:
                        summary: Filter for one email address
                        value:
                            - identifierType:eq:email
                            - identifierValue:eq:mail@example.com
                    filterTimepoint:
                        summary: timePoint after 20/07/2021
                        value:
                            - timePoint:gt:2021-07-20T00:00:00
                - name: page
                  in: query
                  description: Page number
                  required: false
                  schema:
                    type: integer
                    default: 1
                - name: pageSize
                  in: query
                  description: Number of items per page
                  required: false
                  schema:
                    type: integer
                    default: 10
            responses:
                '200':
                    description: List of credentials (passkeys)
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/credentialList'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/credentials/{credentialID}:
        delete:
            description: Deletes an existing credential (passkey)
            operationId: CredentialDelete
            tags:
                - Users
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
                - $ref: '#/components/parameters/credentialID'
            responses:
                '200':
                    $ref: '#/components/responses/200'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/authEvents:
        post:
            description: Create a new authentication event for a user
            operationId: AuthEventCreate
            tags:
                - AuthEvents
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/authEventCreateReq'
            responses:
                '200':
                    description: Auth event has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/authEvent'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/passkeyEvents:
        post:
            description: Create a new passkey event for a user
            operationId: PasskeyEventCreate
            tags:
                - PasskeyEvents
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/passkeyEventCreateReq'
            responses:
                '200':
                    description: Passkey event has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyEvent'
                default:
                    $ref: '#/components/responses/error'
        get:
            description: Returns a list of matching passkey events
            operationId: PasskeyEventList
            tags:
                - PasskeyEvents
            security:
                - basicAuth: []
            parameters:
                - name: sort
                  in: query
                  description: Field sorting
                  required: false
                  schema:
                    type: string
                - name: filter[]
                  in: query
                  description: Field filtering
                  required: false
                  style: form
                  explode: true
                  schema:
                    type: array
                    items:
                        type: string
                  examples:
                    filterEmail:
                        summary: Filter for one email address
                        value:
                            - identifierType:eq:email
                            - identifierValue:eq:mail@example.com
                    filterTimepoint:
                        summary: timePoint after 20/07/2021
                        value:
                            - timePoint:gt:2021-07-20T00:00:00
                - name: page
                  in: query
                  description: Page number
                  required: false
                  schema:
                    type: integer
                    default: 1
                - name: pageSize
                  in: query
                  description: Number of items per page
                  required: false
                  schema:
                    type: integer
                    default: 10
                - $ref: '#/components/parameters/userID'
            responses:
                '200':
                    description: List of all matching passkey events
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyEventList'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/passkeyEvents/{passkeyEventID}:
        delete:
            description: Deletes an existing passkey event
            operationId: PasskeyEventDelete
            tags:
                - PasskeyEvents
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
                - $ref: '#/components/parameters/passkeyEventID'
            responses:
                '200':
                    $ref: '#/components/responses/200'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/passkeyChallenges:
        get:
            description: Returns a list of matching passkey challenges
            operationId: PasskeyChallengeList
            tags:
                - PasskeyChallenges
            security:
                - basicAuth: []
            parameters:
                - name: sort
                  in: query
                  description: Field sorting
                  required: false
                  schema:
                    type: string
                - name: filter[]
                  in: query
                  description: Field filtering
                  required: false
                  style: form
                  explode: true
                  schema:
                    type: array
                    items:
                        type: string
                  examples:
                    filterEmail:
                        summary: Filter for one email address
                        value:
                            - identifierType:eq:email
                            - identifierValue:eq:mail@example.com
                    filterTimepoint:
                        summary: timePoint after 20/07/2021
                        value:
                            - timePoint:gt:2021-07-20T00:00:00
                - name: page
                  in: query
                  description: Page number
                  required: false
                  schema:
                    type: integer
                    default: 1
                - name: pageSize
                  in: query
                  description: Number of items per page
                  required: false
                  schema:
                    type: integer
                    default: 10
                - $ref: '#/components/parameters/userID'
            responses:
                '200':
                    description: List of all matching passkey challenges
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyChallengeList'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/passkeyChallenges/{passkeyChallengeID}:
        patch:
            description: Updates a passkey challenge
            operationId: PasskeyChallengeUpdate
            tags:
                - PasskeyChallenges
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
                - $ref: '#/components/parameters/passkeyChallengeID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/passkeyChallengeUpdateReq'
            responses:
                '200':
                    description: Passkey challenge has been updated
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyChallenge'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/passwordManagers:
        get:
            description: Returns a list of password managers
            operationId: PasswordManagerList
            tags:
                - PasswordManagers
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            responses:
                '200':
                    description: List of all matching password managers
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passwordManagerList'
                default:
                    $ref: '#/components/responses/error'
    /users/{userID}/clientEnvs:
        get:
            description: Returns a list of clientEnvs
            operationId: ClientEnvList
            tags:
                - ClientEnvs
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/userID'
            responses:
                '200':
                    description: List of all matching clientEnvs
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/clientEnvList'
                default:
                    $ref: '#/components/responses/error'
    /identifiers:
        get:
            description: Returns a list of matching identifiers
            operationId: IdentifierList
            tags:
                - Identifiers
            security:
                - basicAuth: []
            parameters:
                - name: sort
                  in: query
                  description: Field sorting
                  required: false
                  schema:
                    type: string
                - name: filter[]
                  in: query
                  description: Field filtering
                  required: false
                  style: form
                  explode: true
                  schema:
                    type: array
                    items:
                        type: string
                  examples:
                    filterEmail:
                        summary: Filter for one email address
                        value:
                            - identifierType:eq:email
                            - identifierValue:eq:mail@example.com
                    filterTimepoint:
                        summary: timePoint after 20/07/2021
                        value:
                            - timePoint:gt:2021-07-20T00:00:00
                - name: page
                  in: query
                  description: Page number
                  required: false
                  schema:
                    type: integer
                    default: 1
                - name: pageSize
                  in: query
                  description: Number of items per page
                  required: false
                  schema:
                    type: integer
                    default: 10
            responses:
                '200':
                    description: List of all matching identifiers
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/identifierList'
                default:
                    $ref: '#/components/responses/error'
    /socialAccounts:
        get:
            description: Returns a list of social accounts
            operationId: SocialAccountList
            tags:
                - Users
            security:
                - basicAuth: []
            parameters:
                - name: sort
                  in: query
                  description: Field sorting
                  required: false
                  schema:
                    type: string
                - name: filter[]
                  in: query
                  description: Field filtering
                  required: false
                  style: form
                  explode: true
                  schema:
                    type: array
                    items:
                        type: string
                  examples:
                    filterEmail:
                        summary: Filter for one email address
                        value:
                            - identifierType:eq:email
                            - identifierValue:eq:mail@example.com
                    filterTimepoint:
                        summary: timePoint after 20/07/2021
                        value:
                            - timePoint:gt:2021-07-20T00:00:00
                - name: page
                  in: query
                  description: Page number
                  required: false
                  schema:
                    type: integer
                    default: 1
                - name: pageSize
                  in: query
                  description: Number of items per page
                  required: false
                  schema:
                    type: integer
                    default: 10
            responses:
                '200':
                    description: List of social accounts
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/socialAccountList'
                default:
                    $ref: '#/components/responses/error'
    /projectConfig/cname:
        put:
            description: Update project config CNAME and generates new SSL certificate
            operationId: ProjectConfigUpdateCNAME
            tags:
                - ProjectConfig
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/projectConfigUpdateCnameReq'
            responses:
                '200':
                    $ref: '#/components/responses/200'
                default:
                    $ref: '#/components/responses/error'
    /connectTokens:
        post:
            description: Create a new connect token
            operationId: ConnectTokenCreate
            tags:
                - ConnectTokens
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/connectTokenCreateReq'
            responses:
                '200':
                    description: Connect token has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/connectToken'
                default:
                    $ref: '#/components/responses/error'
        get:
            description: Returns a list of matching append tokens
            operationId: ConnectTokenList
            tags:
                - ConnectTokens
            security:
                - basicAuth: []
            parameters:
                - name: sort
                  in: query
                  description: Field sorting
                  required: false
                  schema:
                    type: string
                - name: filter[]
                  in: query
                  description: Field filtering
                  required: false
                  style: form
                  explode: true
                  schema:
                    type: array
                    items:
                        type: string
                  examples:
                    filterEmail:
                        summary: Filter for one email address
                        value:
                            - identifierType:eq:email
                            - identifierValue:eq:mail@example.com
                    filterTimepoint:
                        summary: timePoint after 20/07/2021
                        value:
                            - timePoint:gt:2021-07-20T00:00:00
                - name: page
                  in: query
                  description: Page number
                  required: false
                  schema:
                    type: integer
                    default: 1
                - name: pageSize
                  in: query
                  description: Number of items per page
                  required: false
                  schema:
                    type: integer
                    default: 10
            responses:
                '200':
                    description: List of all matching append tokens
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/connectTokenList'
                default:
                    $ref: '#/components/responses/error'
    /connectTokens/{connectTokenID}:
        patch:
            description: Updates an existing append token
            operationId: ConnectTokenUpdate
            tags:
                - ConnectTokens
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/connectTokenID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/connectTokenUpdateReq'
            responses:
                '200':
                    $ref: '#/components/responses/200'
                default:
                    $ref: '#/components/responses/error'
        delete:
            description: Deletes an existing append token
            operationId: ConnectTokenDelete
            tags:
                - ConnectTokens
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/connectTokenID'
            responses:
                '200':
                    $ref: '#/components/responses/200'
                default:
                    $ref: '#/components/responses/error'
    /webhookEndpoints:
        get:
            description: Returns a list of webhook endpoints
            operationId: WebhookEndpointList
            tags:
                - WebhookEndpoints
            security:
                - basicAuth: []
            responses:
                '200':
                    description: List of webhook endpoints
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/webhookEndpointList'
                default:
                    $ref: '#/components/responses/error'
        post:
            description: Creates a new webhook endpoint
            operationId: WebhookEndpointCreate
            tags:
                - WebhookEndpoints
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/webhookEndpointCreateReq'
            responses:
                '200':
                    description: Webhook endpoint has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/webhookEndpoint'
                default:
                    $ref: '#/components/responses/error'
    /webhookEndpoints/{webhookEndpointID}:
        put:
            description: Updates an existing webhook endpoint
            operationId: WebhookEndpointUpdate
            tags:
                - WebhookEndpoints
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/webhookEndpointID'
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/webhookEndpointUpdateReq'
            responses:
                '200':
                    description: Webhook endpoint has been updated
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/webhookEndpoint'
                default:
                    $ref: '#/components/responses/error'
        delete:
            description: Deletes an existing webhook endpoint
            operationId: WebhookEndpointDelete
            tags:
                - WebhookEndpoints
            security:
                - basicAuth: []
            parameters:
                - $ref: '#/components/parameters/webhookEndpointID'
            responses:
                '200':
                    $ref: '#/components/responses/200'
                default:
                    $ref: '#/components/responses/error'
    /sessions:
        get:
            description: Returns a list of matching sessions
            operationId: SessionList
            tags:
                - Sessions
            security:
                - basicAuth: []
            parameters:
                - name: sort
                  in: query
                  description: Field sorting
                  required: false
                  schema:
                    type: string
                - name: filter[]
                  in: query
                  description: Field filtering
                  required: false
                  style: form
                  explode: true
                  schema:
                    type: array
                    items:
                        type: string
                  examples:
                    filterEmail:
                        summary: Filter for one email address
                        value:
                            - identifierType:eq:email
                            - identifierValue:eq:mail@example.com
                    filterTimepoint:
                        summary: timePoint after 20/07/2021
                        value:
                            - timePoint:gt:2021-07-20T00:00:00
                - name: page
                  in: query
                  description: Page number
                  required: false
                  schema:
                    type: integer
                    default: 1
                - name: pageSize
                  in: query
                  description: Number of items per page
                  required: false
                  schema:
                    type: integer
                    default: 10
            responses:
                '200':
                    description: List of all matching sessions
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/sessionList'
                default:
                    $ref: '#/components/responses/error'
    /sessions/{sessionID}/revoke:
        post:
            description: Revokes an existing session
            operationId: SessionRevoke
            tags:
                - Sessions
            security:
                - basicAuth: []
            parameters:
                - name: sessionID
                  in: path
                  description: ID of session
                  required: true
                  schema:
                    type: string
                    minLength: 30
                    maxLength: 30
            responses:
                '200':
                    $ref: '#/components/responses/200'
                default:
                    $ref: '#/components/responses/error'
    /passkey/append/start:
        post:
            description: Starts a challenge for creating a new passkey
            operationId: PasskeyAppendStart
            tags:
                - Passkeys
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/passkeyAppendStartReq'
            responses:
                '200':
                    description: Passkey append challenge has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyAppendStartRsp'
                default:
                    $ref: '#/components/responses/error'
    /passkey/append/finish:
        post:
            description: Completes a challenge for creating a new passkey
            operationId: PasskeyAppendFinish
            tags:
                - Passkeys
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/passkeyAppendFinishReq'
            responses:
                '200':
                    description: Passkey append succeeded
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyAppendFinishRsp'
                default:
                    $ref: '#/components/responses/error'
    /passkey/login/start:
        post:
            description: Starts a challenge for an existing passkey
            operationId: PasskeyLoginStart
            tags:
                - Passkeys
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/passkeyLoginStartReq'
            responses:
                '200':
                    description: Passkey login challenge has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyLoginStartRsp'
                default:
                    $ref: '#/components/responses/error'
    /passkey/login/finish:
        post:
            description: Completes a challenge for an existing passkey
            operationId: PasskeyLoginFinish
            tags:
                - Passkeys
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/passkeyLoginFinishReq'
            responses:
                '200':
                    description: Passkey login succeeded
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyLoginFinishRsp'
                default:
                    $ref: '#/components/responses/error'
    /passkey/postLogin:
        post:
            description: Explicitly runs the post-login action
            operationId: PasskeyPostLogin
            tags:
                - Passkeys
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/passkeyPostLoginReq'
            responses:
                '200':
                    description: Post Passkey Login succeeded
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyPostLoginRsp'
                default:
                    $ref: '#/components/responses/error'
    /passkey/mediation/start:
        post:
            description: Starts a challenge for an existing passkey (Conditional UI)
            operationId: PasskeyMediationStart
            tags:
                - Passkeys
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/passkeyMediationStartReq'
            responses:
                '200':
                    description: Passkey login challenge has been created
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyMediationStartRsp'
                default:
                    $ref: '#/components/responses/error'
    /passkey/mediation/finish:
        post:
            description: Completes a challenge for an existing passkey (Conditional UI)
            operationId: PasskeyMediationFinish
            tags:
                - Passkeys
            security:
                - basicAuth: []
            requestBody:
                required: true
                content:
                    application/json:
                        schema:
                            $ref: '#/components/schemas/passkeyMediationFinishReq'
            responses:
                '200':
                    description: Passkey mediation has been success, thus we can return a userID
                    content:
                        application/json:
                            schema:
                                $ref: '#/components/schemas/passkeyMediationFinishRsp'
                default:
                    $ref: '#/components/responses/error'
components:
    securitySchemes:
        basicAuth:
            type: http
            scheme: basic
    parameters:
        userID:
            name: userID
            in: path
            description: ID of user
            required: true
            schema:
                type: string
        challengeID:
            name: challengeID
            in: path
            description: ID of challenge
            required: true
            schema:
                type: string
        identifierID:
            name: identifierID
            in: path
            description: ID of login identifier
            required: true
            schema:
                type: string
        credentialID:
            name: credentialID
            in: path
            description: ID of credential
            required: true
            schema:
                type: string
        connectTokenID:
            name: connectTokenID
            in: path
            description: ID of an append token
            required: true
            schema:
                type: string
        passkeyChallengeID:
            name: passkeyChallengeID
            in: path
            description: ID of a passkey challenge
            required: true
            schema:
                type: string
        passkeyEventID:
            name: passkeyEventID
            in: path
            description: ID of a passkey event
            required: true
            schema:
                type: string
        webhookEndpointID:
            name: webhookEndpointID
            in: path
            description: ID of a webhook endpoint
            required: true
            schema:
                type: string
    schemas:
        userCreateReq:
            type: object
            required:
                - status
            properties:
                fullName:
                    type: string
                status:
                    $ref: '#/components/schemas/userStatus'
                explicitWebauthnID:
                    type: string
                    description: For connect projects, the webauthnID can be explicitly set for a user
        userUpdateReq:
            type: object
            properties:
                fullName:
                    type: string
                status:
                    $ref: '#/components/schemas/userStatus'
        challengeCreateReq:
            type: object
            required:
                - challengeType
                - identifierValue
                - clientInformation
            properties:
                challengeType:
                    $ref: '#/components/schemas/challengeType'
                identifierValue:
                    type: string
                challengeMetadata:
                    type: object
                lifetimeSeconds:
                    type: integer
                clientInformation:
                    $ref: '#/components/schemas/clientInformation'
        challengeUpdateReq:
            type: object
            required:
                - value
            properties:
                value:
                    type: string
        identifierCreateReq:
            type: object
            required:
                - identifierType
                - identifierValue
                - status
            properties:
                identifierType:
                    $ref: '#/components/schemas/identifierType'
                identifierValue:
                    type: string
                status:
                    $ref: '#/components/schemas/identifierStatus'
        identifierUpdateReq:
            type: object
            required:
                - status
            properties:
                status:
                    $ref: '#/components/schemas/identifierStatus'
        passkeyAppendStartReq:
            type: object
            required:
                - userID
                - processID
                - username
                - clientInformation
                - passkeyIntelFlags
            properties:
                userID:
                    description: ID of the user
                    type: string
                processID:
                    type: string
                username:
                    type: string
                clientInformation:
                    $ref: '#/components/schemas/clientInformation'
                passkeyIntelFlags:
                    $ref: '#/components/schemas/passkeyIntelFlags'
        passkeyAppendStartRsp:
            type: object
            required:
                - appendAllow
                - attestationOptions
                - detectionInsights
                - decisionInsights
            properties:
                appendAllow:
                    type: boolean
                attestationOptions:
                    type: string
                    example: '{"publicKey":{"challenge":"2m6...0w9/MgW...KE=","rp":{"name":"demo","id":"localhost"},"user":{"name":"example@mail.com","id":"dXN...zk5"},"pubKeyCredParams":[{"type":"public-key","alg":-7},{"type":"public-key","alg":-35},{"type":"public-key","alg":-36},{"type":"public-key","alg":-257},{"type":"public-key","alg":-258},{"type":"public-key","alg":-259},{"type":"public-key","alg":-37},{"type":"public-key","alg":-38},{"type":"public-key","alg":-39},{"type":"public-key","alg":-8}],"authenticatorSelection":{"authenticatorAttachment":"platform","requireResidentKey":false,"userVerification":"required"},"timeout":60000,"attestation":"none"}}'
                detectionInsights:
                    $ref: '#/components/schemas/detectionInsights'
                decisionInsights:
                    $ref: '#/components/schemas/decisionInsightsAppend'
        passkeyAppendFinishReq:
            type: object
            required:
                - userID
                - processID
                - attestationResponse
                - clientInformation
            properties:
                userID:
                    description: ID of the user
                    type: string
                processID:
                    type: string
                attestationResponse:
                    type: string
                    example: '{"type":"public-key","id":"JM6...J_Q","rawId":"JM6...J_Q","authenticatorAttachment":null,"response":{"clientDataJSON":"eyJ...ZX0","authenticatorData":"SZY...AAQ","signature":"Ni7...YAg","userHandle":"dXN...zk5"},"clientExtensionResults":{}}'
                clientInformation:
                    $ref: '#/components/schemas/clientInformation'
                sendNotification:
                    type: boolean
        passkeyAppendFinishRsp:
            type: object
            required:
                - passkeyData
            properties:
                passkeyData:
                    $ref: '#/components/schemas/passkeyData'
        passkeyLoginStartReq:
            type: object
            required:
                - userID
                - clientInformation
                - crossDeviceAuthenticationStrategy
                - processID
            properties:
                userID:
                    description: ID of the user
                    type: string
                clientInformation:
                    $ref: '#/components/schemas/clientInformation'
                crossDeviceAuthenticationStrategy:
                    $ref: '#/components/schemas/crossDeviceAuthenticationStrategy'
                processID:
                    type: string
        passkeyLoginStartRsp:
            type: object
            required:
                - loginAllow
                - assertionOptions
                - detectionInsights
                - decisionInsights
            properties:
                loginAllow:
                    type: boolean
                assertionOptions:
                    type: string
                detectionInsights:
                    $ref: '#/components/schemas/detectionInsights'
                decisionInsights:
                    $ref: '#/components/schemas/decisionInsights'
        passkeyLoginFinishReq:
            type: object
            required:
                - userID
                - assertionResponse
                - clientInformation
                - processID
            properties:
                userID:
                    description: ID of the user
                    type: string
                assertionResponse:
                    type: string
                clientInformation:
                    $ref: '#/components/schemas/clientInformation'
                processID:
                    type: string
                signPasskeyData:
                    type: boolean
        passkeyLoginFinishRsp:
            type: object
            required:
                - passkeyData
            properties:
                passkeyData:
                    $ref: '#/components/schemas/passkeyData'
                signedPasskeyData:
                    type: string
        passkeyPostLoginReq:
            type: object
            required:
                - signedPasskeyData
            properties:
                signedPasskeyData:
                    type: string
        passkeyPostLoginRsp:
            type: object
            required:
                - session
            properties:
                session:
                    type: string
        passkeyMediationStartReq:
            type: object
            required:
                - clientInformation
            properties:
                clientInformation:
                    $ref: '#/components/schemas/clientInformation'
        passkeyMediationStartRsp:
            type: object
            required:
                - loginAllow
                - assertionOptions
            properties:
                loginAllow:
                    type: boolean
                assertionOptions:
                    type: string
        passkeyMediationFinishReq:
            type: object
            required:
                - assertionResponse
                - clientInformation
                - processID
            properties:
                assertionResponse:
                    type: string
                clientInformation:
                    $ref: '#/components/schemas/clientInformation'
                processID:
                    type: string
                signPasskeyData:
                    type: boolean
        passkeyMediationFinishRsp:
            type: object
            required:
                - passkeyData
            properties:
                passkeyData:
                    $ref: '#/components/schemas/passkeyData'
                signedPasskeyData:
                    type: string
                error:
                    oneOf:
                        - $ref: '#/components/schemas/passkeyMediationFinishErrorCredentialDeleted'
                        - $ref: '#/components/schemas/passkeyMediationFinishErrorAlternativeProject'
                    discriminator:
                        propertyName: type
                        mapping:
                            credentialDeleted: '#/components/schemas/passkeyMediationFinishErrorCredentialDeleted'
                            alternativeProjectID: '#/components/schemas/passkeyMediationFinishErrorAlternativeProject'
        passkeyMediationFinishErrorCredentialDeleted:
            type: object
            required:
                - type
            properties:
                type:
                    type: string
                    enum:
                        - 'credentialDeleted'
        passkeyMediationFinishErrorAlternativeProject:
            type: object
            required:
                - type
                - alternativeProjectName
            properties:
                type:
                    type: string
                    enum:
                        - 'alternativeProjectID'
                alternativeProjectName:
                    type: string
        connectTokenCreateReq:
            type: object
            required:
                - type
                - data
            properties:
                type:
                    $ref: '#/components/schemas/connectTokenType'
                data:
                    $ref: '#/components/schemas/connectTokenData'
                maxLifetimeInSeconds:
                    type: integer
                    example: 3600
        connectTokenUpdateReq:
            type: object
            required:
                - status
            properties:
                status:
                    $ref: '#/components/schemas/connectTokenStatus'
        webhookEndpointCreateReq:
            type: object
            required:
                - url
                - subscribedEvents
                - customHeaders
            properties:
                url:
                    type: string
                basicAuthUsername:
                    type: string
                basicAuthPassword:
                    type: string
                subscribedEvents:
                    type: array
                    items:
                        $ref: '#/components/schemas/webhookEventType'
                customHeaders:
                    type: object
        webhookEndpointUpdateReq:
            type: object
            properties:
                url:
                    type: string
                basicAuthUsername:
                    type: string
                basicAuthPassword:
                    type: string
                subscribedEvents:
                    type: array
                    items:
                        $ref: '#/components/schemas/webhookEventType'
                customHeaders:
                    type: object
        passkeyData:
            type: object
            required:
                - id
                - userID
                - username
                - ceremonyType
                - challengeID
                - aaguidDetails
            properties:
                id:
                    type: string
                userID:
                    type: string
                username:
                    type: string
                ceremonyType:
                    type: string
                    enum:
                        - 'local'
                        - 'cda'
                        - 'security-key'
                challengeID:
                    type: string
                aaguidDetails:
                    $ref: '#/components/schemas/aaguidDetails'
        user:
            type: object
            required:
                - userID
                - status
            properties:
                userID:
                    type: string
                fullName:
                    type: string
                status:
                    $ref: '#/components/schemas/userStatus'
                explicitWebauthnID:
                    type: string
        sessionList:
            type: object
            required:
                - sessions
                - paging
            properties:
                sessions:
                    type: array
                    items:
                        type: object
                        required:
                            - sessionID
                            - userID
                            - identifierValue
                            - createdMs
                            - lastActionMs
                            - expiresMs
                            - status
                        properties:
                            sessionID:
                                type: string
                            userID:
                                type: string
                            identifierValue:
                                type: string
                            createdMs:
                                type: integer
                                format: int64
                            lastActionMs:
                                type: integer
                                format: int64
                            expiresMs:
                                type: integer
                                format: int64
                            status:
                                type: string
                                enum:
                                    - 'active'
                                    - 'logged_out'
                                    - 'expired'
                                    - 'inactivity_reached'
                                    - 'revoked'
                paging:
                    type: object
                    required:
                        - page
                        - totalPages
                        - totalItems
                    properties:
                        page:
                            description: current page returned in response
                            type: integer
                            default: 1
                        totalPages:
                            description: total number of pages available
                            type: integer
                        totalItems:
                            description: total number of items available
                            type: integer
        identifier:
            type: object
            required:
                - identifierID
                - type
                - value
                - status
                - userID
            properties:
                identifierID:
                    type: string
                type:
                    $ref: '#/components/schemas/identifierType'
                value:
                    type: string
                status:
                    $ref: '#/components/schemas/identifierStatus'
                userID:
                    type: string
        identifierList:
            type: object
            required:
                - identifiers
                - paging
            properties:
                identifiers:
                    type: array
                    items:
                        $ref: '#/components/schemas/identifier'
                paging:
                    type: object
                    required:
                        - page
                        - totalPages
                        - totalItems
                    properties:
                        page:
                            description: current page returned in response
                            type: integer
                            default: 1
                        totalPages:
                            description: total number of pages available
                            type: integer
                        totalItems:
                            description: total number of items available
                            type: integer
        socialAccountCreateReq:
            type: object
            required:
                - providerType
                - identifierValue
                - foreignID
                - avatarURL
                - fullName
            properties:
                providerType:
                    type: string
                    enum:
                        - 'google'
                        - 'microsoft'
                        - 'github'
                identifierValue:
                    type: string
                foreignID:
                    type: string
                avatarURL:
                    type: string
                fullName:
                    type: string
        socialAccount:
            type: object
            required:
                - socialAccountID
                - providerType
                - identifierValue
                - userID
                - foreignID
                - avatarURL
                - fullName
            properties:
                socialAccountID:
                    type: string
                providerType:
                    type: string
                identifierValue:
                    type: string
                userID:
                    type: string
                foreignID:
                    type: string
                avatarURL:
                    type: string
                fullName:
                    type: string
        socialAccountList:
            type: object
            required:
                - socialAccounts
                - paging
            properties:
                socialAccounts:
                    type: array
                    items:
                        $ref: '#/components/schemas/socialAccount'
                paging:
                    type: object
                    required:
                        - page
                        - totalPages
                        - totalItems
                    properties:
                        page:
                            description: current page returned in response
                            type: integer
                            default: 1
                        totalPages:
                            description: total number of pages available
                            type: integer
                        totalItems:
                            description: total number of items available
                            type: integer
        credential:
            type: object
            required:
                - id
                - credentialID
                - attestationType
                - transport
                - backupEligible
                - backupState
                - authenticatorAAGUID
                - aaguidDetails
                - sourceOS
                - sourceBrowser
                - lastUsed
                - lastUsedMs
                - created
                - createdMs
                - status
            properties:
                id:
                    type: string
                    example: "cre-12345"
                credentialID:
                    type: string
                attestationType:
                    type: string
                transport:
                    type: array
                    items:
                        type: string
                        enum:
                            - 'usb'
                            - 'nfc'
                            - 'ble'
                            - 'internal'
                            - 'hybrid'
                            - 'smart-card'
                backupEligible:
                    type: boolean
                backupState:
                    type: boolean
                authenticatorAAGUID:
                    type: string
                sourceOS:
                    type: string
                sourceBrowser:
                    type: string
                lastUsed:
                    type: string
                    description: Timestamp of when the passkey was last used in yyyy-MM-dd'T'HH:mm:ss format
                lastUsedMs:
                    type: integer
                    format: int64
                created:
                    description: Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format
                    type: string
                createdMs:
                    type: integer
                    format: int64
                status:
                    type: string
                    enum:
                        - 'pending'
                        - 'active'
                    description: "Status"
                aaguidDetails:
                    $ref: '#/components/schemas/aaguidDetails'
        aaguidDetails:
            type: object
            required:
                - aaguid
                - name
                - iconLight
                - iconDark
            properties:
                aaguid:
                    type: string
                name:
                    type: string
                iconLight:
                    type: string
                iconDark:
                    type: string
        credentialList:
            type: object
            required:
                - credentials
                - paging
            properties:
                credentials:
                    type: array
                    items:
                        $ref: '#/components/schemas/credential'
                paging:
                    type: object
                    required:
                        - page
                        - totalPages
                        - totalItems
                    properties:
                        page:
                            description: current page returned in response
                            type: integer
                            default: 1
                        totalPages:
                            description: total number of pages available
                            type: integer
                        totalItems:
                            description: total number of items available
                            type: integer
        challenge:
            type: object
            required:
                - challengeID
                - type
                - identifierValue
                - value
                - expires
                - status
            properties:
                challengeID:
                    type: string
                type:
                    $ref: '#/components/schemas/challengeType'
                identifierValue:
                    type: string
                value:
                    type: string
                expires:
                    type: integer
                    format: int64
                status:
                    $ref: '#/components/schemas/challengeStatus'
        authEventCreateReq:
            type: object
            required:
                - username
                - eventType
                - method
                - status
                - clientInformation
            properties:
                username:
                    type: string
                eventType:
                    $ref: '#/components/schemas/authEventType'
                method:
                    $ref: '#/components/schemas/authEventMethod'
                status:
                    $ref: '#/components/schemas/authEventStatus'
                clientInformation:
                    $ref: '#/components/schemas/clientInformation'
        authEvent:
            type: object
            required:
                - authEventID
                - userID
                - username
                - eventType
                - method
                - created
                - createdMs
                - status
            properties:
                authEventID:
                    type: string
                userID:
                    description: ID of the user
                    type: string
                username:
                    type: string
                eventType:
                    $ref: '#/components/schemas/authEventType'
                method:
                    $ref: '#/components/schemas/authEventMethod'
                created:
                    description: Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format
                    type: string
                createdMs:
                    type: integer
                    format: int64
                status:
                    $ref: '#/components/schemas/authEventStatus'
        passkeyEventCreateReq:
            type: object
            required:
                - eventType
            properties:
                eventType:
                    $ref: '#/components/schemas/passkeyEventType'
                expires:
                    type: integer
                processID:
                    type: string
                clientEnvID:
                    type: string
                credentialID:
                    type: string
                challenge:
                    type: string
        passkeyEvent:
            type: object
            required:
                - passkeyEventID
                - userID
                - eventType
                - created
                - createdMs
            properties:
                passkeyEventID:
                    type: string
                userID:
                    description: ID of the user
                    type: string
                eventType:
                    $ref: '#/components/schemas/passkeyEventType'
                clientEnvID:
                    type: string
                processID:
                    type: string
                credentialID:
                    type: string
                expires:
                    type: integer
                created:
                    description: Timestamp of when the entity was created in yyyy-MM-dd'T'HH:mm:ss format
                    type: string
                createdMs:
                    type: integer
                    format: int64
        passkeyEventList:
            type: object
            required:
                - passkeyEvents
                - paging
            properties:
                passkeyEvents:
                    type: array
                    items:
                        $ref: '#/components/schemas/passkeyEvent'
                paging:
                    type: object
                    required:
                        - page
                        - totalPages
                        - totalItems
                    properties:
                        page:
                            description: current page returned in response
                            type: integer
                            default: 1
                        totalPages:
                            description: total number of pages available
                            type: integer
                        totalItems:
                            description: total number of items available
                            type: integer
        projectConfigUpdateCnameReq:
            type: object
            required:
                - cname
            properties:
                cname:
                    type: string
        detectionTag:
            type: object
            required:
                - category
                - name
            properties:
                category:
                    type: string
                    enum:
                        - 'support'
                        - 'clientEnv'
                        - 'history'
                        - 'passkey'
                name:
                    type: string
        decisionTag:
            type: string
            enum:
                - env-no-platform-pk-support
                - env-no-pk-support
                - user-no-pks
                - user-login-blacklisted
                - user-security-key
                - user-positive-env-history
                - user-negative-env-history
                - env-blacklisted
                - user-platform-pk-high-confidence
                - user-cross-platform-pk-high-confidence
                - user-env-no-pks
                - default-deny
                - passkey-list-initiated-process
                - user-append-blacklisted
                - process-pk-login-sk-completed
                - process-pk-login-platform-completed
                - process-pk-login-not-offered
                - process-pk-login-incomplete
                - process-pk-login-cross-platform-completed
                - device-local-platform-passkey-experiment
                - env-broken
                - process-pk-login-aborted
        clientInformation:
            type: object
            required:
                - remoteAddress
                - userAgent
                - userVerifyingPlatformAuthenticatorAvailable
                - conditionalMediationAvailable
                - parsedDeviceInfo
            properties:
                remoteAddress:
                    description: Client's IP address
                    type: string
                    example: '::ffff:172.18.0.1'
                userAgent:
                    description: Client's user agent
                    type: string
                    example: 'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/104.0.0.0 Safari/537.36'
                clientEnvHandle:
                    description: Client's environment handle
                    type: string
                javascriptFingerprint:
                    description: Client's fingerprint
                    type: string
                javaScriptHighEntropy:
                    $ref: '#/components/schemas/javaScriptHighEntropy'
                bluetoothAvailable:
                    description: Client's Bluetooth availability
                    type: boolean
                passwordManagerAvailable:
                    description: Client's password manager availability
                    type: boolean
                userVerifyingPlatformAuthenticatorAvailable:
                    type: boolean
                conditionalMediationAvailable:
                    type: boolean
                privateMode:
                    type: boolean
                parsedDeviceInfo:
                    $ref: '#/components/schemas/parsedDeviceInfo'
        parsedDeviceInfo:
            type: object
            required:
                - browserName
                - browserVersion
                - osName
                - osVersion
            properties:
                browserName:
                    type: string
                browserVersion:
                    type: string
                osName:
                    type: string
                osVersion:
                    type: string
        passkeyIntelFlags:
            type: object
            required:
                - forcePasskeyAppend
            properties:
                forcePasskeyAppend:
                    type: boolean
                askForAutoAppend:
                    type: boolean
        javaScriptHighEntropy:
            type: object
            required:
                - platform
                - platformVersion
                - mobile
            properties:
                platform:
                    type: string
                platformVersion:
                    type: string
                mobile:
                    type: boolean
        passkeyChallengeUpdateReq:
            type: object
            required:
                - status
            properties:
                status:
                    $ref: '#/components/schemas/passkeyChallengeStatus'
        passkeyChallengeList:
            type: object
            required:
                - passkeyChallenges
                - paging
            properties:
                passkeyChallenges:
                    type: array
                    items:
                        $ref: '#/components/schemas/passkeyChallenge'
                paging:
                    type: object
                    required:
                        - page
                        - totalPages
                        - totalItems
                    properties:
                        page:
                            description: current page returned in response
                            type: integer
                            default: 1
                        totalPages:
                            description: total number of pages available
                            type: integer
                        totalItems:
                            description: total number of items available
                            type: integer
        passkeyChallenge:
            type: object
            required:
                - challengeID
                - type
                - value
                - status
                - created
                - createdMs
                - expires
            properties:
                challengeID:
                    type: string
                type:
                    $ref: '#/components/schemas/passkeyChallengeType'
                value:
                    type: string
                status:
                    $ref: '#/components/schemas/passkeyChallengeStatus'
                created:
                    type: integer
                    format: int64
                createdMs:
                    type: integer
                    format: int64
                expires:
                    type: integer
                    format: int64
        passkeyChallengeType:
            type: string
            enum:
                - 'register'
                - 'authenticate'
        passkeyChallengeStatus:
            type: string
            enum:
                - 'pending'
                - 'completed'
                - 'consumed'
        userStatus:
            type: string
            enum:
                - 'pending'
                - 'active'
                - 'disabled'
        challengeType:
            type: string
            enum:
                - 'email_otp'
                - 'email_link'
                - 'sms_otp'
        challengeStatus:
            type: string
            enum:
                - 'pending'
                - 'completed'
                - 'expired'
        identifierType:
            type: string
            enum:
                - 'email'
                - 'phone'
                - 'username'
        identifierStatus:
            type: string
            enum:
                - 'pending'
                - 'primary'
                - 'verified'
        crossDeviceAuthenticationStrategy:
            type: string
            enum:
                - 'standard'
                - 'minimize'
                - 'maximize'
        connectTokenStatus:
            type: string
            enum:
                - 'initial'
                - 'consumed'
        connectTokenType:
            type: string
            enum:
                - 'passkey-append'
                - 'passkey-delete'
                - 'passkey-list'
                - 'passkey-login'
        authEventMethod:
            type: string
            enum:
                - 'password'
                - 'email_otp'
                - 'email_link'
                - 'phone_otp'
                - 'passkey'
                - 'social_github'
                - 'social_google'
                - 'social_microsoft'
        authEventType:
            type: string
            enum:
                - 'sign_up'
                - 'login'
                - 'new_passkey_added'
        authEventStatus:
            type: string
            enum:
                - 'success'
                - 'failure'
        webhookEventType:
            type: string
            enum:
                - 'passkey-login.completed'
                - 'passkey.created'
                - 'passkey.deleted'
                - 'user.created'
                - 'user.updated'
                - 'user.deleted'
        passkeyEventType:
            type: string
            enum:
                - user-login-blacklisted
                - login-explicit-abort
                - login-error
                - login-error-untyped
                - login-one-tap-switch
                - user-append-after-cross-platform-blacklisted
                - user-append-after-login-error-blacklisted
                - append-credential-exists
                - append-explicit-abort
                - append-error
        connectToken:
            type: object
            required:
                - id
                - tokenType
                - data
                - connectTokenStatus
                - expires
            properties:
                id:
                    type: string
                tokenType:
                    $ref: '#/components/schemas/connectTokenType'
                data:
                    $ref: '#/components/schemas/connectTokenData'
                connectTokenStatus:
                    $ref: '#/components/schemas/connectTokenStatus'
                secret:
                    type: string
                expires:
                    type: integer
        connectTokenDataPasskeyAppend:
            type: object
            required:
                - displayName
                - identifier
            properties:
                displayName:
                    type: string
                identifier:
                    type: string
        connectTokenDataPasskeyDelete:
            type: object
            required:
                - identifier
            properties:
                identifier:
                    type: string
        connectTokenDataPasskeyList:
            type: object
            required:
                - identifier
            properties:
                identifier:
                    type: string
        connectTokenDataPasskeyLogin:
            type: object
            required:
                - identifier
            properties:
                identifier:
                    type: string
        connectTokenData:
            type: object
            oneOf:
                - $ref: '#/components/schemas/connectTokenDataPasskeyAppend'
                - $ref: '#/components/schemas/connectTokenDataPasskeyDelete'
                - $ref: '#/components/schemas/connectTokenDataPasskeyList'
                - $ref: '#/components/schemas/connectTokenDataPasskeyLogin'
        connectTokenList:
            type: object
            required:
                - connectTokens
                - paging
            properties:
                connectTokens:
                    type: array
                    items:
                        $ref: '#/components/schemas/connectToken'
                paging:
                    type: object
                    required:
                        - page
                        - totalPages
                        - totalItems
                    properties:
                        page:
                            description: current page returned in response
                            type: integer
                            default: 1
                        totalPages:
                            description: total number of pages available
                            type: integer
                        totalItems:
                            description: total number of items available
                            type: integer
        webhookEndpointList:
            type: object
            required:
                - webhookEndpoints
            properties:
                webhookEndpoints:
                    type: array
                    items:
                        $ref: '#/components/schemas/webhookEndpoint'
        webhookEndpoint:
            type: object
            required:
                - id
                - url
                - basicAuthUsername
                - basicAuthPassword
                - customHeaders
                - subscribedEvents
                - created
                - createdMs
                - updated
                - updatedMs
            properties:
                id:
                    type: string
                url:
                    type: string
                basicAuthUsername:
                    type: string
                basicAuthPassword:
                    type: string
                customHeaders:
                    type: object
                subscribedEvents:
                    type: array
                    items:
                        $ref: '#/components/schemas/webhookEventType'
                created:
                    type: string
                createdMs:
                    type: integer
                    format: int64
                updated:
                    type: string
                updatedMs:
                    type: integer
                    format: int64
        detectionInsights:
            type: object
            required:
                - tags
                - credentialIds
                - clientEnvIds
                - isCDACandidate
                - passwordManagerIds
                - historyData
            properties:
                tags:
                    type: array
                    items:
                        $ref: '#/components/schemas/detectionTag'
                credentialIds:
                    type: array
                    items:
                        type: string
                clientEnvIds:
                    type: array
                    items:
                        type: string
                passwordManagerIds:
                    type: array
                    items:
                        type: string
                historyData:
                    $ref: '#/components/schemas/appendHistoryData'
        appendHistoryData:
            type: object
            required:
                - defaultCount
                - afterErrorCount
                - afterHybridCount
                - autoCount
                - defaultCooldown
                - afterErrorCooldown
                - afterHybridCooldown
                - autoCooldown
            properties:
                defaultCount:
                    type: integer
                afterErrorCount:
                    type: integer
                afterHybridCount:
                    type: integer
                autoCount:
                    type: integer
                defaultCooldown:
                    type: boolean
                afterErrorCooldown:
                    type: boolean
                afterHybridCooldown:
                    type: boolean
                autoCooldown:
                    type: boolean
        decisionInsights:
            type: object
            required:
                - tag
                - isCDACandidate
                - experiments
            properties:
                tag:
                    $ref: '#/components/schemas/decisionTag'
                isCDACandidate:
                    type: boolean
                experiments:
                    type: array
                    items:
                        type: string
        decisionInsightsAppend:
            type: object
            required:
                - tag
                - isRestrictedBrowser
                - variant
                - auto
            properties:
                tag:
                    $ref: '#/components/schemas/decisionTag'
                isRestrictedBrowser:
                    type: boolean
                variant:
                    type: string
                    enum:
                        - 'default'
                        - 'after-error'
                        - 'after-hybrid'
                        - 'passkey-list'
                auto:
                    type: boolean
        passwordManagerList:
            type: object
            required:
                - passwordManagers
            properties:
                passwordManagers:
                    type: array
                    items:
                        $ref: '#/components/schemas/passwordManager'
        passwordManager:
            type: object
            required:
                - id
                - userID
                - clientEnvID
                - credentialID
                - aaguid
                - status
                - score
                - createdMs
            properties:
                id:
                    type: string
                userID:
                    type: string
                clientEnvID:
                    type: string
                credentialID:
                    type: string
                aaguid:
                    type: string
                status:
                    type: string
                score:
                    type: integer
                createdMs:
                    type: integer
                    format: int64
        clientEnvList:
            type: object
            required:
                - clientEnvs
            properties:
                clientEnvs:
                    type: array
                    items:
                        $ref: '#/components/schemas/clientEnv'
        clientEnv:
            type: object
            required:
                - id
                - handle
                - browserName
                - browserVersion
                - osName
                - osVersion
                - userAgent
                - jsFingerprint
                - createdMs
            properties:
                id:
                    type: string
                handle:
                    type: string
                browserName:
                    type: string
                browserVersion:
                    type: string
                osName:
                    type: string
                osVersion:
                    type: string
                userAgent:
                    type: string
                jsFingerprint:
                    type: string
                createdMs:
                    type: integer
                    format: int64
                deviceId:
                    type: string
    responses:
        error:
            description: Error
            content:
                application/json:
                    schema:
                        allOf:
                            - type: object
                              required:
                                - httpStatusCode
                                - message
                                - requestData
                                - runtime
                              properties:
                                httpStatusCode:
                                    description: HTTP status code of operation
                                    type: integer
                                    format: int32
                                message:
                                    type: string
                                    example: 'OK'
                                requestData:
                                    description: Data about the request itself, can be used for debugging
                                    type: object
                                    required:
                                        - requestID
                                    properties:
                                        requestID:
                                            description: Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side
                                            type: string
                                            example: 'req-557...663'
                                        link:
                                            description: Link to dashboard with details about request
                                            type: string
                                            example: 'https://my.corbado.com/requests/req-xxxxxxxxxxxxxxxxxxx'
                                runtime:
                                    description: Runtime in seconds for this request
                                    type: number
                                    format: float
                                    example: 0.06167686
                            - type: object
                              required:
                                - error
                              properties:
                                data:
                                    type: object
                                error:
                                    type: object
                                    required:
                                        - type
                                    properties:
                                        type:
                                            description: Type of error
                                            type: string
                                        details:
                                            description: Details of error
                                            type: string
                                        validation:
                                            description: Validation errors per field
                                            type: array
                                            items:
                                                type: object
                                                required:
                                                    - field
                                                    - message
                                                properties:
                                                    field:
                                                        type: string
                                                    message:
                                                        type: string
                                        links:
                                            description: Additional links to help understand the error
                                            type: array
                                            items:
                                                type: string
        '200':
            description: Operation succeeded
            content:
                application/json:
                    schema:
                        type: object
                        required:
                            - httpStatusCode
                            - message
                            - requestData
                            - runtime
                        properties:
                            httpStatusCode:
                                description: HTTP status code of operation
                                type: integer
                                format: int32
                            message:
                                type: string
                                example: 'OK'
                            requestData:
                                description: Data about the request itself, can be used for debugging
                                type: object
                                required:
                                    - requestID
                                properties:
                                    requestID:
                                        description: Unique ID of request, you can provide your own while making the request, if not the ID will be randomly generated on server side
                                        type: string
                                        example: 'req-557...663'
                                    link:
                                        description: Link to dashboard with details about request
                                        type: string
                                        example: 'https://my.corbado.com/requests/req-xxxxxxxxxxxxxxxxxxx'
                            runtime:
                                description: Runtime in seconds for this request
                                type: number
                                format: float
                                example: 0.06167686
security:
    - basicAuth: []
