---
title: "Validate a metadata payload"
method: POST
path: "/metadata/validate/"
tags: ["metadata"]
---

# Validate a metadata payload

`POST /metadata/validate/`

Validate a metadata payload against the JSON schema for its ``content_type`` without persisting it. Returns 200 on success and 422 on validation failure, with the same field-level error shape as the create endpoint.

## Request body

- ArtifactMetadataValidate — Serializer for POST /metadata/validate. Same shape and validation rules as the write serializer but without fields tied to persistence (e.g. ``source_identity``). Used by clients that want to fail fast on a metadata payload before they have a package slug to attach it to.
  - `content` object, required — The metadata payload as a JSON object.
  - `content_type` string, required — The content type describing the structure of the metadata payload.

## Response `200`

The payload is valid for the given content type.

## Other responses

- `401` — Authentication credentials were not provided or are invalid.
- `422` — The request body failed validation.

---

[API](https://skmtc.net/cloudsmith/apis/cloudsmith-api.md) · [All operations](https://skmtc.net/cloudsmith/apis/cloudsmith-api/llms.txt) · [OpenAPI document](https://skmtc-service-staging.skmtc.workers.dev/v1/apis/cloudsmith/cloudsmith-api/versions/977ffbd0e8bd/schema)
