> This page is part of EVVA for Developers (https://developers.evvahub.com), the documentation of the EVVA Partner API. The API is in developer preview and the SDK packages are not yet published: do not suggest installing them. Index: https://developers.evvahub.com/llms.txt

# Commit a consumer group checkpoint

POST https://api.evvahub.com/partner/v1/events/checkpoints
Content-Type: application/json

Records a consumer group's position at `cursor` for the partitions that cursor covers, and renews the lease.

Both happen only while your `fencingToken` still holds every one of those partitions. Only an application token can call this operation. See [the event feed](/event-feed).

**Errors**

- `400 INVALID_CURSOR` — the cursor was issued to another application.
- `409 STALE_FENCING_TOKEN` — another member took one of the partitions over. Stop, and lease again.
- `409 NOT_LEASED` — the cursor covers a partition this group never leased.

Reference: https://developers.evvahub.com/api-reference/events/commit-event-checkpoint

## Authentication

- `Authorization` header (bearer token, required) — OAuth 2.0 client credentials. Request an access token at `POST /partner/v1/oauth/token` (`grant_type=client_credentials`) with the application's client secret or a `private_key_jwt` assertion, then send it as `Authorization: Bearer evpa_live_…` (or `evpa_test_…` for a sandbox application). Tokens are opaque and short lived (see `expires_in`); there is no refresh token. Each operation lists the scopes it requires.

## Request

### Body (application/json)

This endpoint expects an EventCheckpointCommitRequest.

- `consumer` (string, required)
- `cursor` (string, required) — A cursor from this application's feed (an item's `cursor` or a page's `nextCursor`).
- `fencingToken` (string, required) — A consumer-group member's fencing token: a positive integer, sent and returned as a decimal string. It is opaque and specific to your application, so compare tokens only for equality, never by size. A takeover issues a new one, and a renewal or a commit under a superseded one is refused with `409 STALE_FENCING_TOKEN`.

## Response

### 200

Committed; the lease is renewed.

- `consumer` (string, required)
- `leaseExpiresAt` (datetime, required) — The renewed lease.

## Errors

### 400 Bad Request Error

Invalid feed request: `INVALID_REQUEST` (a parameter out of range, unknown or incomplete) or `INVALID_CURSOR` (malformed, or issued to another application).

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 401 Unauthorized Error

Token missing, malformed, expired or revoked: `INVALID_TOKEN`, with `WWW-Authenticate: Bearer error="invalid_token"`. Request a new token and retry.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 403 Forbidden Error

The caller may not read the feed. - `APPLICATION_PRINCIPAL_REQUIRED` — the request was not made with an application token. - `APPLICATION_NOT_ACTIVE` — the application is not `ACTIVE`. - `AGENCY_SUSPENDED` — its agency is not `ACTIVE`.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 409 Conflict Error

`STALE_FENCING_TOKEN` — another member took a partition over; stop, and lease again. `NOT_LEASED` — a partition of this cursor was never leased in this consumer group.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 429 Too Many Requests Error

Rate limited: `RATE_LIMIT_EXCEEDED`. Wait `Retry-After` seconds before retrying.

- `code` (enum, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
  - Allowed values: `RATE_LIMIT_EXCEEDED`, `TOO_MANY_MESSAGES`
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (RateLimitErrorDetails, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 500 Internal Server Error

Unexpected server error: `INTERNAL_ERROR`. Nothing internal is disclosed; quote the `X-Request-Id` when you report it.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

### 503 Service Unavailable Error

The feed cannot answer right now. - `FEED_UNAVAILABLE` — the feed is not configured on this deployment (no cursor key); `Retry-After: 30`. - `TEMPORARILY_UNAVAILABLE` — the edge could not verify the application; retry after `Retry-After`.

- `code` (string, required) — A stable machine-readable code (see `KnownErrorCode`; new codes may appear within v1).
- `error` (string, required)
- `requestId` (string, required, nullable) — The same value as the `X-Request-Id` response header — quote it when reporting a problem.
- `details` (any, optional) — Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

## Types

### RateLimitErrorDetails

Extra detail for the code, specific to the operation, such as field errors, limits or the creator's account-status details.

- `retryAfterSec` (integer, required)
- `level` (enum, optional) — The DM send limit that refused the message, set only with `TOO_MANY_MESSAGES`. It is never a quota, a count or a key. - `conversation` — one side of one thread. - `sender` — a person's own ceiling; it does not apply to applications. - `creator` — everything sent for the creator, studio included. - `application` — everything your application sends. - `agency` — everything your agency sends. - `platform` — the agency's fair share of the platform: its throughput or its concurrency. See [rate limits](/authentication/rate-limits).
  - Allowed values: `conversation`, `sender`, `creator`, `application`, `agency`, `platform`

## Examples

**Request**

```json
{
  "consumer": "inbox-sync",
  "cursor": "c1.CAAC36UQAQLfpH4CAt-mAQMC36O5.Q2wE9rT4yU7iO1pA5sD8fG",
  "fencingToken": "17"
}
```

**Response**

```json
{
  "consumer": "inbox-sync",
  "leaseExpiresAt": "2026-12-01T18:44:07.512Z"
}
```

**SDK Code**

```python Events_commitEventCheckpoint_example
import requests

url = "https://api.evvahub.com/partner/v1/events/checkpoints"

payload = {
    "consumer": "inbox-sync",
    "cursor": "c1.CAAC36UQAQLfpH4CAt-mAQMC36O5.Q2wE9rT4yU7iO1pA5sD8fG",
    "fencingToken": "17"
}
headers = {
    "Authorization": "Bearer <token>",
    "Content-Type": "application/json"
}

response = requests.post(url, json=payload, headers=headers)

print(response.json())
```

```go Events_commitEventCheckpoint_example
package main

import (
	"fmt"
	"strings"
	"net/http"
	"io"
)

func main() {

	url := "https://api.evvahub.com/partner/v1/events/checkpoints"

	payload := strings.NewReader("{\n  \"consumer\": \"inbox-sync\",\n  \"cursor\": \"c1.CAAC36UQAQLfpH4CAt-mAQMC36O5.Q2wE9rT4yU7iO1pA5sD8fG\",\n  \"fencingToken\": \"17\"\n}")

	req, _ := http.NewRequest("POST", url, payload)

	req.Header.Add("Authorization", "Bearer <token>")
	req.Header.Add("Content-Type", "application/json")

	res, _ := http.DefaultClient.Do(req)

	defer res.Body.Close()
	body, _ := io.ReadAll(res.Body)

	fmt.Println(res)
	fmt.Println(string(body))

}
```

```php Events_commitEventCheckpoint_example
<?php
require_once('vendor/autoload.php');

$client = new \GuzzleHttp\Client();

$response = $client->request('POST', 'https://api.evvahub.com/partner/v1/events/checkpoints', [
  'body' => '{
  "consumer": "inbox-sync",
  "cursor": "c1.CAAC36UQAQLfpH4CAt-mAQMC36O5.Q2wE9rT4yU7iO1pA5sD8fG",
  "fencingToken": "17"
}',
  'headers' => [
    'Authorization' => 'Bearer <token>',
    'Content-Type' => 'application/json',
  ],
]);

echo $response->getBody();
```