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

# POST /v2/consents

`POST /v2/consents`

## Request

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

Create and insert a consent

## Headers

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

## Request body

- Def1
  - `sessionToken` string: Optional session token returned by the create profile endpoint.
  - `subject` object, required
    - `verifiedId` string
    - `anonymousId` string
  - `compliance` Def0
    - `privacyPolicy` object
      - `version` string
      - `url` string, required
    - `gpc` integer
  - `actions` object[], required
    - `target` string, required
    - `vendor` string, required
    - `action` string, required: The subject's consent choice for the privacy protocol. 'ACCEPT', 'REJECT' and 'UNSELECTED' are matched case-insensitively and stored uppercase. Any other value is not validated and is stored as sent.
    - `jurisdiction` string
  - `attributes` object, required: Custom key/value attributes, e.g. { "platform": "Linux x86_64" }. ipAddress and userAgent are set by the API.
  - `origin` string
  - `jurisdiction` string

## Response `201`

Consent inserted

## Changes

- **2026-06-14** `dedbbc618db6`: 1 info
  - added the new optional request property `actions/items/jurisdiction`

[Operation history](https://skmtc.dev/osano/apis/unified-consent-core-api/changes/v2/consents/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)
