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 runand direct HTTP requests tohttps://api.mpaka.dev.
Signing in does not populate MPAKA_API_KEY. Create a key explicitly before
submitting a workload.
Create a key
Section titled “Create a key”- Open API keys in the mPaka console.
- Choose a name that identifies one client or environment.
- Create the key and copy its token immediately.
The console is for credential and execution administration. It does not accept source code for execution.
Manage keys with the CLI
Section titled “Manage keys with the CLI”The CLI can create, list, rotate, and delete keys from a saved account session:
mpaka login --email user@example.commpaka api-keys create --name developmentmpaka api-keys listmpaka 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.
Store it safely
Section titled “Store it safely”For an interactive terminal, enter the token without echoing it or placing it in shell history:
printf 'mPaka API key: 'read -r -s MPAKA_API_KEYprintf '\n'export MPAKA_API_KEYIn PowerShell, use a secure prompt:
$secureKey = Read-Host 'mPaka API key' -AsSecureString$env:MPAKA_API_KEY = (New-Object System.Net.NetworkCredential('', $secureKey)).PasswordRemove-Variable secureKeyFor 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.
Rotate a key
Section titled “Rotate a key”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:
mpaka executions listAny process still using the previous token will receive an authentication failure.
Delete a key
Section titled “Delete a key”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.
If a key is exposed
Section titled “If a key is exposed”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.