---
updatedAt: 2025-02-12T22:19:24.000Z
agentTools:
  projectIndex: https://developers.melroselabs.com/llms.txt
---

# Verify TOTP code

Verify TOTP code provided by user

# OpenAPI definition

```json
{
  "openapi": "3.0.1",
  "info": {
    "title": "Identity API",
    "version": "2023-01-19T08:41:58Z"
  },
  "servers": [
    {
      "url": "https://api.melroselabs.com/{basePath}",
      "variables": {
        "basePath": {
          "default": "/identity"
        }
      }
    }
  ],
  "paths": {
    "/otp/totp": {
      "post": {
        "tags": [
          "OTP"
        ],
        "summary": "Verify TOTP code",
        "description": "Verify TOTP code provided by user",
        "requestBody": {
          "description": "Verify code from user within authentication domain",
          "content": {
            "application/json": {
              "schema": {
                "$ref": "#/components/schemas/Verify"
              }
            }
          },
          "required": true
        },
        "responses": {
          "200": {
            "description": "Completed verification of TOTP operation",
            "content": {
              "application/json": {
                "schema": {
                  "$ref": "#/components/schemas/VerifyResponse"
                }
              }
            }
          }
        },
        "security": [
          {
            "api_key": []
          }
        ]
      }
    }
  },
  "components": {
    "schemas": {
      "VerifyResponse": {
        "title": "VerifyResponse Schema",
        "required": [
          "verified"
        ],
        "type": "object",
        "properties": {
          "verified": {
            "type": "boolean",
            "description": "Outcome of verifying TOTP (true: verified; false: not verified)."
          }
        }
      },
      "Verify": {
        "title": "Verify Schema",
        "required": [
          "code",
          "domain",
          "user_id"
        ],
        "type": "object",
        "properties": {
          "domain": {
            "type": "string",
            "description": "Authentication domain for user."
          },
          "user_id": {
            "type": "string",
            "description": "Identifier for user."
          },
          "code": {
            "type": "string",
            "description": "TOTP code from user to be verified."
          }
        }
      }
    },
    "securitySchemes": {
      "api_key": {
        "type": "apiKey",
        "name": "x-api-key",
        "in": "header"
      }
    }
  },
  "x-readme": {
    "explorer-enabled": true,
    "proxy-enabled": true
  }
}
```