Quickstart
This quickstart guide will help you swiftly set up a customizable API Documentation Portal for your APIs using the APIMatic Command Line Interface (CLI).
By the end of this guide, you'll have created a fully functional API Documentation Portal with:
- Interactive API reference documentation
- Live API playground for testing API Endpoints
- Multi-language SDKs with ready-to-use code samples
- Language-specific getting started guides
Time required: ~5 minutes
Lets get started!
Setup
1. Install the APIMatic CLI
Before you begin, ensure you have Node.js ( >= v20) and npm installed.
You can quickly check by running node -v
and npm -v
in your terminal.
To install the APIMatic CLI, open your terminal or command prompt and run the following command:
npm install -g @apimatic/cli
If you encounter any issues during installation, ensure Node.js is properly installed and up-to-date.
Verify installation:
apimatic --version
# Expected output:
@apimatic/cli/1.1.0 [platform] [node version]
# Note: The installed CLI version number may be different in your case.
✅ Success: CLI is installed and ready to use!
2. Login
Authenticate with your APIMatic account:
apimatic auth:login
Follow the prompts to:
- Enter your APIMatic email address
- Enter your password
Verify Login:
apimatic auth:status
#Expected output:
Currently logged in as user@apimatic.io
✅ Success: You're authenticated and ready to use APIMatic!
3. Run Quickstart
It's recommended to start your project in a new, empty directory. Create a new directory and navigate into it.
mkdir hello-apimatic
cd hello-apimatic
Then, create your first API portal using the interactive quickstart:
apimatic portal:quickstart
The interactive wizard will walk you through:
- Importing your API definition.
- Selecting the SDK languages you want to generate.
- Setting up the basic project scaffolding for your portal.
- Generating the API Portal files.
- Finally, starting a local development server to preview your portal.
Expected Final Output:
◇ ✅ Portal setup complete!
│
◇ 📢 Your API Portal is live at: http://localhost:3000
✅ Success: Your API portal is running locally!
Your browser should open automatically and display the created Portal. Hot reloading is enabled by default, so any changes you make to your source code will be reflected in the Portal.
If you encounter any issues during this process, reach out to our support team for assistance.
What's Next?
Time to see what your API portal can do!
- Explore the API reference - Browse the auto-generated endpoints and models to see how your OpenAPI definition translates into documentation.
- Test the API playground - Provide your authentication details and input parameters to make live API calls directly from the browser.
- Try out an SDKs - Download an SDK, follow the setup instructions in the Getting Started guide, and use the provided code samples to make your first API call.
Your API portal is running on a local server. If you terminate this live server, you can restart it by navigating to your project directory and running the following command:
apimatic portal:serve
Continue your API Portal journey
Now that you have a basic API Portal set up, you can continue to enhance it in the next guide on Customizing your API Portal.