---
title: "Validate JavaScript indicator source without loading bars"
method: POST
path: "/v1/indicators/js/validate"
---

# Validate JavaScript indicator source without loading bars

`POST /v1/indicators/js/validate`

## Request

- Base URL: `https://app.texttoquant.com/api`
- URL: `https://app.texttoquant.com/api/v1/indicators/js/validate`
- Auth: one of:
  - API key in header `x-api-key`
  - HTTP bearer

Shape check only. Returns { ok, diagnostics[] }: a compile failure is a 200 with ok:false, not an HTTP error.

## Request body

- object
  - `js_code` string, required

## Response `200`

Answers {success, ok, diagnostics, contract, stats} at the top level (no data wrapper)

- object
  - `success` true, required
  - `ok` boolean, required
  - `diagnostics` object[], required
  - `contract` object: The declared inputs, plots and visuals.
  - `stats` object

## Other responses

- `400`: validation_error

---

[API](https://skmtc.dev/texttoquant/apis/texttoquant-api.md) · [All operations](https://skmtc.dev/texttoquant/apis/texttoquant-api/llms.txt) · [OpenAPI document](https://skmtc.dev/texttoquant/apis/texttoquant-api/revisions/d417fc3f4a7d?raw)
