---
title: "Create Strategy"
method: POST
path: "/v1/strategies"
---

# Create Strategy

`POST /v1/strategies`

## Request

- Base URL: `https://api.quantradin.com` (the document declares no server; this is the origin it was published from)
- URL: `https://api.quantradin.com/v1/strategies`
- Auth: none declared

Save a validated strategy spec and return its id.

Auth: session cookie wins, else X-Vega-Key (require_user_or_session).
A logged-in member saving from the member /backtest cockpit carries only
the session cookie (no per-user API key) — the session path lets them
save; SDK/API-key callers are unaffected.

Ask-first defaults (Ro, 2026-07-21): a validation failure ALSO carries
`suggestions` (per defaultable missing field: the value we'd fill in
and a plain-words why) and — when it would validate as-is — a ready
`suggested_spec` to resubmit in one round-trip. NOTHING is auto-applied;
`detail` stays the (complete + kind) error string for existing clients.

## Headers

- `x-vega-key` string, nullable

## Request body

- StrategyRequest: POST /v1/strategies — spec + optional human name.
  - `strategy_spec` object, required
  - `name` string, nullable

## Response `200`

Successful Response

- StrategyCreated
  - `strategy_id` integer, required

## Other responses

- `422`: Validation Error

---

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