OAuth Flow
Get Authorization URL
GET/api/v1/hubspot/auth-url
Returns HubSpot OAuth authorization URL and signed state token.
HubSpot OAuth URL
Signed state token (expires in 10 minutes)
OAuth Callback
POST/api/v1/hubspot/callback
Handles OAuth callback and creates/updates connection.
OAuth authorization code
Signed state token
Connection status
HubSpot connection ID
HubSpot portal ID
Connections
List Connections
GET/api/v1/hubspot/connections
Returns your active HubSpot connections.
Array of connection objects
Sync Pages
POST/api/v1/hubspot/sync/{connection_id}
Synchronizes HubSpot CMS pages for a connection.
Sync status
Number of pages synced
Pages
List Pages
GET/api/v1/hubspot/pages/{connection_id}
Returns synchronized HubSpot pages.
Array of HubSpot page objects
Recommendations
Get Recommendations
GET/api/v1/hubspot/recommendations/{audit_id}
Generates SEO recommendations for HubSpot pages based on an audit.
Array of recommendation objects
Apply Recommendations
POST/api/v1/hubspot/apply-recommendations
Applies a batch of recommendations to HubSpot pages.
Audit ID
Array of recommendations to apply
Batch operation status
Number of recommendations applied
Number of failed recommendations
Detailed results by page
Rollback Change
POST/api/v1/hubspot/rollback/{change_id}
Reverts a previously applied change.
Rollback status
ID of the rollback change record
Error Codes
Invalid OAuth callback or change cannot be rolled back
Invalid OAuth state
Cross-user access denied or legacy ownerless connection blocked
Page or change not found
Internal server error