---
title: "Save or revoke optional ad measurement"
method: POST
path: "/api/measurement/context"
---

# Save or revoke optional ad measurement

`POST /api/measurement/context`

## Request

- Base URL: `https://api.peelaway.io`
- URL: `https://api.peelaway.io/api/measurement/context`
- Auth: API key in cookie `better-auth.session_token`

Browser session and trusted Origin required. consent:false clears matching identifiers; consent:true requires a validated 90-day context. Does not record purchases.

## Response `200`

Saved

## Other responses

- `400`: Invalid context
- `401`: Authentication required
- `403`: Browser origin/session required

---

[API](https://skmtc.dev/peelaway/apis/peelaway-image-api.md) · [All operations](https://skmtc.dev/peelaway/apis/peelaway-image-api/llms.txt) · [OpenAPI document](https://skmtc.dev/peelaway/apis/peelaway-image-api/revisions/8ce45533c9d0?raw)
