Skip to content

API keys

mPaka uses two separate credentials:

  • Your account session signs you into the web console and the CLI account commands.
  • An API key authorizes workload commands such as mpaka run and direct HTTP requests to https://api.mpaka.dev.

Signing in does not populate MPAKA_API_KEY. Create a key explicitly before submitting a workload.

  1. Open API keys in the mPaka console.
  2. Choose a name that identifies one client or environment.
  3. Create the key and copy its token immediately.

The console is for credential and execution administration. It does not accept source code for execution.

The CLI can create, list, rotate, and delete keys from a saved account session:

Terminal window
mpaka login --email user@example.com
mpaka api-keys create --name development
mpaka api-keys list
mpaka api-keys rotate <KEY_ID>
mpaka api-keys delete <KEY_ID>

Creating, rotating, and deleting keys requires an owner account. list returns metadata only. create and rotate print the token once to standard output and do not save it, even when using --json. Avoid shell tracing, CI log capture, and build artifacts; store the token securely and provide it to workload clients as MPAKA_API_KEY. Rotation invalidates the prior token, and deletion revokes it. The HTTP API reference documents the corresponding routes and their session requirements.

For an interactive terminal, enter the token without echoing it or placing it in shell history:

Terminal window
printf 'mPaka API key: '
read -r -s MPAKA_API_KEY
printf '\n'
export MPAKA_API_KEY

In PowerShell, use a secure prompt:

Terminal window
$secureKey = Read-Host 'mPaka API key' -AsSecureString
$env:MPAKA_API_KEY = (New-Object System.Net.NetworkCredential('', $secureKey)).Password
Remove-Variable secureKey

For an application or deployment, use its secret manager and inject MPAKA_API_KEY at runtime. Do not put the token in source control, documentation, browser storage, logs, screenshots, or a command-line argument.

Use a separate key for each client or environment when practical. This lets you rotate or delete one integration without interrupting unrelated clients.

Rotation in the console or with mpaka api-keys rotate <KEY_ID> creates a new token and invalidates the previous token. Copy the new value when it is shown, update the client secret, and verify the client with a non-destructive request such as:

Terminal window
mpaka executions list

Any process still using the previous token will receive an authentication failure.

Choose Delete from the key’s actions in the console or run mpaka api-keys delete <KEY_ID> to revoke it. Deletion permanently stops the credential from authorizing new requests and removes its record from the API-key inventory. Confirm that no active client still depends on it, and create a replacement first when continuity matters.

Rotate it immediately when you can update every intended client, or delete it when the credential must stop working without delay. Remove the exposed value from the affected system; do not wait for usage metadata before treating it as compromised.

Continue with the CLI reference or the HTTP API.