Skip to content

Authentication

A credential says who is making a request, and can limit what that request is allowed to do. Your access to the resource still applies.

On this page

Credentials

#
CredentialWhat it authorizes
API keyA key created for an organization acts with your permissions there, bounded by its allowed commands and resource scope. See API keys.
Sign-inA dashboard, CLI or agent sign-in acts with your permissions. See Keys and sign-ins.
SSH keyA registered public key can open Computer sessions within its scope. An unrestricted key can also run management commands. See SSH keys.

The request's reference page identifies any credential requirements. Every API key can read the command catalog.

HTTP API

#

Send the API key in the Authorization: Bearer … header. The API also accepts a sign-in key, a website sign-in token or a bearer token signed with an unrestricted registered SSH key. The dashboard uses its signed-in browser session. Requests that change state using the browser session must come from Heaven's own origin.

CLI

#

For management commands, HEAVEN_API_KEY takes precedence over a saved heaven login credential. Either sends commands over HTTPS. With neither set, the CLI uses your SSH keys. An expired or revoked HTTPS credential produces an error.

A Computer shell uses SSH even when you're signed in. The CLI can use its own SSH key if you registered it when approving the sign-in.

SSH

#

Present a registered SSH key at heaven.dev. A key limited to one Computer or tag can connect to matching Computers. Management at cli@heaven.dev requires a key without that restriction.

MCP

#

The hosted MCP server accepts an OAuth sign-in or an API key in the Authorization: Bearer … header. Its OAuth access tokens are for /mcp only. The local server follows the CLI credential order using its process's environment and available SSH keys.

Refusals

#
ErrorHTTP statusWhat to check
unauthenticated401Supply a valid credential if yours is missing, expired or revoked.
denied403Check whether your credential can run the command and whether you have the required access.
not_found404Check the target's name or ID, organization and credential scope. A resource outside your visibility can produce this error.

See Errors for the structured error fields and the full list.