HSX_E_API_UNAUTHORIZED

API rejected your credentials.

What this error means

401 or 403 from HubSpot or HS-X.

When this error stops a command, hs-x exits with code 10. With --json, the failure is reported as a structured error whose code field is HSX_E_API_UNAUTHORIZED — stable to match on in scripts and agents.

Likely causes

  • PAK expired or revoked
  • PAK lacks scope for this endpoint
  • Per-portal CRM data (HubSpot)

How to fix it

  • Run hs-x connect to re-auth
  • Check the scopes on your app

Still stuck? Re-run the command with --debug for the wire-level detail, or hs-x doctor to check accounts, link state, and connectivity in one pass.