# Method: cursor.projects.locations.subscriptions.commitCursor

- [HTTP request](https://docs.cloud.google.com/pubsub/lite/docs/reference/rest/v1/cursor.projects.locations.subscriptions/commitCursor#body.HTTP_TEMPLATE)
- [Path parameters](https://docs.cloud.google.com/pubsub/lite/docs/reference/rest/v1/cursor.projects.locations.subscriptions/commitCursor#body.PATH_PARAMETERS)
- [Request body](https://docs.cloud.google.com/pubsub/lite/docs/reference/rest/v1/cursor.projects.locations.subscriptions/commitCursor#body.request_body)
  - [JSON representation](https://docs.cloud.google.com/pubsub/lite/docs/reference/rest/v1/cursor.projects.locations.subscriptions/commitCursor#body.request_body.SCHEMA_REPRESENTATION)
- [Response body](https://docs.cloud.google.com/pubsub/lite/docs/reference/rest/v1/cursor.projects.locations.subscriptions/commitCursor#body.response_body)
- [Authorization scopes](https://docs.cloud.google.com/pubsub/lite/docs/reference/rest/v1/cursor.projects.locations.subscriptions/commitCursor#body.aspect)

Updates the committed cursor.

### HTTP request

`POST https://{endpoint}/v1/cursor/{subscription=projects/*/locations/*/subscriptions/*}:commitCursor`

Where `{endpoint}` is one of the [supported service endpoints](https://docs.cloud.google.com/pubsub/lite/docs/reference/rest#rest_endpoints).

The URLs use [gRPC Transcoding](https://google.aip.dev/127) syntax.

### Path parameters

| Parameters ||
|---|---|
| `subscription` | `string` The subscription for which to update the cursor. Authorization requires the following [IAM](https://cloud.google.com/iam/docs/) permission on the specified resource `subscription`: - `pubsublite.subscriptions.setCursor` |

### Request body

The request body contains data with the following structure:

| JSON representation |
|---|
| ``` { "partition": string, "cursor": { object (`https://docs.cloud.google.com/pubsub/lite/docs/reference/rest/v1/Cursor`) } } ``` |

| Fields ||
|---|---|
| `partition` | `string (https://developers.google.com/discovery/v1/type-format format)` The partition for which to update the cursor. Partitions are zero indexed, so `partition` must be in the range \[0, topic.num_partitions). |
| `cursor` | ``object (`https://docs.cloud.google.com/pubsub/lite/docs/reference/rest/v1/Cursor`)`` The new value for the committed cursor. |

### Response body

If successful, the response body is empty.

### Authorization scopes

Requires the following OAuth scope:

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

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