@revfleet/hscli 0.8.12 → 0.9.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +197 -1
- package/README.md +243 -10
- package/dist/cli.js +27 -3
- package/dist/cli.js.map +1 -1
- package/dist/commands/agent/contracts.d.ts +3 -0
- package/dist/commands/agent/contracts.js +139 -0
- package/dist/commands/agent/contracts.js.map +1 -0
- package/dist/commands/agent/evidence.d.ts +68 -0
- package/dist/commands/agent/evidence.js +358 -0
- package/dist/commands/agent/evidence.js.map +1 -0
- package/dist/commands/agent/index.d.ts +3 -0
- package/dist/commands/agent/index.js +223 -0
- package/dist/commands/agent/index.js.map +1 -0
- package/dist/commands/agent/recipes.d.ts +13 -0
- package/dist/commands/agent/recipes.js +108 -0
- package/dist/commands/agent/recipes.js.map +1 -0
- package/dist/commands/agent/runner.d.ts +16 -0
- package/dist/commands/agent/runner.js +165 -0
- package/dist/commands/agent/runner.js.map +1 -0
- package/dist/commands/audit/index.js +4 -0
- package/dist/commands/audit/index.js.map +1 -1
- package/dist/commands/auth/index.js +64 -7
- package/dist/commands/auth/index.js.map +1 -1
- package/dist/commands/automation/index.js +30 -0
- package/dist/commands/automation/index.js.map +1 -1
- package/dist/commands/backup/index.d.ts +12 -0
- package/dist/commands/backup/index.js +459 -0
- package/dist/commands/backup/index.js.map +1 -0
- package/dist/commands/cms/content-ops.js +1 -1
- package/dist/commands/cms/content-ops.js.map +1 -1
- package/dist/commands/communication-preferences/index.js +207 -7
- package/dist/commands/communication-preferences/index.js.map +1 -1
- package/dist/commands/content-permissions/index.d.ts +22 -0
- package/dist/commands/content-permissions/index.js +141 -0
- package/dist/commands/content-permissions/index.js.map +1 -0
- package/dist/commands/context/index.d.ts +3 -0
- package/dist/commands/context/index.js +182 -0
- package/dist/commands/context/index.js.map +1 -0
- package/dist/commands/crm/associations.js +38 -0
- package/dist/commands/crm/associations.js.map +1 -1
- package/dist/commands/crm/custom-objects.js +39 -2
- package/dist/commands/crm/custom-objects.js.map +1 -1
- package/dist/commands/crm/dated.js +3 -3
- package/dist/commands/crm/dated.js.map +1 -1
- package/dist/commands/crm/migration.js +210 -2
- package/dist/commands/crm/migration.js.map +1 -1
- package/dist/commands/crm/properties.js +2 -1
- package/dist/commands/crm/properties.js.map +1 -1
- package/dist/commands/crm/property-batch.d.ts +1 -0
- package/dist/commands/crm/property-batch.js +44 -5
- package/dist/commands/crm/property-batch.js.map +1 -1
- package/dist/commands/crm/shared.js +21 -2
- package/dist/commands/crm/shared.js.map +1 -1
- package/dist/commands/crm/sync.js +1 -1
- package/dist/commands/crm/sync.js.map +1 -1
- package/dist/commands/doctor/index.js +193 -0
- package/dist/commands/doctor/index.js.map +1 -1
- package/dist/commands/email-tracking/index.d.ts +16 -0
- package/dist/commands/email-tracking/index.js +314 -0
- package/dist/commands/email-tracking/index.js.map +1 -0
- package/dist/commands/extensions/index.js +1 -1
- package/dist/commands/extensions/index.js.map +1 -1
- package/dist/commands/forms/index.js +15 -2
- package/dist/commands/forms/index.js.map +1 -1
- package/dist/commands/forms/legacy-v2.d.ts +7 -2
- package/dist/commands/forms/legacy-v2.js +103 -7
- package/dist/commands/forms/legacy-v2.js.map +1 -1
- package/dist/commands/guide/index.d.ts +1 -1
- package/dist/commands/guide/index.js +37 -4
- package/dist/commands/guide/index.js.map +1 -1
- package/dist/commands/internal/catalog.d.ts +1 -0
- package/dist/commands/internal/catalog.js +2 -0
- package/dist/commands/internal/catalog.js.map +1 -0
- package/dist/commands/internal/index.d.ts +26 -0
- package/dist/commands/internal/index.js +823 -0
- package/dist/commands/internal/index.js.map +1 -0
- package/dist/commands/internal-session.d.ts +15 -0
- package/dist/commands/internal-session.js +152 -0
- package/dist/commands/internal-session.js.map +1 -0
- package/dist/commands/lists/index.js +1 -1
- package/dist/commands/lists/index.js.map +1 -1
- package/dist/commands/marketing/email-audit.d.ts +32 -0
- package/dist/commands/marketing/email-audit.js +121 -0
- package/dist/commands/marketing/email-audit.js.map +1 -0
- package/dist/commands/marketing/index.js +2 -0
- package/dist/commands/marketing/index.js.map +1 -1
- package/dist/commands/mcp.js +5 -3
- package/dist/commands/mcp.js.map +1 -1
- package/dist/commands/playbooks/index.d.ts +3 -0
- package/dist/commands/playbooks/index.js +228 -0
- package/dist/commands/playbooks/index.js.map +1 -0
- package/dist/commands/portals/index.d.ts +3 -0
- package/dist/commands/portals/index.js +132 -0
- package/dist/commands/portals/index.js.map +1 -0
- package/dist/commands/reports/index.d.ts +3 -0
- package/dist/commands/reports/index.js +479 -0
- package/dist/commands/reports/index.js.map +1 -0
- package/dist/commands/sales-content/index.d.ts +13 -0
- package/dist/commands/sales-content/index.js +59 -0
- package/dist/commands/sales-content/index.js.map +1 -0
- package/dist/commands/sales-templates/index.d.ts +3 -0
- package/dist/commands/sales-templates/index.js +88 -0
- package/dist/commands/sales-templates/index.js.map +1 -0
- package/dist/commands/seed/cms.js +28 -45
- package/dist/commands/seed/cms.js.map +1 -1
- package/dist/commands/sequences/index.d.ts +18 -0
- package/dist/commands/sequences/index.js +263 -0
- package/dist/commands/sequences/index.js.map +1 -0
- package/dist/commands/settings/index.js +450 -102
- package/dist/commands/settings/index.js.map +1 -1
- package/dist/commands/settings/site-settings.d.ts +3 -0
- package/dist/commands/settings/site-settings.js +106 -0
- package/dist/commands/settings/site-settings.js.map +1 -0
- package/dist/commands/ui/index.js +14 -4
- package/dist/commands/ui/index.js.map +1 -1
- package/dist/commands/workflows/index.js +2 -0
- package/dist/commands/workflows/index.js.map +1 -1
- package/dist/commands/workflows/preflight.d.ts +23 -0
- package/dist/commands/workflows/preflight.js +295 -0
- package/dist/commands/workflows/preflight.js.map +1 -0
- package/dist/core/action-contract.d.ts +43 -0
- package/dist/core/action-contract.js +207 -0
- package/dist/core/action-contract.js.map +1 -0
- package/dist/core/auth.d.ts +6 -0
- package/dist/core/auth.js +85 -0
- package/dist/core/auth.js.map +1 -1
- package/dist/core/http.d.ts +8 -0
- package/dist/core/http.js +37 -5
- package/dist/core/http.js.map +1 -1
- package/dist/core/id-maps.d.ts +27 -0
- package/dist/core/id-maps.js +204 -0
- package/dist/core/id-maps.js.map +1 -0
- package/dist/core/output.d.ts +2 -1
- package/dist/core/output.js +34 -0
- package/dist/core/output.js.map +1 -1
- package/dist/mcp/profiles.d.ts +14 -0
- package/dist/mcp/profiles.js +68 -0
- package/dist/mcp/profiles.js.map +1 -0
- package/dist/mcp/server.d.ts +5 -3
- package/dist/mcp/server.js +22 -5
- package/dist/mcp/server.js.map +1 -1
- package/docs/CAPABILITY_LIBRARY.md +29 -8
- package/docs/COMMAND_TREE.md +99 -17
- package/docs/COMPARISON.md +8 -5
- package/docs/COOKBOOK.md +124 -5
- package/docs/INTERNAL-ENDPOINTS-DISCOVERY.md +813 -0
- package/docs/INTERNAL-ENDPOINTS.md +371 -0
- package/docs/INTERNAL_ENDPOINTS.md +243 -0
- package/docs/MARKETING_SETUP.md +21 -1
- package/docs/MCP.md +28 -89
- package/docs/MCP_TOOL_CATALOG.md +192 -0
- package/docs/MIGRATION_ADAPTERS.md +115 -0
- package/docs/PORTAL_BACKUP.md +212 -0
- package/docs/PUBLISHING.md +1 -1
- package/docs/SALES_CONTENT_INTERNAL_PUNCH_LIST.md +504 -0
- package/docs/TUTORIALS/secure-agent-writes.md +49 -0
- package/docs/WHY_HOW_WHAT.md +10 -4
- package/package.json +4 -2
|
@@ -0,0 +1,371 @@
|
|
|
1
|
+
# HubSpot Internal Endpoints (Full Catalogue)
|
|
2
|
+
|
|
3
|
+
Every internal (browser-cookie-authenticated) HubSpot endpoint hit across the <client> portal work. Sources: sessions <session-id> (<source portal>→<client> reports/dashboards/workflows), <session-id> + <session-id> + <session-id> (permission sets + property migration), <session-id> + <session-id> (Jun 18 dashboards), <session-id> (Jun 17). Live loop discovery in 15 iterations is in INTERNAL-ENDPOINTS-DISCOVERY.md.
|
|
4
|
+
|
|
5
|
+
## CSRF Unlock Pattern (Use Everywhere)
|
|
6
|
+
The cookie hubspotapi-csrf + header X-HubSpot-CSRF-hubspotapi unlocks every 401-blocked internal endpoint. This is the key for the adapter layer:
|
|
7
|
+
|
|
8
|
+
const csrf = document.cookie.split('; ').find(c => c.startsWith('hubspotapi-csrf='))?.split('=')[1];
|
|
9
|
+
const r = await fetch(url, { credentials: 'include', headers: { 'X-HubSpot-CSRF-hubspotapi': csrf } });
|
|
10
|
+
Applies to workflows, permission sets, FLP, brand kits, design manager, payments — everything.
|
|
11
|
+
|
|
12
|
+
Internal endpoint rules
|
|
13
|
+
|
|
14
|
+
Live host: https://app.hubspot.com
|
|
15
|
+
Auth: same-origin session cookie (credentials: 'include' from inside a HubSpot tab). Private App tokens are rejected.
|
|
16
|
+
Many endpoints reject simple GETs from the embedded sandbox — execute from the HubSpot tab via the Chrome extension's javascript_tool.
|
|
17
|
+
portalId query param is required on most calls. Source = <sourcePortalId>, live = <portalId>.
|
|
18
|
+
Status: ✅ worked, ⚠️ partial / inconsistent, ❌ 404/401 in this session.
|
|
19
|
+
Dashboards
|
|
20
|
+
Method Path Status Notes
|
|
21
|
+
GET /api/dashboard/v2/dashboard ✅ List dashboards. ?limit=200&offset=….
|
|
22
|
+
GET /api/dashboard/v2/dashboard/list ✅ Alt list.
|
|
23
|
+
GET /api/dashboard/v2/dashboard/search ✅ Search by name/owner.
|
|
24
|
+
GET /api/dashboard/v2/dashboard/total-count ✅ Quick count.
|
|
25
|
+
GET /api/dashboard/v2/dashboard/widget-counts ✅ Widget counts per dashboard.
|
|
26
|
+
GET /api/dashboard/v2/dashboard/all-shareable ✅ Shareable dashboards.
|
|
27
|
+
GET /api/dashboard/v2/dashboard/{id} ✅ Full dashboard + widgets.
|
|
28
|
+
POST /api/dashboard/v2/dashboard ✅ Create blank dashboard.
|
|
29
|
+
POST /api/dashboard/v2/dashboard/clone ✅ Clone (preserves widgets — used to bootstrap empty dashboards).
|
|
30
|
+
POST /api/dashboard/v2/clone-dashboard ✅ Alt clone path.
|
|
31
|
+
POST /api/dashboard/v2/dashboard/{id}/clone ✅ Per-dashboard clone.
|
|
32
|
+
POST /api/dashboard/v2/dashboard/{id}/duplicate ✅ Same as clone.
|
|
33
|
+
PUT /api/dashboard/v2/dashboard/{id} ⚠️ widgets array silently ignored — use widget endpoints.
|
|
34
|
+
DELETE /api/dashboard/v2/dashboard/{id} ☠️ Cascade delete: removes every widget report inside.
|
|
35
|
+
GET /api/dashboard/v2/dashboard/{id}/permission (sg) ✅ Single user permission.
|
|
36
|
+
GET/PUT /api/dashboard/v2/dashboard/{id}/permissions ✅ Bulk permissions.
|
|
37
|
+
GET /api/dashboard/v2/dashboard/{id}/permission-config ✅ Permission config (who has access modes).
|
|
38
|
+
GET /api/dashboard/v2/dashboard/{id}/permission-grants ✅ Explicit grants.
|
|
39
|
+
POST /api/dashboard/v2/dashboard/{id}/widget/from-report ✅ Attach a single report as widget.
|
|
40
|
+
POST /api/dashboard/v2/dashboard/{id}/widget/from-reports ⚠️ Bulk attach. No-ops silently on empty dashboards (returns 204) — clone a populated one first.
|
|
41
|
+
POST /api/dashboard/v2/dashboard/{id}/widget ✅ Generic add widget.
|
|
42
|
+
PUT /api/dashboard/v2/dashboard/{id}/widgets ⚠️ Bulk update.
|
|
43
|
+
DELETE /api/dashboard/v2/dashboard/{id}/widget/{wid} ✅ Detach single widget WITHOUT deleting underlying report.
|
|
44
|
+
GET /api/dashboard/v2/report-list-views ✅ "My reports" / saved-view manager.
|
|
45
|
+
GET /api/dashboard/v2/report-list-views/pinned ✅ Pinned views.
|
|
46
|
+
GET /api/dashboard/v2/reports/report-counts ✅ Total report count per view.
|
|
47
|
+
Reports
|
|
48
|
+
Method Path Status Notes
|
|
49
|
+
GET /api/dashboard/v2/reports ✅ List reports.
|
|
50
|
+
GET /api/dashboard/v2/reports/list ✅ Alt list.
|
|
51
|
+
GET /api/dashboard/v2/reports/search ✅ Search reports.
|
|
52
|
+
GET /api/dashboard/v2/reports/{id} ✅ Report definition + chart config.
|
|
53
|
+
POST /api/dashboard/v2/reports ✅ Create report.
|
|
54
|
+
PUT /api/dashboard/v2/reports/{id} ✅ Update report.
|
|
55
|
+
DELETE /api/dashboard/v2/reports/{id} ✅ Hard delete.
|
|
56
|
+
GET /api/dashboard/v2/reports/{id}/history ✅ Version history.
|
|
57
|
+
GET /api/dashboard/v2/reports/{id}/audit ✅ Per-report audit.
|
|
58
|
+
GET /api/dashboard/v2/reports/permission ✅ Permission probe.
|
|
59
|
+
GET/PUT /api/dashboard/v2/reports/{id}/permissions ✅ Set perms.
|
|
60
|
+
GET /api/dashboard/v2/widget / /api/dashboard/v2/widget/{id} ✅ Per-widget access.
|
|
61
|
+
❌ /api/reports-list-app/v1/dashboards 404 Doesn't exist; use /api/dashboard/v2.
|
|
62
|
+
Reporting backend (data resolve)
|
|
63
|
+
Method Path Status Notes
|
|
64
|
+
POST /api/reporting/v3/dataset/resolve/async ✅ Async dataset resolve for report rendering.
|
|
65
|
+
POST /api/reporting/v3/journey/{reportId}/resolve/async ✅ Journey reports.
|
|
66
|
+
POST /api/reporting-migration/v2/reports/migrate ✅ Internal cross-portal report migration.
|
|
67
|
+
POST /api/reporting-usage-service/v1/ingestion/report ✅ Telemetry only.
|
|
68
|
+
Workflows
|
|
69
|
+
Method Path Status Notes
|
|
70
|
+
GET /api/automation/v4/flows ✅ List flows. Hard cap limit=100; paginate via after.
|
|
71
|
+
GET /api/automation/v4/flows/{id} ❌ 401 from in-tab JS.
|
|
72
|
+
POST /api/automation/v4/flows ✅ Create flow.
|
|
73
|
+
PUT/PATCH /api/automation/v4/flows/{id} ✅ Update.
|
|
74
|
+
DELETE /api/automation/v4/flows/{id} ✅ Soft delete; recoverable from Deleted view.
|
|
75
|
+
GET /api/automation/v3/workflows ✅ Legacy v3.
|
|
76
|
+
GET /api/automation/v3/workflows/{id} ❌ 401 in-tab.
|
|
77
|
+
GET /api/automation/v3/flows ✅ Legacy alias.
|
|
78
|
+
GET /api/automation/flows/v3/flows/{id} ❌ 404.
|
|
79
|
+
GET /api/workflows-engine/v1/flows/{id} ❌ 404.
|
|
80
|
+
GET /automation-platform/v1/flows/{id} ❌ 404.
|
|
81
|
+
Owner discovery workaround: list endpoints omit creator. Add "Created by" column to the workflows UI list and scrape DOM.
|
|
82
|
+
|
|
83
|
+
Properties
|
|
84
|
+
Method Path Status Notes
|
|
85
|
+
GET /api/properties/v1/contacts/properties ✅ Oldest v1.
|
|
86
|
+
GET /api/properties/v2/{object}/properties ✅ Legacy v2 — returns createdUserId reliably even for old properties (v3 sometimes omits it).
|
|
87
|
+
GET /api/properties/v2/contacts/properties ✅
|
|
88
|
+
GET /api/properties/v2/companies/properties ✅
|
|
89
|
+
GET /api/properties/v2/deals/properties ✅
|
|
90
|
+
GET /properties/v3/object/0-1/properties ✅ v3 surface (typeId-keyed).
|
|
91
|
+
GET /api/properties/v4/{typeId} ✅ v4 — current internal surface. typeId ∈ 0-1 (contact) / 0-2 (company) / 0-3 (deal) / 0-5 (ticket) / 0-14 (quote) / 0-136 (lead).
|
|
92
|
+
GET /api/properties/v4/{typeId}/named/{name} ✅ Single property by internal name.
|
|
93
|
+
GET /api/properties/v4/groups/{typeId} ✅ Property groups.
|
|
94
|
+
GET /api/properties/v4/groups/{typeId}/properties ✅ Properties within groups.
|
|
95
|
+
GET /api/properties/v4/recycle/{typeId} ✅ Recycled (soft-deleted) properties.
|
|
96
|
+
GET /api/properties/v4/properties/combined-count ✅ Counts across all objects.
|
|
97
|
+
GET /api/properties/v4/properties/{typeId}/custom-limits-and-counts ✅ Custom property quota check.
|
|
98
|
+
GET /api/property-validation/v1/properties/{objectId} ✅ Validation rules per property.
|
|
99
|
+
GET /api/property-validation/v1/business-unit-property/{typeId}/property/{name} ✅ BU-scoped validation.
|
|
100
|
+
POST /api/property-validation/v1/custom-property-validation ✅ Run a validation rule.
|
|
101
|
+
GET /api/conditional-properties/v2/options/{typeId}/{propertyName} ✅ Conditional option lists (used for cascading picklists).
|
|
102
|
+
GET /api/property-settings/v1/property-fill-rate/{typeId}/batch/read ✅ Property fill-rate batch read.
|
|
103
|
+
GET /api/external-options/v3/fetch/... ✅ External-options fetch for dynamic option lists.
|
|
104
|
+
Lists / segments (many overlapping families — none consistent)
|
|
105
|
+
Method Path Status Notes
|
|
106
|
+
GET /api/lists/v3/lists ✅ New lists API.
|
|
107
|
+
GET /api/lists/v3/{portal}/lists ✅ Portal-scoped form.
|
|
108
|
+
GET /api/lists/v3/lists/{id} ✅ Single list.
|
|
109
|
+
GET /api/lists/v3/{portal}/lists/{id}/segments ✅ Segments inside list.
|
|
110
|
+
POST /api/lists/v3/lists/search ⚠️ 404/405 depending on body shape.
|
|
111
|
+
GET /api/lists/v2/lists/{id} ✅ Legacy.
|
|
112
|
+
GET /api/contacts/v1/lists ✅ Oldest contacts-only API.
|
|
113
|
+
GET /api/contacts/v1/lists/{id} ✅
|
|
114
|
+
GET /api/contact-list-management/v1/{portal}/lists/{id} ✅ UI-facing.
|
|
115
|
+
GET /api/contact-list/v1/lists/{id} ⚠️ Inconsistent.
|
|
116
|
+
GET /api/contact-lists/v1/{portal}/lists/{id} ⚠️
|
|
117
|
+
GET /api/ils-segments/v1/{portal}/segments/{id} ✅ New ILS segment store.
|
|
118
|
+
GET /api/ils-segments/v1/portals/{portal}/segments/{id} ✅ Alt form.
|
|
119
|
+
GET /api/ils-segment-store/v1/segments ✅ Bulk store query.
|
|
120
|
+
GET /api/ils/v1/segments/{id} ⚠️
|
|
121
|
+
GET /api/segments-ui/v1/segments/{portal}/{id} ✅ UI-facing.
|
|
122
|
+
GET /api/segments/v1/segments/{id} ⚠️
|
|
123
|
+
GET /api/segments/v3/segments/{id} ⚠️
|
|
124
|
+
GET /api/list-segments/v1/{portal}/segments/{id} ⚠️
|
|
125
|
+
GET /api/list-segments/v2/{portal}/segments/{id} ⚠️
|
|
126
|
+
GET /api/list-segments-public/v1/{portal}/segments/{id} ⚠️
|
|
127
|
+
GET /api/lists-search/v1/segments/all/legacy/{portal} ✅ Search all segments.
|
|
128
|
+
❌ /api/contacts-list-app/v1/lists/search 404
|
|
129
|
+
Practical advice: for list discovery, use the UI under /contacts/{portal}/objectLists/views/all?objectTypeId={0-1|0-2|0-3|0-5} and scrape DOM. APIs are fragmented and inconsistent.
|
|
130
|
+
|
|
131
|
+
Templates / sales content
|
|
132
|
+
Method Path Status Notes
|
|
133
|
+
GET /api/templates/v1/templates?portalId={p}&folder={fId} ✅ List templates in folder; returns owner + content.
|
|
134
|
+
POST /api/templates/v1/templates ✅ Create.
|
|
135
|
+
GET /api/sales-content/v1/templates ✅ Alt path.
|
|
136
|
+
GET /api/sales-content/v1/sequences ✅ Sequences via sales-content.
|
|
137
|
+
GET /api/sales-content-libraries/v2/sales/email-templates ✅ Newer library API.
|
|
138
|
+
Sequences (full body now reachable — corrects prior 404 finding)
|
|
139
|
+
Method Path Status Notes
|
|
140
|
+
POST /api/salescontentsearch/v2/search?portalId={p} ✅ List endpoint. Body {query:"", limit:100, offset:N}. Returns mixed content; filter contentType === 'SEQUENCE' client-side. Paginate with offset + hasMore.
|
|
141
|
+
GET /api/sequences/v3/sequences/{sequenceId} ✅ Full sequence body — steps, settings, emailPattern (templateId), taskPattern, sendWindow, unenrollment rules, dependencies. ~3KB per sequence. Requires CSRF.
|
|
142
|
+
GET /api/sequences/v2/sequences/usage ✅ Usage / quota.
|
|
143
|
+
GET /api/sequences/v2/enrollments/impacted ✅ Active enrollments.
|
|
144
|
+
GET /api/sequences/v2/enrollments/health-check ✅ Enrollment health.
|
|
145
|
+
GET /api/sequences/v3/folders/count ✅ Folder count.
|
|
146
|
+
❌ /api/sequences/v3/sequences (list) 404 List goes via salescontentsearch above.
|
|
147
|
+
See INTERNAL-ENDPOINTS-DISCOVERY.md § Iteration 15 for full sequence response shape + export pipeline.
|
|
148
|
+
|
|
149
|
+
Playbooks (full body via chirp RPC)
|
|
150
|
+
All playbook surface lives behind com.hubspot.playbooks.rpc.PlaybooksRpc chirp RPCs. URL pattern: POST /api/chirp-frontend-app/v1/gateway/com.hubspot.playbooks.rpc.{ServiceName}/{methodName}?portalId={p} with CSRF header.
|
|
151
|
+
|
|
152
|
+
Service Method Body Returns
|
|
153
|
+
PlaybooksRpc listPlaybooks {} {playbooks:[…]} with body (Draft.js JSON) + htmlBody (rendered) inline. Single call for full export.
|
|
154
|
+
PlaybooksRpc getPlaybookCount {} {count, limit:5000}
|
|
155
|
+
PlaybooksRpc getLatestPlaybookVersion {playbookId} Latest version body.
|
|
156
|
+
PlaybooksRpc getPlaybookVersionSummaries {playbookId} Version history.
|
|
157
|
+
PlaybookQuestionsRpc getLatestQuestionsByPlaybook {playbookId} All questions with answerType + quickAnswers. Linked from htmlBody via <question qid="…"> tags.
|
|
158
|
+
Chirp response wrapper: {type:"data", data:{…}, correlationId} — real payload is in .data.
|
|
159
|
+
|
|
160
|
+
See INTERNAL-ENDPOINTS-DISCOVERY.md § Iteration 15 for full playbook shape + export pipeline.
|
|
161
|
+
|
|
162
|
+
Marketing email (all failed in-tab during this session)
|
|
163
|
+
Path Status
|
|
164
|
+
/api/marketing-emails/v1/emails ❌ 404
|
|
165
|
+
/api/email-publisher/v1/emails ❌ 404
|
|
166
|
+
/api/cosemail/v1/emails ❌ 404
|
|
167
|
+
/api/email-engine/v3/emails ❌ 404
|
|
168
|
+
/api/email-management/v1/emails ❌ 404
|
|
169
|
+
/api/email-management/v3/email ❌ 404
|
|
170
|
+
/api/email-management/v3/email-stats ❌ 404
|
|
171
|
+
/api/email/v1/emails ❌ 404
|
|
172
|
+
/api/email/v1/emails/list ❌ 404
|
|
173
|
+
/cmscontent-api/v3/email/ ❌ 404
|
|
174
|
+
/cmscontent/v3/email/ ❌ 404
|
|
175
|
+
Practical: navigate /email/{portal}/manage/state/all?businessUnitId=… and scrape. Marketing email pages are scoped per businessUnitId.
|
|
176
|
+
|
|
177
|
+
Audit log (very useful for creator discovery)
|
|
178
|
+
Method Path Status Notes
|
|
179
|
+
GET /api/audit-log/v1/audit-entries?objectType={t}&objectId={id} ✅ Per-object history; objectType ∈ LIST_AGGREGATION, DASHBOARD, REPORT, WORKFLOW.
|
|
180
|
+
GET /api/audit-log/v1/portal/{portal} ✅ Portal-wide.
|
|
181
|
+
GET /api/audit-logs/v1/portal/{portal} ✅ Plural alias.
|
|
182
|
+
GET /api/audit-logs/v1/portal/{portal}/logs ✅ Detail.
|
|
183
|
+
GET /api/security-audit-log/v1/portal/{portal} ✅ Security-only audit.
|
|
184
|
+
GET /api/security-logs/v1/portal/{portal}/logs ✅
|
|
185
|
+
GET /api/v1/security/audit-logs ✅ Older path.
|
|
186
|
+
GET /api/settings-ui/v1/audit-logs/{portal} ✅ Settings UI form.
|
|
187
|
+
Source-of-truth fallback when other endpoints lack creator. UI = /settings/{portal}/audits or /account-and-billing/{portal}/account-defaults/audit-logs.
|
|
188
|
+
|
|
189
|
+
Users, teams, permission sets (this is the permission-set surface)
|
|
190
|
+
Method Path Status Notes
|
|
191
|
+
GET /api/app-users/v1/users ✅ List portal users.
|
|
192
|
+
GET /api/app-users/v1/users/{userId} ✅ Single user with role + permission-set assignment.
|
|
193
|
+
POST /api/app-users/v1/users/partial/batch ✅ Batch read users with partial fields.
|
|
194
|
+
GET /api/app-users/v1/teams ✅ Teams list.
|
|
195
|
+
GET /api/app-users/v1/permission-sets ✅ List all permission sets.
|
|
196
|
+
GET /api/app-users/v1/permission-sets/{id} ✅ Single permission set + capability flags.
|
|
197
|
+
PATCH/PUT /api/app-users/v1/permission-sets/{id} ✅ Edit permission set (used for migrating capabilities).
|
|
198
|
+
POST /api/chirp-frontend-app/v1/gateway/com.hubspot.appusers.rpc.PermissionSetAssignmentsRpc/assignUserToPermissionSets ✅ Assign one or more permission sets to users. Body: `{ "assignments": [{ "userId": "...", "permissionSetIds": ["..."] }] }`.
|
|
199
|
+
GET /api/integrators/v1/{portal}/info/users ✅ Full user list with userId, email, name, deactivated flag — source for ID→name mapping.
|
|
200
|
+
GET /api/users-and-teams/v1/current-user ✅ Current session user.
|
|
201
|
+
GET /api/login-verify/user-info ✅ Login state.
|
|
202
|
+
Field-level + report permissions
|
|
203
|
+
Method Path Status Notes
|
|
204
|
+
GET /api/crm-permissions/v1/field-level-permissions/allowlistings ✅ Global allowlist.
|
|
205
|
+
GET /api/crm-permissions/v1/field-level-permissions/allowlistings/{typeId} ✅ Per-object allowlist.
|
|
206
|
+
GET /api/crm-permissions/v1/field-level-permissions/allowlistings/{typeId}/{property} ✅ Per-property allowlist — who can see/edit a custom field.
|
|
207
|
+
POST /api/crm-permissions/v1/field-level-permissions/allowlistings/access-state/multi-get ✅ Bulk access-state check.
|
|
208
|
+
POST /api/crm-permissions/v1/field-level-permissions/allowlistings/object ✅ Object-scoped multi-get.
|
|
209
|
+
GET /api/crm-permissions/v1/field-level-permissions/blocklist/including-global ✅ Blocklist (with globals).
|
|
210
|
+
GET /api/permissions-skynet/v1/scopes/app/field-level-permissions-bypass/user-ids ✅ Users who bypass FLP.
|
|
211
|
+
GET /api/reports-permissions/v1/permissions/report/{reportId} ✅ Per-report permissions.
|
|
212
|
+
Chirp gateway (RPC calls)
|
|
213
|
+
POST /api/chirp-frontend-app/v1/gateway/{ServiceName}/{Method} — body is the RPC payload. Services observed across sessions:
|
|
214
|
+
|
|
215
|
+
com.hubspot.ai.access.controls.rpc.AiAccessControlsChirpService/getAccessControls
|
|
216
|
+
com.hubspot.app.user.audits.service.rpc.* — user audit RPCs (permission-set assignment history)
|
|
217
|
+
com.hubspot.blueprint.customer.object.type.rpc.* — custom object schema RPCs
|
|
218
|
+
com.hubspot.crm.index.views.api.rpc.* — CRM index / sales views
|
|
219
|
+
com.hubspot.custom.enrichment.rpc.client.* — custom enrichment
|
|
220
|
+
com.hubspot.customassistants.rpc.CustomAssistantsService/listCustomAssistants
|
|
221
|
+
com.hubspot.dashboard.rpc.v1.* — dashboard RPCs
|
|
222
|
+
com.hubspot.nav.config.rpc.PersonalisedNavService/getPersonalisedNav
|
|
223
|
+
com.hubspot.nudge.manager.rpc.NudgeManagerRpc/getNudges
|
|
224
|
+
com.hubspot.onboarding.tours.rpc.ToursRpc/getTour
|
|
225
|
+
com.hubspot.presence.rpc.PresenceRpcService/updatePresence
|
|
226
|
+
com.hubspot.product.updates.feedback.rpc.nudge.allowlist.* — nudge allowlists
|
|
227
|
+
Slow variant: POST /api/chirp-frontend-app-slow/v1/gateway/{ServiceName}/{Method} — used for heavy RPCs like com.hubspot.reporting.api.metadata.rpc.ReportingApiMetadataRpc/getPropertyMetadata.
|
|
228
|
+
|
|
229
|
+
Schemas / object types
|
|
230
|
+
Method Path Status Notes
|
|
231
|
+
GET /crm/v3/schemas ✅ All object schemas (standard + custom).
|
|
232
|
+
GET /api/crm-object-schemas/v3/schemas ✅ Internal alias of above.
|
|
233
|
+
GET /api/object-types/v1/portal/{portal} ✅ Portal object types.
|
|
234
|
+
GET /api/data-model/v3/object-types ✅ Data-model object types.
|
|
235
|
+
GET /api/schemas-metadata/v1/portal-metadata ✅ Portal-wide schema metadata.
|
|
236
|
+
GET /api/schemas-metadata/v1/portal-metadata/type/{type} ✅ Per-type metadata.
|
|
237
|
+
GET /api/schemas-metadata/v1/portal-metadata/resource/{resource} ✅ Per-resource metadata.
|
|
238
|
+
GET /api/schemas-metadata/v1/portal-metadata/resources ✅ All resources.
|
|
239
|
+
GET /api/framework-builder/v1/read/metadata/property/{typeId}/{aspect} ✅ Framework-builder metadata (e.g. crm, gibberishdetectionmetadata, property).
|
|
240
|
+
GET /api/framework-builder/v1/read/metadata/types/crm ✅ All CRM types.
|
|
241
|
+
CRM (objects, pipelines, properties, associations)
|
|
242
|
+
Method Path Status Notes
|
|
243
|
+
GET/POST /crm/v3/objects/{type} ✅ List/create — types: contacts, companies, deals, tickets, leads, tasks, calls, emails, meetings, notes.
|
|
244
|
+
GET /crm/v3/properties/{type} ✅ Standard property list.
|
|
245
|
+
GET /crm/v3/properties/{type}/groups ✅ Property groups.
|
|
246
|
+
GET /crm/v3/pipelines/{type} ✅ Pipelines (deals, tickets, leads).
|
|
247
|
+
GET /crm/v4/associations/{from}/{to}/labels ✅ Association labels — used to copy custom assoc labels across portals.
|
|
248
|
+
GET /crm/v3/lists/{id} ✅ Single list (see also Lists section).
|
|
249
|
+
Sales views (CRM index)
|
|
250
|
+
Method Path Status Notes
|
|
251
|
+
GET /api/sales/v4/views/{typeId} ✅ Current sales views API.
|
|
252
|
+
GET /api/sales/v4/views/{typeId}/all ✅ All views.
|
|
253
|
+
GET /api/sales/v4/views/{typeId}/all/with-visualization-settings ✅ Includes column/sort config.
|
|
254
|
+
GET /api/sales/v4/views/{typeId}/list ✅ Saved list views.
|
|
255
|
+
GET /api/sales/v4/views/{typeId}/pinned/view ✅ Pinned views.
|
|
256
|
+
GET /api/sales/v4/views/{typeId}/search ✅ Search views.
|
|
257
|
+
GET /api/sales/v4/views/default-view/{typeId}/with-visualization-settings ✅ Default view with viz.
|
|
258
|
+
GET /api/sales-views/v3/sales-views/{typeId} ✅ v3 legacy.
|
|
259
|
+
GET /api/sales-views/v2/sales-views/{typeId} ✅ v2 legacy.
|
|
260
|
+
GET /api/sales-views/v2/sales-views/{typeId}/list ✅
|
|
261
|
+
GET /api/sales-views/v2/sales-views/list/{typeId}/default ✅ Default v2.
|
|
262
|
+
GET /api/sales-views/v2/crm-search/empty-state-redirect/{typeId} ✅ UI redirect helper.
|
|
263
|
+
GET /api/sales-views/v2/crm-search/limit-check/{typeId} ✅ Limit check.
|
|
264
|
+
GET /api/sales-views-api/v1/sales-views/{typeId} ✅ Even older v1.
|
|
265
|
+
GET /api/views-meta/v1/views/{typeId} ✅ Views metadata.
|
|
266
|
+
GET /api/views-metadata/v1/{typeId} ✅ Alt form.
|
|
267
|
+
GET /api/views-store/v1/views ✅ Views store.
|
|
268
|
+
Owners
|
|
269
|
+
Method Path Status Notes
|
|
270
|
+
GET /api/owners/v2/owners ✅ Owner list.
|
|
271
|
+
GET /api/owners-aether-search/v1/owners-search ✅ Owner search (typeahead UI).
|
|
272
|
+
GET /crm/v3/owners ✅ Public surface (same data).
|
|
273
|
+
Branding / business units / multi-brand
|
|
274
|
+
Method Path Status Notes
|
|
275
|
+
GET /api/business-units/v1/business-units ✅ List BUs.
|
|
276
|
+
GET /business-units/v1/business-units ✅ Same without /api.
|
|
277
|
+
GET /api/multi-brand/v1/brands ✅ Multi-brand list.
|
|
278
|
+
GET /api/branding/v1/brand-kit/business-unit/{buId} ✅ Brand kit per BU.
|
|
279
|
+
GET /api/branding/v1/brand-voice/by-bu-id/{buId} ✅ Brand voice.
|
|
280
|
+
GET /api/branding/v1/colors/brand-kit ✅ Brand colors.
|
|
281
|
+
GET /api/branding/v1/favicons/brand-kit ✅ Favicons.
|
|
282
|
+
GET /api/branding/v1/font-meta ✅ Font metadata.
|
|
283
|
+
GET /api/branding/v1/fonts-with-variants ✅ Fonts + variants.
|
|
284
|
+
GET /api/branding/v1/logos/brand-kit ✅ Logos.
|
|
285
|
+
Reporting discovery / templates
|
|
286
|
+
Method Path Status Notes
|
|
287
|
+
GET /api/reporting-discovery/v1/report-template ✅ List report templates.
|
|
288
|
+
GET /api/reporting-discovery/v1/report-template/paged ✅ Paged.
|
|
289
|
+
GET /api/reporting-discovery/v1/report-template/template-key/{slug} ✅ Templates like sales-analytics.team-activity-timeline, sales-manager-dashboard.activity, sales.team, team-activity.
|
|
290
|
+
GET /api/reporting-frontend/v1/reports/get-portal-reports ✅ All portal reports list.
|
|
291
|
+
GET /api/reporting-frontend/v1/reports/... ✅ Frontend metadata.
|
|
292
|
+
Account / private apps
|
|
293
|
+
Method Path Status Notes
|
|
294
|
+
GET /account-info/v3/details ✅ Portal details (tier, name, etc.).
|
|
295
|
+
GET /account-info/v3/activity/{portal} ✅ Activity summary.
|
|
296
|
+
GET /account-info/v3/private-apps ✅ Private apps + their scopes.
|
|
297
|
+
GET /api/audit-log/v3/audit ✅ v3 audit log.
|
|
298
|
+
GET /api/audit-logs/v3/logs ✅ v3 logs alias.
|
|
299
|
+
GET /audit-log/v3/audit ✅ Without /api prefix.
|
|
300
|
+
GET /api/security-audit-logs/v1/audit-logs ✅ Security audit.
|
|
301
|
+
GET /api/security-center/v1/account-events ✅ Account events feed.
|
|
302
|
+
GET /api/security-monitoring/v2/security-monitoring/account/{portal} ✅ Security monitoring.
|
|
303
|
+
GET /api/crm-usages/v2/usages/ ✅ CRM usage telemetry.
|
|
304
|
+
Forms / marketing
|
|
305
|
+
Method Path Status Notes
|
|
306
|
+
GET /forms/v2/forms ✅ Legacy forms.
|
|
307
|
+
GET /marketing/v3/forms ✅ Current forms API.
|
|
308
|
+
GET /marketing/v3/emails ⚠️ Marketing email list (limited from in-tab).
|
|
309
|
+
GET /conversations/v3/snippets ✅ Snippets via conversations.
|
|
310
|
+
Misc (UI metadata / feature flags / telemetry)
|
|
311
|
+
Path Use
|
|
312
|
+
/api/cartographer/v1/rhumb Page-load tracking.
|
|
313
|
+
/api/cartographer/v1/performance RUM.
|
|
314
|
+
/api/firealarm/v4/alarm/{feature}/{portal} UI feature flags. Observed: TemplatesUI, segments-ui, settings-ui-audits, settings-ui-users.
|
|
315
|
+
/api/growth-modals/v1/banner/all All growth banners.
|
|
316
|
+
/api/growth-modals/v1/modals/has-modals Modal presence check.
|
|
317
|
+
/api/navconfig/v2/alerts Nav alert badges.
|
|
318
|
+
/api/navconfig/v5/navconfig Nav config.
|
|
319
|
+
/api/notification/preferences/v1/generic-user-settings User notif prefs.
|
|
320
|
+
/api/nudge/tracking/v1/nudge-event Tracking.
|
|
321
|
+
/api/persistent-notifications/v1/notifications Banner notifs.
|
|
322
|
+
/api/trials/v1/hub-trials/app/active Hub trial state.
|
|
323
|
+
/api/commenting/v3/comments UI commenting.
|
|
324
|
+
/api/usage-logging/v1/log/hublytics-multi/no-auth Telemetry.
|
|
325
|
+
/api/usage-logging/v1/log/session-replay Telemetry.
|
|
326
|
+
/api/calling-orchestration/v1/settings/user Calling UI.
|
|
327
|
+
/api/js/store/... Static JS bundles.
|
|
328
|
+
/calling-cross-tab-embed/shared-worker.js Calling shared worker.
|
|
329
|
+
UI navigation URLs (deep links — useful for scraping)
|
|
330
|
+
URL pattern Page
|
|
331
|
+
/reports-dashboard/{portal}/view/{dashId} Dashboard view.
|
|
332
|
+
/reports-list/{portal}/{reportId} Single report.
|
|
333
|
+
/reports-list/{portal}/views/all All reports/dashboards landing.
|
|
334
|
+
/reports-list/{portal}/views/all/list/reports?search={q} Reports search view.
|
|
335
|
+
/reports-list/{portal}/views/all/list/dashboards?search={q} Dashboards search (falls back to All Reports unless drilled in via sidebar).
|
|
336
|
+
/reports-list/{portal}/dashboards/views/-4 Dashboards-only landing.
|
|
337
|
+
/workflows/{portal}/view/default Workflows list.
|
|
338
|
+
/workflows/{portal}/platform/flow/{id}/edit Workflow editor.
|
|
339
|
+
`/contacts/{portal}/objectLists/views/all?objectTypeId={0-1 0-2
|
|
340
|
+
/contacts/{portal}/objectLists/{id}/filters List filters.
|
|
341
|
+
/contacts/{portal}/objectLists/{id}/activity/audit Per-list audit log.
|
|
342
|
+
/templates/{portal}/?folder={folderId} Templates in a folder.
|
|
343
|
+
/templates/{portal}/edit/{templateId} Template editor.
|
|
344
|
+
/email/{portal}/manage/state/all?businessUnitId={buId} Marketing email manager.
|
|
345
|
+
/email/{portal}/details/{emailId} Email detail.
|
|
346
|
+
/sequences/{portal}/?q={query} Sequences search.
|
|
347
|
+
/settings/{portal}/audits Audit log UI.
|
|
348
|
+
/settings/{portal}/security-and-privacy/login-history Login history.
|
|
349
|
+
/settings/{portal}/security/login-settings Login security.
|
|
350
|
+
/account-and-billing/{portal}/account-defaults/audit-logs Account-wide audit logs.
|
|
351
|
+
/notifications/{portal}/banners Banner notifications.
|
|
352
|
+
/property-settings/{portal}/properties Property settings UI.
|
|
353
|
+
Gotchas (recap)
|
|
354
|
+
Same-origin only — these endpoints reject calls from the embedded sandbox. Run via mcp__Claude_in_Chrome__javascript_tool inside the HubSpot tab.
|
|
355
|
+
DELETE /api/dashboard/v2/dashboard/{id} cascades to widget reports. See feedback_hubspot_dashboard_delete_cascade.
|
|
356
|
+
POST widget/from-reports no-ops on empty dashboards — clone a populated dashboard first.
|
|
357
|
+
PUT /api/dashboard/v2/dashboard/{id} ignores widgets — use widget endpoints.
|
|
358
|
+
/api/automation/v4/flows caps limit=100 — paginate via after.
|
|
359
|
+
List/segment API surface is fragmented — many overlapping paths, inconsistent behavior. Prefer UI scrape.
|
|
360
|
+
Marketing email + sequences APIs frequently 404 from in-tab — use UI scrape.
|
|
361
|
+
/api/properties/v2/{obj}/properties is more reliable than v3 for createdUserId on old properties.
|
|
362
|
+
Read-only rule on source <sourcePortalId> was lifted (memory: <source-readonly-policy>) — but ALWAYS confirm scope before bulk writes on live <portalId>.
|
|
363
|
+
Session sources
|
|
364
|
+
Session Date Topic New endpoints contributed
|
|
365
|
+
<session-id> Jun 18-19 <source portal>→<client> reports/dashboards/workflows migration dashboard v2, reports v2, workflows v4, ils-segments, audit-log v1
|
|
366
|
+
<session-id> Jun 18 Permission sets + property migration (biggest) app-users/v1/permission-sets, crm-permissions/v1/field-level-permissions, properties/v4, sales/v4/views, schemas-metadata, branding, framework-builder
|
|
367
|
+
<session-id> Jun 2 Permission-set work continuation audit-log v3, security-monitoring, settings-ui-users
|
|
368
|
+
<session-id> May 27 Permission-set discovery object-types/v1, crm-object-schemas/v3
|
|
369
|
+
<session-id>, <session-id> Jun 18 Dashboard <asset prefix> bulk operations dashboard/v2/dashboard/{id}/widget/from-reports
|
|
370
|
+
<session-id> Jun 17 Short session (minor)
|
|
371
|
+
Companion to ENDPOINTS.md which covers the public Private-App API surface.
|
|
@@ -0,0 +1,243 @@
|
|
|
1
|
+
# HubSpot Internal Endpoint Catalogue
|
|
2
|
+
|
|
3
|
+
This is the operator-facing map for allowlisted internal adapters. The full
|
|
4
|
+
captured catalogue is [`INTERNAL-ENDPOINTS.md`](./INTERNAL-ENDPOINTS.md), and
|
|
5
|
+
the live discovery log is
|
|
6
|
+
[`INTERNAL-ENDPOINTS-DISCOVERY.md`](./INTERNAL-ENDPOINTS-DISCOVERY.md).
|
|
7
|
+
|
|
8
|
+
This catalogue tracks browser-session endpoints that hscli can use only through
|
|
9
|
+
allowlisted migration/setup adapters. It is not a generic internal API
|
|
10
|
+
passthrough. Prefer public HubSpot APIs first; use these surfaces only when
|
|
11
|
+
HubSpot has no public equivalent and the operator has an authenticated HubSpot
|
|
12
|
+
browser session.
|
|
13
|
+
|
|
14
|
+
Use `hscli internal surfaces` to list the implemented capture surfaces, and
|
|
15
|
+
`hscli internal capture --surface <id>` or `hscli internal capture --all` to
|
|
16
|
+
write read-only JSON captures plus a `capture-manifest.json`.
|
|
17
|
+
Use `hscli internal coverage` when you need a JSON control sheet that ties the
|
|
18
|
+
full Markdown catalogue, discovery log, allowlisted code module, endpoint
|
|
19
|
+
counts, parameterized endpoints, and write-adapter promotion policy together
|
|
20
|
+
without calling HubSpot.
|
|
21
|
+
|
|
22
|
+
Use `hscli backup plan --include-internal` as the orchestrator for real backup
|
|
23
|
+
work. The plan output includes:
|
|
24
|
+
|
|
25
|
+
- `internalCapturePlan.oneShotCommand` for a broad allowlisted capture.
|
|
26
|
+
- `internalCapturePlan.surfaceCommands` for safer surface-by-surface capture.
|
|
27
|
+
- `internalCapturePlan.parameterizedExamples` for endpoints that require IDs or
|
|
28
|
+
explicit read bodies, such as `flowId`, `datasetId`, `reportId`,
|
|
29
|
+
`permissionSetId`, or `app-users-batch=<json-body-file>`.
|
|
30
|
+
- `commands.internalApi`, which turns the same allowlist into a concrete runbook
|
|
31
|
+
with stdout redirected into the backup archive.
|
|
32
|
+
|
|
33
|
+
The preferred operator flow is therefore:
|
|
34
|
+
|
|
35
|
+
```bash
|
|
36
|
+
hscli --profile source-readonly --json backup plan \
|
|
37
|
+
--portal-id "$PORTAL_ID" \
|
|
38
|
+
--include-internal \
|
|
39
|
+
--out-dir "$OUT_DIR" > "$OUT_DIR/backup-plan.json"
|
|
40
|
+
|
|
41
|
+
hscli --profile source-readonly --json internal coverage \
|
|
42
|
+
> "$OUT_DIR/internal-api/internal-coverage.json"
|
|
43
|
+
|
|
44
|
+
# Review backup-plan.json, then run either the one-shot command or the
|
|
45
|
+
# individual surface commands it contains.
|
|
46
|
+
```
|
|
47
|
+
|
|
48
|
+
## Implemented Capture Surface Map
|
|
49
|
+
|
|
50
|
+
The full discovery files are intentionally broader than the executable
|
|
51
|
+
allowlist. The current `hscli internal capture` module turns these read-only or
|
|
52
|
+
read-like surfaces into JSON backup assets:
|
|
53
|
+
|
|
54
|
+
| Surface id | Captures |
|
|
55
|
+
| --- | --- |
|
|
56
|
+
| `business-units` | Business unit inventory and default BU context |
|
|
57
|
+
| `branding` | Brand kits, multi-brand settings, colors, logos, favicons, fonts, and BU brand voice placeholders |
|
|
58
|
+
| `permission-access` | App users, teams, permission sets, assignment maps, roles, seats, templates, FLP, and access-audit RPCs |
|
|
59
|
+
| `datasets-reporting` | Data Studio datasets, reportable sources, joins, formulas, previews, async resolve calls, and async result polling |
|
|
60
|
+
| `reports-dashboards` | Report definitions, favorites, report audit/history, record-view metadata, report permissions, report template discovery, dashboard layouts, widgets, dashboard grants, and report-list views |
|
|
61
|
+
| `workflows-hybrid` | Workflow inventories, hybrid action graphs, validation, output fields, action catalog, CRM object context, canvas errors, access checks, filter-description previews, and card-position RPCs |
|
|
62
|
+
| `properties-metadata` | Internal property metadata, legacy v1/v2 fallbacks, property groups, grouped-property listings, named property reads, recycled properties, quotas, fill rates, validation, dynamic options, and conditional options |
|
|
63
|
+
| `crm-search` | Read-only CRM search, CRM GraphQL, object preview, and single-object UI payload helpers used by report builders, help desk, quotes, and object indexes |
|
|
64
|
+
| `object-metadata` | Schema metadata, framework-builder metadata, portal-scoped object types, event object types, and object-type batch reads |
|
|
65
|
+
| `conditional-properties` | Conditional property options and read-only rule RPCs |
|
|
66
|
+
| `lists-segments` | List v3, portal-scoped list paths, legacy contacts/list v2 fallbacks, contact-list-management definitions, ILS segment stores, segments UI definitions, and legacy segment-search definitions |
|
|
67
|
+
| `sales-content` | Sales content search, template/sequence fallbacks, sequence bodies/usage/health, sales template bodies/search/usage, libraries, snippets, playbook counts, playbook versions, and playbook question RPC reads |
|
|
68
|
+
| `crm-views-record-layout` | Legacy/v2/v3/v4 CRM views, pinned/list/search views, visualization settings, view metadata, view limit checks, and record-card containers |
|
|
69
|
+
| `marketing-internal` | Subscription channels, subscription visibility rules, privacy/GDPR settings, business-unit display maps, CAN-SPAM settings, cosemail email bodies/settings, CTA placements, and legacy forms batch |
|
|
70
|
+
| `cms-design-manager` | Design Manager templates, content v2 templates, themes, modules, layouts, global groups, built-in module mapping, content pages, site settings, content-copy status, and membership access groups |
|
|
71
|
+
| `social-ads` | Social broadcasts, connected social channels, social trusted-state checks, and read-only ads account/UI metadata RPCs |
|
|
72
|
+
| `governance-audit` | Audit logs, security logs, installed apps, and sync bridge metadata |
|
|
73
|
+
| `commerce-forecast-quotes` | Payment readiness, connected payment account, quote/commerce CRM search, forecast categories, and quote e-signature settings |
|
|
74
|
+
| `conversations-chatflows` | Conversation custom views, workspace/view settings, inbox email/channel accounts, chatflow RPC reads, help desk tickets/preferences, and help desk migration state |
|
|
75
|
+
| `account-security` | Account detail/activity, private apps, security center/monitoring/settings, CRM usage, installed apps, and sync bridge metadata |
|
|
76
|
+
|
|
77
|
+
Use `--endpoint <id>` when an operator needs to capture one concrete endpoint
|
|
78
|
+
from a surface without touching the rest of the surface. Use
|
|
79
|
+
`--body-file <endpoint=path>` for allowlisted read-only POST endpoints such as
|
|
80
|
+
batch hydration, preview, resolve, search, or Chirp RPC reads:
|
|
81
|
+
|
|
82
|
+
```bash
|
|
83
|
+
hscli --profile source-readonly --json internal capture \
|
|
84
|
+
--surface permission-access \
|
|
85
|
+
--endpoint app-users-batch \
|
|
86
|
+
--portal-id "$PORTAL_ID" \
|
|
87
|
+
--cookie-file "$HUBSPOT_COOKIE_FILE" \
|
|
88
|
+
--body-file app-users-batch=./bodies/app-users-batch.json \
|
|
89
|
+
--out-dir "$OUT_DIR/internal-api/permission-access"
|
|
90
|
+
```
|
|
91
|
+
|
|
92
|
+
The capture writes both the response JSON and a redacted
|
|
93
|
+
`<endpoint>.request.json` proof file. The manifest records the request-body
|
|
94
|
+
SHA-256 so the no-write log can be audited without storing browser secrets.
|
|
95
|
+
|
|
96
|
+
The implemented capture catalogue is backed by
|
|
97
|
+
`src/commands/internal/catalog.ts`. That module is deliberately allowlist-only:
|
|
98
|
+
there is no command for arbitrary internal URLs. Internal POST calls are accepted
|
|
99
|
+
only when HubSpot uses POST for a read-like operation such as search, preview,
|
|
100
|
+
batch hydration, async resolve, or Chirp RPC reads; each one is tagged in code
|
|
101
|
+
with its read-only purpose.
|
|
102
|
+
|
|
103
|
+
Some endpoints in the full catalogue are known write or migration endpoints
|
|
104
|
+
because they matter for future replay adapters. Those endpoints are documented
|
|
105
|
+
for research and migration design, but they are not included in
|
|
106
|
+
`hscli internal capture` unless they are read-only/read-like. Write adapters must
|
|
107
|
+
be implemented as explicit product commands with policy checks, dry-run,
|
|
108
|
+
`--force`, and audit trails.
|
|
109
|
+
|
|
110
|
+
## Browser Session Auth Pattern
|
|
111
|
+
|
|
112
|
+
Most internal endpoints require the HubSpot browser cookies plus the modern
|
|
113
|
+
HubSpot API CSRF header:
|
|
114
|
+
|
|
115
|
+
```js
|
|
116
|
+
const csrf = document.cookie
|
|
117
|
+
.split("; ")
|
|
118
|
+
.find((cookie) => cookie.startsWith("hubspotapi-csrf="))
|
|
119
|
+
?.split("=")[1];
|
|
120
|
+
|
|
121
|
+
fetch(url, {
|
|
122
|
+
credentials: "include",
|
|
123
|
+
headers: { "X-HubSpot-CSRF-hubspotapi": csrf },
|
|
124
|
+
});
|
|
125
|
+
```
|
|
126
|
+
|
|
127
|
+
In hscli this is exposed through `--cookie`, `--cookie-file`, and `--csrf`.
|
|
128
|
+
Cookie files are filtered to allowlisted HubSpot app hosts before any request.
|
|
129
|
+
|
|
130
|
+
## Admin, Access, And Permission Sets
|
|
131
|
+
|
|
132
|
+
These endpoints are the supported permission migration/setup surface. They are
|
|
133
|
+
allowlisted because HubSpot does not expose permission sets, role catalogs, seat
|
|
134
|
+
assignments, or field-level permission state through the public bearer-token
|
|
135
|
+
APIs. Role catalog size is portal-dependent; one Enterprise portal exposed 1,124
|
|
136
|
+
atomic roles through this surface.
|
|
137
|
+
|
|
138
|
+
| Surface | Endpoint | hscli status |
|
|
139
|
+
| --- | --- | --- |
|
|
140
|
+
| Permission sets list | `GET /api/app-users/v1/permission-sets?portalId={portalId}` | `settings permission-sets list`; definitions include `roleNames[]` inline |
|
|
141
|
+
| Permission set get | `GET /api/app-users/v1/permission-sets/{id}?portalId={portalId}` | `settings permission-sets get`; label, `roleNames[]`, and capability flags |
|
|
142
|
+
| Permission set create | `POST /api/app-users/v1/permission-sets?portalId={portalId}` | `settings permission-sets create` |
|
|
143
|
+
| Permission set patch | `PATCH /api/app-users/v1/permission-sets/{id}?portalId={portalId}` | `settings permission-sets update --method PATCH`; rename or role delta |
|
|
144
|
+
| Permission set replace | `PUT /api/app-users/v1/permission-sets/{id}?portalId={portalId}` | `settings permission-sets update --method PUT`; full overwrite |
|
|
145
|
+
| Permission set delete | `DELETE /api/app-users/v1/permission-sets/{id}?portalId={portalId}` | `settings permission-sets delete`; HubSpot rejects assigned sets |
|
|
146
|
+
| Permission set clone | `POST /api/app-users/v1/permission-sets/{id}/clone?portalId={portalId}` | `settings permission-sets clone` |
|
|
147
|
+
| Atomic role catalog | `GET /api/app-users/v1/roles?portalId={portalId}` | `settings permission-sets roles list`; portal role inventory |
|
|
148
|
+
| Single role | `GET /api/app-users/v1/roles/{roleName}?portalId={portalId}` | `settings permission-sets roles get`; description and dependencies |
|
|
149
|
+
| Role categories | `GET /api/app-users/v1/role-categories?portalId={portalId}` | `settings permission-sets role-categories`; UI grouping |
|
|
150
|
+
| Role scopes | `GET /api/app-users/v1/scopes?portalId={portalId}` | `settings permission-sets scopes`; owned/team/all/unassigned buckets |
|
|
151
|
+
| App users list | `GET /api/app-users/v1/users?portalId={portalId}&limit=200&offset={offset}` | `settings permission-sets users list`; paginated user access payloads |
|
|
152
|
+
| App user get | `GET /api/app-users/v1/users/{userId}?portalId={portalId}` | `settings permission-sets users get`; `permissionSetId`, `permissionSetIds`, derived/direct `roleNames[]` |
|
|
153
|
+
| App users batch read | `POST /api/app-users/v1/users/partial/batch?portalId={portalId}` | `settings permission-sets users batch-read` |
|
|
154
|
+
| Permission-set assignment map | `GET /api/app-users/v1/permission-sets/permission-set-user-assignments?portalId={portalId}` | `settings permission-sets assignments list`; portal-wide user-to-permission-set map for access migration and downgrade proof |
|
|
155
|
+
| Permission set assignment | `POST /api/chirp-frontend-app/v1/gateway/com.hubspot.appusers.rpc.PermissionSetAssignmentsRpc/assignUserToPermissionSets?portalId={portalId}` | `settings permission-sets users assign` for one user, or `settings permission-sets users assign-batch --data '{"assignments":[...]}'` for the native RPC payload; body `{ assignments: [{ userId, permissionSetIds }] }` |
|
|
156
|
+
| Seat assignments | `GET /api/app-users/v1/seat-assignments?portalId={portalId}` | `settings permission-sets seat-assignments list` |
|
|
157
|
+
| Seat assignment update | `PATCH /api/app-users/v1/seat-assignments/{userId}?portalId={portalId}` | `settings permission-sets seat-assignments update` |
|
|
158
|
+
| Seat catalog | `GET /api/app-users/v1/seats?portalId={portalId}` | `settings permission-sets seats` |
|
|
159
|
+
| Permission templates | `GET /api/permission-templates/v1/templates?portalId={portalId}` | `settings permission-sets templates list`; HubSpot and custom templates |
|
|
160
|
+
| Permission template get | `GET /api/permission-templates/v1/templates/{id}?portalId={portalId}` | `settings permission-sets templates get` |
|
|
161
|
+
| Permission template create | `POST /api/permission-templates/v1/templates?portalId={portalId}` | `settings permission-sets templates create` |
|
|
162
|
+
|
|
163
|
+
Complementary Chirp RPCs are capture/audit adapters first. They are useful for
|
|
164
|
+
forensics and approval trails, but they should not become generic passthrough
|
|
165
|
+
commands. hscli exposes only the allowlisted reads below through
|
|
166
|
+
`settings permission-sets audit ... --data <json>`:
|
|
167
|
+
|
|
168
|
+
- `com.hubspot.app.user.audits.service.rpc.AppUserAuditsRpc/getPermissionSetAssignmentHistory`
|
|
169
|
+
- `com.hubspot.app.user.audits.service.rpc.AppUserAuditsRpc/getRoleChangeHistory`
|
|
170
|
+
- `com.hubspot.app.user.audits.service.rpc.AppUserAuditsRpc/getUserAccessAudit`
|
|
171
|
+
|
|
172
|
+
## Field-Level Permissions
|
|
173
|
+
|
|
174
|
+
| Surface | Endpoint |
|
|
175
|
+
| --- | --- |
|
|
176
|
+
| Full allowlist inventory | `GET /api/crm-permissions/v1/field-level-permissions/allowlistings` | `settings flp list` |
|
|
177
|
+
| Object allowlist inventory | `GET /api/crm-permissions/v1/field-level-permissions/allowlistings/{typeId}` | `settings flp object <typeId>` |
|
|
178
|
+
| Single property allowlist | `GET /api/crm-permissions/v1/field-level-permissions/allowlistings/{typeId}/{property}` | `settings flp property <typeId> <propertyName>` |
|
|
179
|
+
| Bulk access state | `POST /api/crm-permissions/v1/field-level-permissions/allowlistings/access-state/multi-get` | `settings flp access-state --data <json>`; read-mode POST |
|
|
180
|
+
| Blocklist including global | `GET /api/crm-permissions/v1/field-level-permissions/blocklist/including-global` | `settings flp blocklist` |
|
|
181
|
+
| FLP bypass users | `GET /api/permissions-skynet/v1/scopes/app/field-level-permissions-bypass/user-ids` | `settings flp bypass-users` |
|
|
182
|
+
|
|
183
|
+
## Other Confirmed Internal Surfaces
|
|
184
|
+
|
|
185
|
+
| Domain | Primary surfaces |
|
|
186
|
+
| --- | --- |
|
|
187
|
+
| Account / security | `/account-info/v3/*`, `/api/security-health/*`, `/api/security-settings/*`, installed-app and sync-bridge metadata |
|
|
188
|
+
| Dashboards | `/api/dashboard/v2/dashboard/*`, `/dashboard/v2/dashboards/{dashboardId}` |
|
|
189
|
+
| Reports | `/api/dashboard/v2/reports/*`, `/reporting-migration/v2/reports/migrate` |
|
|
190
|
+
| Reporting data | `/api/reporting/v3/dataset/resolve/async` |
|
|
191
|
+
| Datasets | `/sql-reporting/v1/datasets/*`, `/sql-reporting/v1/extended-reportable-options/*` |
|
|
192
|
+
| Workflows | `/api/automationplatform/v1/hybrid/{flowId}`, validation, output fields, action catalog |
|
|
193
|
+
| Properties | `/api/properties/v4/{typeId}`, `/api/properties/v4/groups/{typeId}`, v2 fallbacks |
|
|
194
|
+
| Lists / segments | Legacy contacts lists, ILS segments, list search, and UI list views |
|
|
195
|
+
| Sales content | `/api/templates/v1`, `/api/sales-content/v1`, `/api/sales-content-libraries/v2` |
|
|
196
|
+
| Sequences | `/api/salescontentsearch/v2/search`, `/api/sequences/v3/sequences/{id}` |
|
|
197
|
+
| Playbooks | Chirp RPC `com.hubspot.playbooks.rpc.PlaybooksRpc` |
|
|
198
|
+
| Audit logs | `/api/audit-log/v1`, `/api/audit-log/v3`, `/api/security-audit-logs/v1` |
|
|
199
|
+
| Object metadata | `/api/data-model/v3`, `/api/framework-builder/v1`, `/api/schemas-metadata/v1` |
|
|
200
|
+
| CRM views | `/api/sales/v4/views/{typeId}`, legacy v2/v3 views, visualization settings |
|
|
201
|
+
| Owners | `/api/owners/v2/owners`, `/owners-aether-search/v1/owners-search` |
|
|
202
|
+
| Branding | `/api/branding/v1/*`, `/api/business-units/v1/*`, `/api/multi-brand/v1/*` |
|
|
203
|
+
| Forms and marketing | `/forms/v2/forms`, `/marketing/v3/forms`, `/api/cosemail/v1/*` |
|
|
204
|
+
| CTAs | Legacy and new CTA builder placement endpoints |
|
|
205
|
+
| CMS | Design manager, content v2 pages/templates, site settings, content-copy status, membership, themes, modules, layouts |
|
|
206
|
+
| Social and ads | `/api/broadcast/v2/*` plus read-only `com.hubspot.ads.rpc.*` Chirp RPCs |
|
|
207
|
+
| CRM search and previews | `/api/crm-search/*`, `/api/graphql/crm`, and `/inbounddb-objects/v1/*` |
|
|
208
|
+
| Conditional properties | `/api/conditional-properties/v2/rules/*` plus unified RPC reads |
|
|
209
|
+
| Record cards | `/api/crm-record-cards/v4/container-views/*` |
|
|
210
|
+
| Conversations / help desk | Custom views and Chirp RPC help desk services |
|
|
211
|
+
| Chatflows | Chirp RPC `com.hubspot.chatflows.rpc.*` |
|
|
212
|
+
| Payments / quotes / forecast | Feature-gated internal setup and eligibility endpoints |
|
|
213
|
+
|
|
214
|
+
## Chirp Gateway
|
|
215
|
+
|
|
216
|
+
Chirp RPCs use this shape:
|
|
217
|
+
|
|
218
|
+
```text
|
|
219
|
+
POST /api/chirp-frontend-app/v1/gateway/{ServiceName}/{Method}
|
|
220
|
+
POST /api/chirp-frontend-app-slow/v1/gateway/{ServiceName}/{Method}
|
|
221
|
+
```
|
|
222
|
+
|
|
223
|
+
Known useful services include:
|
|
224
|
+
|
|
225
|
+
- `com.hubspot.playbooks.rpc.PlaybooksRpc.*`
|
|
226
|
+
- `com.hubspot.chatflows.rpc.*`
|
|
227
|
+
- `com.hubspot.helpdesk.migration.rpc.HelpdeskMigrationRpc`
|
|
228
|
+
- `com.hubspot.cv.custom.views.member.rpc.*`
|
|
229
|
+
- `com.hubspot.automation.actions.rpc.RenderableActionDefinitionService`
|
|
230
|
+
|
|
231
|
+
## Known Gaps And Non-Endpoints
|
|
232
|
+
|
|
233
|
+
- Marketing email REST candidates such as `/api/marketing-emails/v1`,
|
|
234
|
+
`/api/email-publisher/v1`, `/api/cosemail/v1` public-style variants,
|
|
235
|
+
`/api/email-engine/v3`, `/api/email-management/v1`, `/api/email-management/v3`,
|
|
236
|
+
and `/cmscontent-api/v3/email` returned 404 in tested portals. Use the known
|
|
237
|
+
browser-session email UI/cosemail capture surfaces instead.
|
|
238
|
+
- `GET /api/automation/v4/flows/{id}` returned 401 in-tab during testing; use
|
|
239
|
+
`/api/automationplatform/v1/hybrid/{flowId}` for full workflow fidelity.
|
|
240
|
+
- `/api/contacts-list-app/v1/lists/search` returned 404 in tested portals.
|
|
241
|
+
- CMS domain TLS/certificate configuration and HubSpot's own portal-copy job
|
|
242
|
+
trigger remain UI-controlled. Capture evidence and document them rather than
|
|
243
|
+
replaying them automatically.
|