# Method: projects.schemas.commit

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

Commits a new schema revision to an existing schema.

### HTTP request

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

<br />

### Path parameters

| Parameters ||
|---|---|
| `name` | `string` Required. The name of the schema we are revising. Format is `projects/{project}/schemas/{schema}`. |

### 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 revision to commit. |

### Response body

If successful, the response body contains an instance of `https://docs.cloud.google.com/pubsub/docs/reference/rest/v1/projects.schemas#Schema`.

### 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).