---
updatedAt: 2025-11-13T22:00:19.000Z
agentTools:
  projectIndex: https://coldstream.readme.io/llms.txt
---

# (Auth)

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Identity API",
    "version": "v1"
  },
  "servers": [
    {
      "url": "https://identity.coldstream.diabatix.com"
    }
  ],
  "paths": {
    "/users/{userId}/mfa": {
      "post": {
        "tags": [
          "UserMfa"
        ],
        "summary": " (Auth)",
        "parameters": [
          {
            "name": "mfaToken",
            "in": "header",
            "schema": {
              "type": "string"
            }
          },
          {
            "name": "userId",
            "in": "path",
            "required": true,
            "schema": {
              "type": "integer",
              "format": "int64"
            }
          }
        ],
        "requestBody": {
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollMfaModel"
              }
            },
            "text/json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollMfaModel"
              }
            },
            "application/*+json": {
              "schema": {
                "$ref": "#/components/schemas/EnrollMfaModel"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Success",
            "content": {
              "text/plain": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              },
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              },
              "text/json": {
                "schema": {
                  "$ref": "#/components/schemas/Token"
                }
              }
            }
          }
        }
      }
    }
  },
  "components": {
    "schemas": {
      "EnrollMfaModel": {
        "required": [
          "type"
        ],
        "type": "object",
        "properties": {
          "type": {
            "$ref": "#/components/schemas/MfaFactorType"
          }
        },
        "additionalProperties": false
      },
      "MfaFactorType": {
        "enum": [
          0,
          1,
          2,
          3
        ],
        "type": "integer",
        "format": "int32",
        "description": "Otp = 0\n WebAuthn = 1",
        "minimum": 0,
        "maximum": 2
      },
      "Token": {
        "type": "object",
        "properties": {
          "accessToken": {
            "type": "string",
            "nullable": true
          },
          "mfaToken": {
            "type": "string",
            "nullable": true
          },
          "barcodeUri": {
            "type": "string",
            "nullable": true
          },
          "recoveryCode": {
            "type": "string",
            "nullable": true
          }
        },
        "additionalProperties": false
      }
    },
    "securitySchemes": {
      "Bearer": {
        "type": "apiKey",
        "description": "JWT Authorization header using the Bearer scheme. \r\n\r\n Enter 'Bearer' [space] and then your token in the text input below.\r\n\r\nExample: \"Bearer 12345abcdef\"",
        "name": "Authorization",
        "in": "header"
      }
    }
  },
  "security": [
    {
      "Bearer": []
    }
  ],
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true,
    "samples-enabled": true
  }
}
```