{
  "openapi": "3.1.0",
  "info": {
    "title": "formfit API",
    "version": "0.1.0",
    "description": "Edge-first input validation & normalization APIs, strong on Japanese (furigana, wareki dates, full-width text, corporate numbers). Pure logic — no external I/O. One API key covers every endpoint (domain-unified billing). All /api/v1/* endpoints require `Authorization: Bearer <API key>`. Human docs: https://formfit.dev/en · LLM docs: https://formfit.dev/llms-full.txt"
  },
  "servers": [
    {
      "url": "https://formfit.dev"
    }
  ],
  "security": [
    {
      "bearerAuth": []
    }
  ],
  "paths": {
    "/api/v1/furigana": {
      "get": {
        "operationId": "formfit_furigana",
        "summary": "Generate kana readings from Japanese kanji names. Auto-fill furigana fields at the edge.",
        "description": "Generates katakana/hiragana readings from kanji names using a common-surname dictionary plus kana conversion, with honest confidence / unresolved reporting. Docs: https://formfit.dev/en/apis/furigana (en), https://formfit.dev/apis/furigana (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "furigana"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "山田太郎"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "reading": "ヤマダタロウ",
                    "method": "dict",
                    "confidence": "high"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/date/parse": {
      "get": {
        "operationId": "formfit_date_parse",
        "summary": "Normalize Japanese era dates (Reiwa/Heisei…) and mixed formats into ISO 8601.",
        "description": "Parses Japanese era notation, full-width digits and mixed separators into ISO 8601, and annotates Gregorian dates with the correct era — accurate to era-transition days. Docs: https://formfit.dev/en/apis/date (en), https://formfit.dev/apis/date (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "date"
        ],
        "parameters": [
          {
            "name": "date",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "令和6年1月2日"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "iso": "2024-01-02",
                    "wareki": "令和6年",
                    "valid": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/phone/validate": {
      "get": {
        "operationId": "formfit_phone_validate",
        "summary": "Validate and normalize Japanese phone numbers to E.164 — mobile/landline/toll-free detection.",
        "description": "Detects line types (mobile, IP, toll-free, landline) and normalizes full-width digits, separators and +81 country codes into E.164, national and international formats. Docs: https://formfit.dev/en/apis/phone (en), https://formfit.dev/apis/phone (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "phone"
        ],
        "parameters": [
          {
            "name": "number",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "090-1234-5678"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "valid": true,
                    "type": "mobile",
                    "e164": "+819012345678",
                    "formatted": "090-1234-5678"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/email/validate": {
      "get": {
        "operationId": "formfit_email_validate",
        "summary": "Syntax check + typo suggestion (gmial.com→gmail.com) + disposable/free/role detection.",
        "description": "Validates syntax, suggests fixes for typo’d major providers, and flags disposable domains, free providers and role-based addresses — no MX/SMTP I/O, fast enough per keystroke. Docs: https://formfit.dev/en/apis/email (en), https://formfit.dev/apis/email (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "email"
        ],
        "parameters": [
          {
            "name": "email",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "user@gmial.com"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "valid": true,
                    "suggestion": "user@gmail.com",
                    "disposable": false,
                    "freeProvider": false
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/normalize": {
      "get": {
        "operationId": "formfit_normalize",
        "summary": "Normalize full-width ASCII, half-width kana, ①→1, ㍿→株式会社 — Unicode NFKC at the edge.",
        "description": "NFKC-based text normalization that absorbs Japanese form-input variants before they pollute your database, with trim / whitespace-collapse options. Docs: https://formfit.dev/en/apis/normalize (en), https://formfit.dev/apis/normalize (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "normalize"
        ],
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "Ａ１２３ｶﾞ"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "normalized": "A123ガ",
                    "changed": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/corp/validate": {
      "get": {
        "operationId": "formfit_corp_validate",
        "summary": "Validate 13-digit corporate numbers and T+13 invoice registration numbers by check digit.",
        "description": "Implements the official check-digit algorithm for Japanese corporate numbers, plus invoice (qualified-invoice issuer) numbers via /api/v1/invoice/validate. Docs: https://formfit.dev/en/apis/corp (en), https://formfit.dev/apis/corp (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "corp"
        ],
        "parameters": [
          {
            "name": "number",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "8000000000001"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "valid": true,
                    "normalized": "8000000000001"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/romaji": {
      "get": {
        "operationId": "formfit_romaji",
        "summary": "Convert kana to romaji with correct sokuon/yōon/hatsuon handling — passport-style Hepburn.",
        "description": "Converts hiragana/katakana to Hepburn or Kunrei romaji, handling geminates (matcha), digraphs (sha/sya) and n→m before b/p/m (shimbun). Docs: https://formfit.dev/en/apis/romaji (en), https://formfit.dev/apis/romaji (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "romaji"
        ],
        "parameters": [
          {
            "name": "text",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "とうきょう"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "romaji": "toukyou",
                    "system": "hepburn"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/money/parse": {
      "get": {
        "operationId": "formfit_money_parse",
        "summary": "Parse \"1,000円\", \"￥１，２３４\", \"$1,000.50\" into numbers with currency detection.",
        "description": "Absorbs currency symbols, 円, digit separators and full-width digits into a clean number plus detected currency. No FX conversion (pure logic). Docs: https://formfit.dev/en/apis/money (en), https://formfit.dev/apis/money (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "money"
        ],
        "parameters": [
          {
            "name": "amount",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "1,000円"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "value": 1000,
                    "currency": "JPY",
                    "valid": true
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/card/validate": {
      "get": {
        "operationId": "formfit_card_validate",
        "summary": "Luhn check and brand detection (Visa/MC/Amex/JCB…). Raw PAN never echoed back.",
        "description": "Validates card numbers via Luhn + IIN prefix and detects the brand. Responses contain only masked/last4 — never the raw PAN. No authorization or existence checks. Docs: https://formfit.dev/en/apis/card (en), https://formfit.dev/apis/card (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "card"
        ],
        "parameters": [
          {
            "name": "number",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "4242424242424242"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "valid": true,
                    "brand": "visa",
                    "last4": "4242",
                    "masked": "•••• •••• •••• 4242"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/password/score": {
      "post": {
        "operationId": "formfit_password_score",
        "summary": "Score 0–4 with suggestions. POST-only by design; the password is never echoed.",
        "description": "Evaluates length, character classes, sequences and common passwords into a 0–4 score with improvement hints. POST-only so secrets never hit URLs or access logs. Docs: https://formfit.dev/en/apis/password (en), https://formfit.dev/apis/password (ja). Batch: send a plural array field (max 1000 items).",
        "tags": [
          "password"
        ],
        "requestBody": {
          "required": true,
          "content": {
            "application/json": {
              "schema": {
                "type": "object"
              },
              "example": {
                "password": "Tr0ub4dour&3"
              }
            }
          }
        },
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "score": 3,
                    "label": "strong",
                    "suggestions": []
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/corpname/normalize": {
      "get": {
        "operationId": "formfit_corpname_normalize",
        "summary": "Expand (株)/㈱ abbreviations, detect prefix/suffix designation, extract the core name.",
        "description": "Folds Japanese corporate-designation abbreviations into full forms and splits designation position (前株/後株) from the core company name — for dedupe and CRM cleansing. Docs: https://formfit.dev/en/apis/corpname (en), https://formfit.dev/apis/corpname (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "corpname"
        ],
        "parameters": [
          {
            "name": "name",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "(株)山田商店"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "normalized": "株式会社山田商店",
                    "coreName": "山田商店",
                    "kind": "株式会社",
                    "position": "prefix"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/url/validate": {
      "get": {
        "operationId": "formfit_url_validate",
        "summary": "Scheme completion, lowercasing, default-port removal. Rejects javascript: by default.",
        "description": "Standards-based URL validation and normalization. Scheme-less inputs get https://; only http/https allowed by default. No reachability checks. Docs: https://formfit.dev/en/apis/url (en), https://formfit.dev/apis/url (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "url"
        ],
        "parameters": [
          {
            "name": "url",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "example.com"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "valid": true,
                    "normalized": "https://example.com/",
                    "protocol": "https"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/iban/validate": {
      "get": {
        "operationId": "formfit_iban_validate",
        "summary": "IBAN mod-97 + per-country length validation, plus BIC/SWIFT format parsing.",
        "description": "Validates IBANs with the mod-97 checksum and per-country lengths, returning the grouped canonical form; BIC/SWIFT codes are validated and decomposed at /api/v1/bic/validate. Docs: https://formfit.dev/en/apis/iban (en), https://formfit.dev/apis/iban (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "iban"
        ],
        "parameters": [
          {
            "name": "value",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "GB29NWBK60161331926819"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "valid": true,
                    "countryCode": "GB",
                    "normalized": "GB29 NWBK 6016 1331 9268 19"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/invoice/validate": {
      "get": {
        "operationId": "formfit_invoice_validate",
        "summary": "Validate a Japanese invoice (qualified-invoice issuer) registration number (T+13 digits)",
        "description": "Implements the official check-digit algorithm for Japanese corporate numbers, plus invoice (qualified-invoice issuer) numbers via /api/v1/invoice/validate. Docs: https://formfit.dev/en/apis/corp (en), https://formfit.dev/apis/corp (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "corp"
        ],
        "parameters": [
          {
            "name": "number",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "T8000000000001"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "valid": true,
                    "normalized": "8000000000001"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    },
    "/api/v1/bic/validate": {
      "get": {
        "operationId": "formfit_bic_validate",
        "summary": "Validate and decompose a BIC / SWIFT code (8 or 11 chars)",
        "description": "Validates IBANs with the mod-97 checksum and per-country lengths, returning the grouped canonical form; BIC/SWIFT codes are validated and decomposed at /api/v1/bic/validate. Docs: https://formfit.dev/en/apis/iban (en), https://formfit.dev/apis/iban (ja). Batch: POST the same path with a plural array field (max 1000 items).",
        "tags": [
          "iban"
        ],
        "parameters": [
          {
            "name": "value",
            "in": "query",
            "required": true,
            "schema": {
              "type": "string"
            },
            "example": "NWBKGB2L"
          }
        ],
        "responses": {
          "200": {
            "description": "Validation / normalization result",
            "content": {
              "application/json": {
                "schema": {
                  "type": "object",
                  "properties": {
                    "success": {
                      "type": "boolean"
                    },
                    "data": {
                      "type": "object"
                    }
                  }
                },
                "example": {
                  "success": true,
                  "data": {
                    "valid": true,
                    "countryCode": "GB",
                    "normalized": "GB29 NWBK 6016 1331 9268 19"
                  }
                }
              }
            }
          },
          "400": {
            "description": "Missing or invalid parameters"
          }
        }
      }
    }
  },
  "components": {
    "securitySchemes": {
      "bearerAuth": {
        "type": "http",
        "scheme": "bearer",
        "description": "API key (ppn_live_*), required on all /api/v1/* endpoints."
      }
    }
  }
}