---
title: "Validate source code file"
method: POST
path: "/cms/source-code/2026-03/{environment}/validate/{path}"
tags: ["Content"]
---

# Validate source code file

`POST /cms/source-code/2026-03/{environment}/validate/{path}`

Validate a source code file within a specified environment in your HubSpot account. This endpoint is useful for checking the correctness of code files before deployment or further processing. The validation process requires the file to be uploaded in a multipart/form-data request.

## Path parameters

- `environment` string, required
- `path` string, required

## Response `default`

An error occurred.

## Changes

- **2026-03-25** `62586336cea2` — 1 info
  - endpoint added

[Change history](https://skmtc.dev/hubspot/apis/hubspot-api-specification/changes/cms/source-code/2026-03/:environment/validate/:path/post.md)

---

[API](https://skmtc.dev/hubspot/apis/hubspot-api-specification.md) · [All operations](https://skmtc.dev/hubspot/apis/hubspot-api-specification/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/hubspot/hubspot-api-specification/revisions/62586336cea2/schema)
