# Method: projects.schemas.validate

- [HTTP request](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/validate#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/validate#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/validate#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/validate#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/validate#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/validate#body.aspect)
- [Try it!](https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas/validate#try-it)

Validates a schema.

### HTTP request

Choose a location:
<button value="global" default="">global</button>   
`POST https://pubsub.googleapis.com/v1/{parent}/schemas:validate`

<br />

### Path parameters

| Parameters ||
|---|---|
| `parent` | `string` Required. The name of the project in which to validate schemas. Format is `projects/{project-id}`. |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "schema": { object (`https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas#Schema`) } } ``` |

| Fields ||
|---|---|
| `schema` | ``object (`https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas#Schema`)`` Required. The schema object to validate. |

### Response body

If successful, the response body is empty.

### Authorization scopes

Requires one of the following OAuth scopes:

- `https://www.googleapis.com/auth/pubsub`
- `https://www.googleapis.com/auth/cloud-platform`

For more information, see the [Authentication Overview](https://docs.cloud.google.com/docs/authentication#authorization-gcp).