API keys
Organization API keys are the normal way to call Moneyline from a server. The prefix tells you — and the API — which environment the key belongs to.
Send the key one of two ways. Both are accepted on every endpoint:
MONEYLINE_API_KEY from the environment, so the key rarely appears in code:
Personal access tokens
Tokens prefixedml_pat_ authenticate as a user rather than an organization, and carry that user’s permissions. They are intended for CLI use and local scripting, not for server-to-server traffic.
Session cookies
The dashboard authenticates with a session cookie issued by Better-Auth. This path exists for the first-party dashboard only — it is not a supported integration surface, and it is not exercised by the SDKs.Rotating a key
Create the replacement first, deploy it, then revoke the old key. Revocation takes effect immediately and in-flight requests using the revoked key will fail.The plaintext key is returned once, at creation. Afterwards only its prefix
and last four characters are readable.
Storing keys
Keep keys in your secret manager and expose them to the process asMONEYLINE_API_KEY. If a key leaks, revoke it — rotation is cheap, and there is no way to scope a leaked key retroactively.