---
title: "Validate the contents of a file"
method: POST
path: "/cms/source-code/2026-03/{environment}/validate/{path}"
tags: ["Advanced"]
---

# Validate the contents of a file

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

Validates the file contents passed to the endpoint given a specified path and environment. Accepts multipart/form-data content type.

## Path parameters

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

## Response `default`

An error occurred.

## Changes

> 14 revisions in range; 1 not diffed, 2 could not be searched.

- **2026-04-08** `b0d8bc008db9` — 1 info
  - api operation id `post-/cms/source-code/2026-03/{environment}/validate/{path}_doValidate` removed and replaced with `post-/cms/source-code/2026-03/{environment}/validate/{path}`
- **2026-03-30** `dc2fdad57f7f` — 2 info
  - api tag `Advanced` added
  - api tag `Content` removed
- **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/f9c7181056c5/schema)
