---
title: "POST /v2/costformation/definition/versions"
method: POST
path: "/v2/costformation/definition/versions"
tags: ["costformation"]
---

# POST /v2/costformation/definition/versions

`POST /v2/costformation/definition/versions`

Create a new CloudZero CostFormation Definition version. Ten (10) MB is the general payload size limitation and it cannot be raised. For more information, see the [Sample Python CostFormation Script](https://docs.cloudzero.com/docs/sample-python-costformation-script).

## Query parameters

- `validate_only` string
- `namespace` string

## Headers

- `cloudzero-idempotency-key` string
- `cloudzero-test-key` string

## Response `200`

Successful Operation

- union
  - object — Response for creating new version
    - `version` CostformationDefinitionVersionWithUrl
      - `version` string, required
      - `last_updated` string — String representation of an epoch (UTC timestamp)
      - `last_updated_by` string — email, username, or api key that created this entity (optional)
      - `uri` string, uri, required
  - object — Empty response if validate_only=true

## Other responses

- `400` — Bad Request Error
- `403` — Forbidden
- `422` — Bad CloudZero CostFormation Definition Version Create Request Error

---

[API](https://skmtc.dev/cloudzero/apis/cloudzero-api-v2-resources.md) · [All operations](https://skmtc.dev/cloudzero/apis/cloudzero-api-v2-resources/llms.txt) · [OpenAPI document](https://skmtc-service-production.skmtc.workers.dev/v1/apis/cloudzero/cloudzero-api-v2-resources/revisions/fd805a0e75e5/schema)
