Skip to main content

Documentation Index

Fetch the complete documentation index at: https://mintlify.com/sam-shervin/space7/llms.txt

Use this file to discover all available pages before exploring further.

Overview

Verifies the one-time password (OTP) sent to a user’s email address during signup. Successful verification activates the account.

Endpoint

POST /api/auth/verify-otp

Request

Headers

HeaderValue
Content-Typeapplication/json

Body parameters

otp
string
required
The one-time password received at the user’s email address.
email
string
required
The email address the OTP was sent to.

Response

Success

status
number
HTTP status code of the response (e.g. 200).
...data
object
Confirmation data returned by the server on successful verification.

Error

error
string
Human-readable error message describing why OTP verification failed.
This endpoint is used to complete account activation after Sign Up. Submit the OTP exactly as received in the email.

Example

TypeScript
import { SERVER_ENDPOINT } from "@env";

const API = SERVER_ENDPOINT ?? "";

const verifyOTP = async (otp: string, email: string) => {
  const res = await fetch(`${API}/api/auth/verify-otp`, {
    method: "POST",
    headers: {
      "Content-Type": "application/json",
    },
    body: JSON.stringify({
      otp,
      email,
    }),
  });

  const data = await res.json();

  if (!res.ok) {
    throw new Error(data.error || "OTP verification failed");
  }

  return { status: res.status, ...data };
};

Build docs developers (and LLMs) love