Product
Jentic OSThe workplace. An in-house AI platform for every employeeJentic OneSafe access. Agents reach your systems without holding keysJentic AIRThe foundation. Gets your existing platforms ready for AI
Pricing
Developers

GET STARTED

API DirectoryBrowse 10,000+ APIs Ready For AI Agent IntegrationDocumentationGuides and API reference

TOOLS

API ScoringCheck your AI Readiness using our scorecardArazzo UIVisualize Arazzo Workflows As Interactive DocumentationArazzo EditorBuild And Edit Multi-Step API Workflows Visually

COMMUNITY

GitHubOpen source projects and examplesOpen StandardsBuilt on open specs. Never locked in.
Resources
Company
About UsOur mission and teamCareersJoin our teamContactGet in touch
Try it now
Jentic OSJentic OneJentic AIR
Pricing
API DirectoryDocumentationAPI ScoringArazzo UIArazzo EditorGitHubOpen Standards
Resources
About UsCareersContact
Try it now
JenticJentic
Products
  • Jentic OS
  • Jentic One
  • Jentic AIR
For Developers
  • API Directory
  • Documentation
  • GitHub
Company
  • About Jentic
  • Careers
  • Contact Us
  • Trust Centre
ISO/IEC 27001:2022 certification badge issued by Prescient SecurityISO/IEC 27001:2022 certification badge issued by Prescient Security

Information Security Management System

Certified to ISO/IEC 27001:2022 by Prescient Security

Terms & Conditions•Privacy Policy•
© 2026 Jentic Technology Ltd. All rights reserved.
Switch to light modeSwitch to dark mode
APIs / Marketing / Hubspot / CMS Source Code
CMS Source Code logo

HubSpot CMS Source Code

Browse all Hubspot APIs
Official vendor OpenAPI document · agent-readyMarketingContent Managementoauth2, apiKey8 EndpointsREST

For Agents

Read, write, validate, and bulk-extract HubSpot CMS template and module source files in published or draft environments, so an agent can manage themes from a developer workflow.

Use for: Read the published source for templates/main.html, Update modules/header.module/module.html in the draft environment, Validate templates/landing.html before pushing it live, Get the metadata for assets/styles.css

Not supported: Does not host binary media, manage page content, or expose runtime page renders - use for reading, writing, validating, and extracting HubSpot CMS template and module source files only.

The HubSpot CMS Source Code API exposes the file system that backs a HubSpot CMS - templates, modules, stylesheets, and JavaScript that pages and posts render against. It supports reading, writing, validating, and bulk-extracting source files in either the published or draft environments. Use it to manage HubSpot themes from a developer workflow, run validation checks before publishing, or migrate templates between portals.

Jentic One on GithubView OpenAPI Document

Install Jentic One Beta

Connect the CMS Source Code to your agent

Jentic One is a self-hosted execution layer for AI agents. It lets your agent call the CMS Source Code, or any other public or private API you need. You set the rules, the agent never sees your credentials, and every call is logged.

Two steps, two machines. Install the instance in a safe environment, then register your agent from wherever it runs.

1

Step 1: Jentic One Host machine

# On the machine that will host your Jentic One instance:
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fhubspot.com%2Fhubspot-cms-source-code" | sh
2

Step 2: Agent machine

# On the machine where your agent runs (keep this separate from the instance):
curl -fsSL "https://jentic.com/install.sh?src=apis&api=%2Fapis%2Fhubspot.com%2Fhubspot-cms-source-code" | sh
jentic register       # connects your agent to your Jentic One instance

Jentic One is in public beta. The setup above keeps your agent separate from the instance, which is what you want before using real credentials: an agent running as the same OS user as Jentic One can read its stored keys directly. Just evaluating? A single local install is fine to start. See the secure deployment guide for the tiers.

Capabilities

What an agent can do with CMS Source Code API.

Read the source code at a given path in either the draft or published environment

Upload or update template, module, and asset files at a specific path

Read or update file metadata such as folder placement and content type

Validate a file at a path before pushing it live to catch HUBL or syntax errors

Trigger an asynchronous extract of an entire CMS theme as a downloadable archive

Poll the status of an extract task and retrieve the resulting archive when ready

Use Cases

Patterns agents use CMS Source Code API for, with concrete tasks.

★ Themes In A Developer Workflow

Many developers prefer to manage HubSpot themes from a Git workflow rather than the in-browser design manager. The Source Code API supports reading and writing files at a path in either draft or published environments, letting a CI pipeline sync a Git repo to HubSpot. Validation runs before publish to catch syntax errors before they affect live pages.

For each changed file in a Git diff, PUT the content to /cms/v3/source-code/draft/content/{path}, run /cms/v3/source-code/draft/validate/{path}, and only promote to published if validation passes.

Cross-Portal Theme Migration

Agencies move themes between client portals or between a parent and sandbox account. The async extract endpoints package the entire theme into an archive that can be re-imported elsewhere. Polling the task status endpoint allows long-running extracts to be tracked without holding open a connection.

POST to /cms/v3/source-code/extract/async to start the extract, poll /cms/v3/source-code/extract/async/tasks/{taskId}/status until status is 'COMPLETE', then download the archive.

Pre-Publish Template Validation

Before promoting a draft template that powers many pages, content engineers want a deterministic check for HUBL syntax errors and missing references. The validate endpoint returns errors at the file level, allowing a script to abort the publish flow if any template fails. The result is fewer broken pages reaching production.

