Get Started with the APIMatic CLI

Sign in to the APIMatic CLI and find your way around its commands and help.

Most APIMatic CLI commands need you to be signed in to an APIMatic account. If you don't have one yet, sign up for free.

Note: You need the APIMatic CLI installed. See Install the APIMatic CLI.

Sign in

With your APIMatic account

apimatic auth login

The CLI opens your default browser so you can sign in securely. Then confirm your session:

apimatic auth status

The output shows the account you're signed in as and the SDK languages available on your plan.

With an API key

Use an API key when a browser isn't available, such as on a build server:

apimatic auth login --auth-key=<your-api-key>

Override the API key for one command

Most commands that need authentication, such as portal generate, sdk generate, and api validate, also accept --auth-key. It overrides the signed-in session for that command only, which is useful in CI/CD pipelines. sdk publish doesn't take --auth-key, so in CI sign in first with apimatic auth login --auth-key=....

apimatic portal generate --auth-key=$APIMATIC_API_KEY

Sign out

apimatic auth logout

How commands are organized

Related commands are grouped into topics. Run a command as apimatic <topic> <command>, for example apimatic sdk generate.

TopicWhat it covers
quickstartInteractive setup for your first portal or SDK
apiValidate and transform API definitions
sdkGenerate, customize, and publish APIMatic SDKs
portalGenerate and preview developer portals
pluginGenerate and publish APIMatic Context Plugins
publishingManage SDK publishing profiles
authSign in, sign out, and check your session

Get help

List every topic and command:

apimatic help

Show help for one command, including its flags and examples:

apimatic help sdk generate
apimatic sdk generate --help

Add -n (--nested-commands) to include the commands nested under a topic.

Next steps

See the CLI Reference for every command and flag, or follow the Quickstart to build your first portal.

On this page