---
title: "POST /v2/consents/gpc"
method: POST
path: "/v2/consents/gpc"
---

# POST /v2/consents/gpc

`POST /v2/consents/gpc`

## Request

- Base URL: `https://uc.api.osano.com`
- URL: `https://uc.api.osano.com/v2/consents/gpc`
- Auth: API key in header `x-uc-api-key`
- TypeScript: <https://skmtc.dev/osano/apis/unified-consent-core-api/docs/v2/consents/gpc/post.ts> (a function with typed inputs; its response is checked against the schema)

Create and insert a gpc consent

## Headers

- `x-country-code-override` string
- `x-region-code-override` string

## Request body

- Def22
  - `subject` object, required
    - `verifiedId` string
    - `anonymousId` string
  - `compliance` Def21
    - `gpc` integer
  - `attributes` object, required: Custom key/value attributes, e.g. { "platform": "Linux x86_64" }. ipAddress and userAgent are set by the API.
  - `jurisdiction` string

## Response `201`

GPC consent recorded. gpcActions lists the action applied to each GPC-enabled privacy protocol for the resolved jurisdiction.

- object
  - `gpcActions` object[], required
    - `target` string, required
    - `vendor` string, required
    - `action` string, required
    - `jurisdiction` string

## Changes

- **2026-11-06** `669b3b5b4d06`: 1 info
  - the response property `gpcActions` became required for the status `201`
- **2024-12-26** `2fe8098661eb`: 1 info
  - added the media type `application/json` for the response with the status `201`

[Operation history](https://skmtc.dev/osano/apis/unified-consent-core-api/changes/v2/consents/gpc/post.md)

---

[API](https://skmtc.dev/osano/apis/unified-consent-core-api.md) - [All operations](https://skmtc.dev/osano/apis/unified-consent-core-api/llms.txt) - [OpenAPI document](https://skmtc.dev/osano/apis/unified-consent-core-api/revisions/669b3b5b4d06?raw)