GET /cms/v3/source-code/draft/validate/{path} for each template, collect errors, and refuse to PUT to the published environment if any template has errors.

Agent-Driven Module Updates

An AI agent maintaining a brand-consistent theme can read existing modules, propose edits, and write the result back through a single search-load-execute cycle. Through Jentic, credentials never enter the agent context and the validation endpoint provides automatic feedback on each proposed change.

Use Jentic to search 'read hubspot source code at path', load the schema, execute it for the target module, generate updated HTML, and PUT it back via the matching write endpoint after validation passes.

Key Endpoints

8 endpoints — the hubspot cms source code api exposes the file system that backs a hubspot cms - templates, modules, stylesheets, and javascript that pages and posts render against.

METHOD

PATH

DESCRIPTION

GET

/cms/v3/source-code/{environment}/content/{path}

Read source content at a path

PUT

/cms/v3/source-code/{environment}/content/{path}

Write source content at a path

GET

/cms/v3/source-code/{environment}/metadata/{path}

Read metadata for a source file

GET

/cms/v3/source-code/{environment}/validate/{path}

Validate a source file

POST

/cms/v3/source-code/extract/async

Trigger an async theme extract

GET

/cms/v3/source-code/extract/async/tasks/{taskId}/status

Check the status of an extract task

GET

/cms/v3/source-code/{environment}/content/{path}

Read source content at a path

PUT

/cms/v3/source-code/{environment}/content/{path}

Write source content at a path

GET

/cms/v3/source-code/{environment}/metadata/{path}

Read metadata for a source file

GET

/cms/v3/source-code/{environment}/validate/{path}

Validate a source file

POST

/cms/v3/source-code/extract/async

Trigger an async theme extract

GET

/cms/v3/source-code/extract/async/tasks/{taskId}/status

Check the status of an extract task

Why Jentic?

What agents get from Jentic-routed access to this vendor.

Setup

Setup

Wiring HubSpot CMS Source Code by hand means registering an OAuth app or minting a private app token, targeting api.hubapi.com, and coding the environment-and-path reads, writes, validation, and async extract polling yourself. Through Jentic you install once, import CMS Source Code from the API Directory, store the token once, and your agent calls it.

Permission scoping

Permission scoping

CMS Source Code puts the environment and file path in the URL (/cms/v3/source-code/{environment}/content/{path}), so a rule can pin your agent to reading files in one environment. You choose the operations it may call, so writing to a path is only available if you include the PUT operation.

Credential management

Credential isolation

Your HubSpot OAuth token or private app token is stored once, encrypted, by your own Jentic One instance and injected at execution time. It never enters the agent's prompt, logs, or context.

Intent-based discovery

Intent-based discovery

Agents search Jentic by intent such as 'read HubSpot source code at a path' or 'validate a template', and Jentic returns the matching CMS Source Code operation with its input schema so the agent calls the right endpoint without browsing the reference docs.

Related APIs

Alternatives and complements available in the Jentic catalogue.

Complementary

CMS Pages

→

Pages that render the templates and modules managed here

Use Source Code to update the template; use Pages to verify the rendered page picks up the change.

Complementary

Blog Posts

→

Posts that consume the templates managed by this API

Use Source Code when changing the post template; use Posts when changing the post content itself.

Alternative

Files

→

Stores binary assets like images and fonts that source code cannot

Choose Files for image, video, or font uploads; choose Source Code for HTML, CSS, and HUBL.

FAQs

Specific to using CMS Source Code API through Jentic.

What authentication does the HubSpot CMS Source Code API use?

It accepts HubSpot OAuth 2.0 tokens or Private App tokens in the Authorization header with the content scope. Through Jentic, those credentials live in the encrypted vault and the agent only sees a scoped execution token.

Can I edit a published template directly with this API?

Yes, by writing to /cms/v3/source-code/published/content/{path}. In practice, write to draft first and validate, then promote - direct edits to published bypass the draft safety net.

What are the rate limits for the HubSpot Source Code API?

It uses HubSpot's standard public API caps: 100 requests per 10 seconds for OAuth apps and 110 per 10 seconds for Private Apps on Pro and Enterprise. The async extract endpoints offload heavy operations so they do not consume the quota during the long-running step.

How do I validate a template before publishing through Jentic?

Run pip install jentic, search 'validate hubspot template', load the schema, and execute it with environment='draft' and the path. Jentic posts to /cms/v3/source-code/draft/validate/{path} and returns any HUBL errors.

Does the Source Code API support uploading binary assets?

It handles text-based source files (HTML, HUBL, CSS, JavaScript) at given paths. For binary assets like images and fonts, use HubSpot's Files API, which is purpose-built for media storage.

Can I limit what my agent is allowed to do with the HubSpot CMS Source Code API?

Yes. Because you run Jentic One yourself, your own rules decide which CMS Source Code operations the agent may call and which stored HubSpot token it uses. Since the environment and file path sit in the URL (/cms/v3/source-code/{environment}/content/{path}), you can pin the agent to reading files in the draft environment and leave out the PUT write operation entirely, so it cannot modify published templates. You can also grant only the validate operation, letting the agent check HUBL syntax without touching source content.

GET STARTED

Start building with CMS Source Code API

Explore with Jentic One
View OpenAPI Document