---
title: "Set the coach's cross-coach benchmark opt-in state"
method: PUT
path: "/api/analytics/benchmark-consent"
tags: ["Analytics"]
---

# Set the coach's cross-coach benchmark opt-in state

`PUT /api/analytics/benchmark-consent`

## Request

- Base URL: `https://api.setluca.com`
- URL: `https://api.setluca.com/api/analytics/benchmark-consent`
- Auth: API key in cookie `luca.session_token`

Turns benchmarking on or off. Opting out also stops this coach's data feeding anyone else's benchmarks.

**Session-only.** This endpoint isn't on the API-key allowlist. An organization API key gets a 403 here, whatever scopes it holds.

## Headers

- `Luca-API-Version` '1'

## Request body

- BenchmarkConsentUpdate
  - `optIn` boolean, required

## Response `200`

ok

- BenchmarkConsentResponse
  - `status` 'granted' | 'withdrawn' | 'none', required
  - `grantedAt` string, nullable, required
  - `withdrawnAt` string, nullable, required

## Other responses

- `401`: unauthorized
- `429`: rate limited
- `500`: internal error
- `503`: service unavailable

---

[API](https://skmtc.dev/setluca/apis/luca-api.md) · [All operations](https://skmtc.dev/setluca/apis/luca-api/llms.txt) · [OpenAPI document](https://skmtc.dev/setluca/apis/luca-api/revisions/90a200e4100b?raw)
