A script needs to retrieve a report overnight or access MainPath after a build. Both need a way to authenticate without an open browser. Since 5 August 2026, you can create personal API keys for these tasks.
Create, review and revoke keys
Key management lives in your account settings. There you can create keys, review existing entries and revoke keys you no longer need.
The secret value is shown once, immediately after creation. Copy it into your pipeline’s secret storage or your password manager. You cannot retrieve it again later. If you lose it, create a new key and revoke the old one. This also means that someone with access to your account cannot read the stored secret later.
Authentication for scripts and pipelines
An API key lets the mp CLI authenticate without a browser login beforehand. Your own scripts can use keys to access the MainPath API as well. Common uses include:
- Tasks after a build: A pipeline triggers a step or reads data on MainPath.
- Recurring jobs: Reports, cleanup tasks or exports run on a schedule.
- Internal tools: Command line programs or small interfaces work with platform data.
These workflows can authenticate without someone confirming a login dialog while they run.
Pipeline for Customer App
Other ways to work outside the browser
MainPath also provides the MainPath Toolbox for the desktop, the mp CLI for the terminal and a plugin for VS Code. An MCP server lets AI coding agents work with MainPath.
Keep a separate key for each purpose
Create separate keys for your CI pipeline, local tool and nightly script. When you need to replace a key, only the workflow using it is affected.
Keys are personal, and actions taken with your key are attributed to you. A colleague who needs access should create their own key. If your key ends up somewhere it should not be, revoke it and create a replacement.
Keep secrets out of repositories, even during a quick test. Deleting a value from a file later does not remove it from the existing Git history.
Connect the key to a workflow
Choose the workflow that needs a key and decide where to store its secret value. The CLI and agent plugin guide covers setting up the tools. For an overview of automated workflows, see CI/CD automation.