---
title: "POST /api/public/v1/consent/set"
method: POST
path: "/api/public/v1/consent/set"
---

# POST /api/public/v1/consent/set

`POST /api/public/v1/consent/set`

## Request

- Base URL: `https://app.fortuneos.ai`
- URL: `https://app.fortuneos.ai/api/public/v1/consent/set`
- Auth: none declared

Records the visitor's grant or refusal per optional category under the current policy version, then sets the consent cookie. Answers `stored` only after the server read the state back. Refused with FORBIDDEN for a cross-origin request or refusal `notConfigured`, `categoryNotOffered`, `captureOff`, `gpcActive` or `stale` (a newer choice is stored than the `expectedVersion` the save was made on), and TOO_MANY_REQUESTS past the budget. A refusal of a category asks the capture deletion contract; `deletion` says whether it was taken (`requested`), is not wired (`notAvailable`) or failed (`failed`, the choice is still stored; submit it again). A stored grant can always be withdrawn, even while capture is off.

## Request body

- object
  - `choices` object[], required
    - `category` 'analytics' | 'marketing' | 'referral', required
    - `decision` 'granted' | 'denied', required
  - `source` 'banner' | 'preferences', required
  - `expectedVersion` string, required

## Response `200`

OK

- object
  - `stored` unknown, required
  - `view` object, required
    - `status` 'off' | 'notConfigured' | 'active' | 'unavailable', required
    - `analyticsAllowed` boolean, required
    - `stamp` string, required
    - `version` string, required
    - `policyVersion` string, nullable, required
    - `privacyPolicyUrl` string, nullable, required
    - `gpc` boolean, required
    - `categories` object[], required
      - `category` 'analytics' | 'marketing' | 'referral', required
      - `state` 'unknown' | 'granted' | 'denied', required
    - `needsChoice` boolean, required
  - `deletion` 'none' | 'requested' | 'notAvailable' | 'failed', required

## Changes

- **2026-10-27** `f262a1a20099`: 1 info
  - endpoint added

[Operation history](https://skmtc.dev/fortis/apis/fortune-os-api/changes/api/public/v1/consent/set/post.md)

---

[API](https://skmtc.dev/fortis/apis/fortune-os-api.md) - [All operations](https://skmtc.dev/fortis/apis/fortune-os-api/llms.txt) - [OpenAPI document](https://skmtc.dev/fortis/apis/fortune-os-api/revisions/522f3cea550d?raw)
