A FastAPI-based contact form API that requires no signup or configuration for users. Just copy-paste the form code snippet and you are done!
- Zero Setup - No account creation, no API keys, no dashboard
- Auto Verification - First submission automatically verifies your domain
- Secure - Rate limiting, origin validation, spam prevention
- Multi-Tenant - Unlimited users can use the same API
- Simple Integration - No backend, no third party integration
- User copies code snippet for their desired framework
- Changes
toemail to their own - Adds form to their website
- First submission auto-verifies the domain and sends:
- The contact form submission
- A verification confirmation email
- All future submissions work automatically
- Change
toto your email address - Update
website_namewith your site name - Update
website_urlwith your site URL
- Submit the form once
- Check your email for:
- The submitted contact form
- A verification confirmation email
- Done! Your domain is automatically verified and all future submissions will arrive in your inbox.
- FastAPI
- SQLAlchemy
- PostgreSQL (Database)
- Resend (Email service)
- Pydantic (Data validation)
# Clone the repository
git clone https://github.com/Adelodunpeter25/ContactFast.git
cd ContactFast
# Install dependencies using uv
uv sync
# For development with code quality tools
uv sync --extra devCreate a .env file:
RESEND_API_KEY=your_resend_api_key_here
FROM_EMAIL=noreply@yourdomain.com
BASE_URL=http://localhost:8000
DATABASE_URL=postgresql://user:password@host:port/database# Activate virtual environment and run
uv run uvicorn main:app --reloadAPI will be available at http://localhost:8000
# Code formatting
uv run black .
# Linting
uv run ruff check .
# Type checking
uv run mypy .
# Auto-fix linting issues
uv run ruff check . --fixPOST /submit
Request Body:
{
"to": "recipient@example.com",
"website_name": "My Website",
"website_url": "https://mywebsite.com",
"name": "John Doe",
"email": "john@example.com",
"subject": "Inquiry",
"message": "Hello, I have a question..."
}First Submission Response:
{
"message": "Form submitted successfully! Domain auto-verified.",
"domain": "example.com",
"resend_response": {...}
}Subsequent Submissions:
{
"message": "Form submitted successfully!",
"resend_response": {...}
}MIT License
Contributions welcome! Please open an issue or PR.
Built by developers for developers who want simple contact forms without the hassle.