HSX_E_DEPLOY_SCHEMA_SCOPES
HubSpot token is missing a property-write scope.
What this error means
`hs-x deploy --apply-schema` tried to create or alter portal property definitions, but HubSpot rejected the call (403 MISSING_SCOPES): the personal access key does not carry a property-settings write scope for the target object.
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_DEPLOY_SCHEMA_SCOPES — stable to match on in scripts and agents.
Likely causes
- The personal access key was created without
crm.schemas.<object>.write(e.g.crm.schemas.contacts.writefor contact properties; custom objects needcrm.schemas.custom.write) - Record-write scopes like
crm.objects.contacts.writedo NOT grant property creation — property definitions need thecrm.schemas.*scope
How to fix it
- Edit your personal access key at https://app.hubspot.com/l/personal-access-key and add the scope named in the error (HubSpot accepts any one scope from the list it returns), then re-run the deploy
- Preview the schema changes without applying:
hs-x deploy --plan --portal-schema-live
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.