Create Your Account
Sign up for a free Mantlz account at mantlz.app.Your account includes:
- Unlimited forms
- Real-time analytics dashboard
- Form submission management
- API access
The free plan includes access to all core features with generous limits. Custom redirects require a STANDARD or PRO plan.
Get Your API Key
After signing in, navigate to your dashboard and locate your API key:
- Go to Settings → API Keys
- Copy your API key (starts with
mk_) - Store it securely - you’ll need it in the next step
Install the SDK
Install the Mantlz SDK in your Next.js project:The SDK requires the following peer dependencies (likely already in your project):
next>= 15.0.0react>= 19.0.0react-dom>= 19.0.0zod>= 3.0.0
Configure the Provider
Wrap your application with the Add your API key to
MantlzProvider in your root layout:app/layout.tsx
.env.local:.env.local
The provider injects necessary styles and creates a client instance that all Mantlz components can access.
Create a Form in Dashboard
Before you can embed a form, create one in your Mantlz dashboard:
- Navigate to Forms → Create New Form
- Choose a form type (Waitlist, Contact, Feedback, etc.)
- Configure your fields and settings
- Copy the Form ID (e.g.,
form_abc123xyz)
Next Steps
Now that you have your first form working, explore these features:Customize Your Forms
Learn about themes and styling options
Form Types
Explore all available form types
Analytics
Track form submissions and insights
Advanced Features
Discover advanced SDK features
Form Types
Explore different form types for various use cases
Analytics
Track submissions and analyze form performance
Theming
Customize your forms with themes and styles
Quick Examples
Waitlist Form with User Count
Display how many people have already joined:Themed Contact Form
Apply a pre-built theme for instant styling:Form with Custom Redirect
Redirect users after successful submission (requires STANDARD or PRO plan):Free plan users will be redirected to Mantlz’s hosted thank-you page. Upgrade to STANDARD or PRO for custom redirect URLs.
Troubleshooting
API Key Not Found
If you see an error about missing API key:- Verify the key is in your
.env.localfile - Restart your development server
- Check that the key starts with
mk_
Form Not Loading
If your form doesn’t appear:- Verify the
formIdmatches your dashboard - Check browser console for errors
- Ensure the
MantlzProviderwraps your component tree - Confirm your API key is active in the dashboard
CORS Errors
The SDK automatically handles CORS withmode: 'cors' and credentials: 'include'. If you encounter CORS issues:
- Verify your API key is valid
- Check your domain is allowed in dashboard settings
- Ensure you’re using HTTPS in production
Getting Help
Need assistance? We’re here to help:- Documentation: Browse our comprehensive guides
- GitHub Issues: Report bugs or request features
- Email: [email protected]
- Discord: Join our community (coming soon)